[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-04-03 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

Richard Biener  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #7 from Richard Biener  ---
Closing then.

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-04-02 Thread programmist.linuks at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

--- Comment #6 from Mike  ---
(In reply to Jonathan Wakely from comment #5)
> (In reply to Mike from comment #4)
> > (In reply to Richard Biener from comment #3)
> > > Can you try to build in a separate object directory instead?
> > And where to put the folder
> 
> https://gcc.gnu.org/wiki/FAQ#configure

Clear. I've already demolished my distribution and put the arch, and then I
downloaded the 6.3.0 binaries dully and everything was compiled with a bang. I
left for arch Linux and I'm not likely to return here.

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

--- Comment #5 from Jonathan Wakely  ---
(In reply to Mike from comment #4)
> (In reply to Richard Biener from comment #3)
> > Can you try to build in a separate object directory instead?
> And where to put the folder

https://gcc.gnu.org/wiki/FAQ#configure

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-30 Thread programmist.linuks at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

--- Comment #4 from Mike  ---
(In reply to Richard Biener from comment #3)
> So if comment #5 is correct then it seems we are building stage1 genmatch
> against the (not yet built) libstdc++ headers but linking
> (-static-libstdc++) against the host compilers library.
> 
> Unfortunately the provided log doesn't tell how build/genmatch.o was built.
> 
> Trying myself we do (correctly):
> 
> g++ -std=gnu++98 -c   -g -DIN_GCC -fno-exceptions -fno-rtti
> -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
> -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
> -fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild
> -I/space/rguenther/src/svn/gcc-6-branch/gcc
> -I/space/rguenther/src/svn/gcc-6-branch/gcc/build
> -I/space/rguenther/src/svn/gcc-6-branch/gcc/../include 
> -I/space/rguenther/src/svn/gcc-6-branch/gcc/../libcpp/include  \
> -o build/genmatch.o
> /space/rguenther/src/svn/gcc-6-branch/gcc/genmatch.c
> 
> and in my experiments I can compile GCC 6.3 with 4.9.2 just fine so maybe
> Debian backported some changes in a wrong way.  I suggest to report this bug
> to Debian instead (CCing packager).
> 
> Note that you seem to do a build in-tree which isn't recommended.  Can you
> try to build in a separate object directory instead?

I tried to compile by your method and this is what happened:

<<< root@mx:/home/admin/sources/gcc-6.3.0# g++ -std=gnu++98 -c   -g -DIN_GCC   
 -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE
-I. -Ibuild -I./gcc -I./gcc/build -I./gcc/../include  -I./gcc/../libcpp/include
 -o build/genmatch.o ./gcc/genmatch.c./gcc/genmatch.c:24:21: fatal
error: bconfig.h: No such file or directory
#include "bconfig.h"
 ^
compilation terminated.>>>

> Can you
try to build in a separate object directory instead?
And where to put the folder?

I started looking for configuration files:
<<< root@mx:/home/admin/sources/gcc-6.3.0# find . -iname bconfig.h
./host-x86_64-pc-linux-gnu/gcc/bconfig.h
./host-x86_64-pc-linux-gnu/prev-gcc/bconfig.h >>>

I added a new path for Include:
<<< root@mx:/home/admin/sources/gcc-6.3.0# g++ -std=gnu++98 -c   -g -DIN_GCC   
 -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE
-I. -Ibuild -I./gcc -I./gcc/build -I./gcc/../include  -I./gcc/../libcpp/include
-I./host-x86_64-pc-linux-gnu/gcc  -o build-x86_64-linux-gnu/genmatch.o
./gcc/genmatch.c
root@mx:/home/admin/sources/gcc-6.3.0# ls build-x86_64-linux-gnu/
fixincludes  genmatch.o  libcpp  libiberty 
-rw-r--r-- 1 root root 1,2M мар 30 13:26 build-x86_64-linux-gnu/genmatch.o
>>>

Here is my old file!
<<< root@mx:/home/admin/sources/gcc-6.3.0# ls -lh
./host-x86_64-pc-linux-gnu/gcc/build/genmatch.o 
-rw-r--r-- 1 root root 298K мар 22 18:27
./host-x86_64-pc-linux-gnu/gcc/build/genmatch.o >>>

I went to the folder in which the compilation takes place:
<<< root@mx:/home/admin/sources/gcc-6.3.0# cd ./host-x86_64-pc-linux-gnu/gcc/
>>>

An error occurs after this command:
<<< root@mx:/home/admin/sources/gcc-6.3.0/host-x86_64-pc-linux-gnu/gcc# g++
-std=gnu++98   -g -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-DGENERATOR_FILE -fno-PIE -static-libstdc++ -static-libgcc  -fno-pie -o
build/genmatch \
> build/genmatch.o ../libcpp/libcpp.a ../libiberty/libiberty.a 
> build/errors.o build/vec.o build/hash-table.o 
> ../../host-x86_64-pc-linux-gnu/libiberty/libiberty.a
build/vec.o: In function `vec_prefix::release_overhead(void*, unsigned long,
bool)':
vec.c:(.text+0x6c6): undefined reference to `operator delete(void*, unsigned
long)'
build/vec.o: In function `vec_prefix::register_overhead(void*, unsigned long,
unsigned long)':
vec.c:(.text+0x9a1): undefined reference to `operator delete(void*, unsigned
long)'
build/vec.o: In function
`mem_alloc_description::~mem_alloc_description()':
vec.c:(.text._ZN21mem_alloc_descriptionI9vec_usageED2Ev[_ZN21mem_alloc_descriptionI9vec_usageED5Ev]+0x62):
undefined reference to `operator delete(void*, unsigned long)'
vec.c:(.text._ZN21mem_alloc_descriptionI9vec_usageED2Ev[_ZN21mem_alloc_descriptionI9vec_usageED5Ev]+0x70):
undefined reference to `operator delete(void*, unsigned long)'

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

Richard Biener  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
So if comment #5 is correct then it seems we are building stage1 genmatch
against the (not yet built) libstdc++ headers but linking (-static-libstdc++)
against the host compilers library.

Unfortunately the provided log doesn't tell how build/genmatch.o was built.

Trying myself we do (correctly):

g++ -std=gnu++98 -c   -g -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild
-I/space/rguenther/src/svn/gcc-6-branch/gcc
-I/space/rguenther/src/svn/gcc-6-branch/gcc/build
-I/space/rguenther/src/svn/gcc-6-branch/gcc/../include 
-I/space/rguenther/src/svn/gcc-6-branch/gcc/../libcpp/include  \
-o build/genmatch.o
/space/rguenther/src/svn/gcc-6-branch/gcc/genmatch.c

and in my experiments I can compile GCC 6.3 with 4.9.2 just fine so maybe
Debian backported some changes in a wrong way.  I suggest to report this bug to
Debian instead (CCing packager).

Note that you seem to do a build in-tree which isn't recommended.  Can you
try to build in a separate object directory instead?

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-29 Thread programmist.linuks at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

--- Comment #2 from Mike  ---
(In reply to Jonathan Wakely from comment #1)
> That's the sized-deallocation function which was new in GCC 5.
> 
> How did you configure gcc?
> 
> What is your existing compiler that you're using to build it?

My information for gcc:
<<< [ admin$: test] gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10) >>>

So I configured the assembly:

<<< #!/bin/sh
./configure --enable-languages=c,c++,java,objc,obj-c++ \
--prefix=/mnt/sda5/gcc --build=x86_64-linux-gnu \
--cache-file /mnt/sda5/gcc/CACHE-FILE --enable-multilib \
--enable-shared --enable-target-optspace --host=x86_64-pc-linux-gnu \
--program-transform-name='s/^gcc$/gcc-6.0.3;' 
>>>

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

Richard Biener  changed:

   What|Removed |Added

   Keywords||build
 Target||x86_64-linux
 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2017-03-29
Version|unknown |6.3.0
 Ever confirmed|0   |1

[Bug c++/80238] genmatch.c:(.text.startup+0x66c6): undefined reference to `operator delete(void*, unsigned long)'

2017-03-28 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80238

--- Comment #1 from Jonathan Wakely  ---
That's the sized-deallocation function which was new in GCC 5.

How did you configure gcc?

What is your existing compiler that you're using to build it?