Bug 38873 - boost 1.37.0 fails to compile comp_ellint_1l.cpp
Summary: boost 1.37.0 fails to compile comp_ellint_1l.cpp
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-16 14:40 UTC by Heinz Wiesinger
Modified: 2011-09-29 00:05 UTC (History)
1 user (show)

See Also:
Host: i486-slackware-linux
Target: i486-slackware-linux
Build: i486-slackware-linux
Known to work:
Known to fail:
Last reconfirmed:


Attachments
preprocessed source file (154.43 KB, application/octet-stream)
2009-01-16 14:45 UTC, Heinz Wiesinger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heinz Wiesinger 2009-01-16 14:40:22 UTC
I'm trying to compile boost 1.37.0 on Slackware 12.1 and get an internal compiler error on trying to compile comp_ellint_1l.cpp. I have Slackware's stock gcc, which is 4.2.3.

The exact command that triggers the error is:

"/usr/bin/g++" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_MATH_TR1_DYN_LINK=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/math/build/gcc-4.2.3/release/threading-multi/comp_ellint_1l.o" "libs/math/build/../src/tr1/comp_ellint_1l.cpp"

and it gives the following output:

*** glibc detected *** /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus: free(): invalid next size (fast): 0x086d99b8 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7eb58c4]
/lib/libc.so.6(cfree+0x90)[0xb7eb9370]
/usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus[0x8469c19]
======= Memory map: ========
08048000-08521000 r-xp 00000000 03:03 401525     /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus
08521000-08526000 rw-p 004d9000 03:03 401525     /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus
08526000-08a8b000 rw-p 08526000 00:00 0          [heap]
b4200000-b4221000 rw-p b4200000 00:00 0
b4221000-b4300000 ---p b4221000 00:00 0
b4335000-b433f000 r-xp 00000000 03:03 270250     /usr/lib/libgcc_s.so.1
b433f000-b4340000 rw-p 00009000 03:03 270250     /usr/lib/libgcc_s.so.1
b4350000-b79e1000 rw-p b4350000 00:00 0
b7a0f000-b7e13000 rw-p b7a0f000 00:00 0
b7e13000-b7e49000 r--p 00000000 03:03 233886     /usr/lib/locale/en_US/LC_CTYPE
b7e49000-b7e4a000 rw-p b7e49000 00:00 0
b7e4a000-b7f90000 r-xp 00000000 03:03 11964      /lib/libc-2.7.so
b7f90000-b7f91000 r--p 00146000 03:03 11964      /lib/libc-2.7.so
b7f91000-b7f93000 rw-p 00147000 03:03 11964      /lib/libc-2.7.so
b7f93000-b7f97000 rw-p b7f93000 00:00 0
b7f9a000-b7fa6000 rw-p b7f9a000 00:00 0
b7fa6000-b7fa7000 r--p 00000000 03:03 233731     /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
b7fa7000-b7fc3000 r-xp 00000000 03:03 11941      /lib/ld-2.7.so
b7fc3000-b7fc5000 rw-p 0001b000 03:03 11941      /lib/ld-2.7.so
bff2b000-bff41000 rw-p bffea000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
libs/math/build/../src/tr1/comp_ellint_1l.cpp: In function 'long double comp_ellint_1l(long double)':
libs/math/build/../src/tr1/comp_ellint_1l.cpp:11: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

gcc -v gives:

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.2.3/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.2.3
Comment 1 Heinz Wiesinger 2009-01-16 14:45:22 UTC
Created attachment 17117 [details]
preprocessed source file
Comment 2 Richard Biener 2009-01-16 16:07:37 UTC
Works for me.  Can you specify the output of the g++ command if you append -v to
the full commandline?
Comment 3 Heinz Wiesinger 2009-01-20 14:30:24 UTC
Sorry for the delay. I found out it works for me as well, sometimes. I'll attach both the output of when it worked and when it failed (on the same system).

Command:

"/usr/bin/g++" -v -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_MATH_TR1_DYN_LINK=1 -DNDEBUG  -I"." -c -o "bin.v2/libs/math/build/gcc-4.2.3/release/threading-multi/comp_ellint_1l.o" "comp_ellint_1l.ii"

-----------------------------
Worked:

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.2.3/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.2.3
 /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus -fpreprocessed comp_ellint_1l.ii -quiet -dumpbase comp_ellint_1l.ii -mtune=i486 -march=i486 -auxbase-strip bin.v2/libs/math/build/gcc-4.2.3/release/threading-multi/comp_ellint_1l.o -O3 -Wno-inline -Wall -version -ftemplate-depth-128 -finline-functions -fPIC -o /tmp/ccsa6o6g.s
GNU C++ version 4.2.3 (i486-slackware-linux)
        compiled by GNU C version 4.2.3.
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31344
Compiler executable checksum: 6e821a92395a6d11d0fecef5a903c36b
 /usr/lib/gcc/i486-slackware-linux/4.2.3/../../../../i486-slackware-linux/bin/as -V -Qy -o bin.v2/libs/math/build/gcc-4.2.3/release/threading-multi/comp_ellint_1l.o /tmp/ccsa6o6g.s
GNU assembler version 2.17.50.0.17 (i486-slackware-linux) using BFD version (Linux/GNU Binutils) 2.17.50.0.17.20070615

-----------------------------
Failed:

Reading specs from /usr/lib/gcc/i486-slackware-linux/4.2.3/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.2.3/configure --prefix=/usr --enable-shared --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.2.3
 /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus -fpreprocessed comp_ellint_1l.ii -quiet -dumpbase comp_ellint_1l.ii -mtune=i486 -march=i486 -auxbase-strip bin.v2/libs/math/build/gcc-4.2.3/release/threading-multi/comp_ellint_1l.o -O3 -Wno-inline -Wall -version -ftemplate-depth-128 -finline-functions -fPIC -o /tmp/ccxJshtE.s
GNU C++ version 4.2.3 (i486-slackware-linux)
        compiled by GNU C version 4.2.3.
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31344
Compiler executable checksum: 6e821a92395a6d11d0fecef5a903c36b
*** glibc detected *** /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus: free(): invalid next size (fast): 0x08983220 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7e068c4]
/lib/libc.so.6(cfree+0x90)[0xb7e0a370]
/usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus[0x8469bfb]
======= Memory map: ========
08048000-08521000 r-xp 00000000 03:03 401525     /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus
08521000-08526000 rw-p 004d9000 03:03 401525     /usr/libexec/gcc/i486-slackware-linux/4.2.3/cc1plus
08526000-089a8000 rw-p 08526000 00:00 0          [heap]
b4400000-b4421000 rw-p b4400000 00:00 0
b4421000-b4500000 ---p b4421000 00:00 0
b4556000-b4560000 r-xp 00000000 03:03 270250     /usr/lib/libgcc_s.so.1
b4560000-b4561000 rw-p 00009000 03:03 270250     /usr/lib/libgcc_s.so.1
b4571000-b63b2000 rw-p b4571000 00:00 0
b63d7000-b7adf000 rw-p b63d7000 00:00 0
b7b5a000-b7d64000 rw-p b7b5a000 00:00 0
b7d64000-b7d9a000 r--p 00000000 03:03 233886     /usr/lib/locale/en_US/LC_CTYPE
b7d9a000-b7d9b000 rw-p b7d9a000 00:00 0
b7d9b000-b7ee1000 r-xp 00000000 03:03 11964      /lib/libc-2.7.so
b7ee1000-b7ee2000 r--p 00146000 03:03 11964      /lib/libc-2.7.so
b7ee2000-b7ee4000 rw-p 00147000 03:03 11964      /lib/libc-2.7.so
b7ee4000-b7ee8000 rw-p b7ee4000 00:00 0
b7eeb000-b7ef7000 rw-p b7eeb000 00:00 0
b7ef7000-b7ef8000 r--p 00000000 03:03 233731     /usr/lib/locale/en_US/LC_MESSAGES/SYS_LC_MESSAGES
b7ef8000-b7f14000 r-xp 00000000 03:03 11941      /lib/ld-2.7.so
b7f14000-b7f16000 rw-p 0001b000 03:03 11941      /lib/ld-2.7.so
bf91e000-bf934000 rw-p bffea000 00:00 0          [stack]
ffffe000-fffff000 r-xp 00000000 00:00 0          [vdso]
./boost/math/special_functions/ellint_1.hpp: In function 'long double comp_ellint_1l(long double)':
./boost/math/special_functions/ellint_1.hpp:150: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

--------------
I'm on a Pentium III Coppermine with 733MHz. Don't know if that matters.
Comment 4 Paolo Carlini 2011-09-29 00:05:08 UTC
This is anyway completely obsolete. If you can see something similar with a current toolchain, please file a new separate PR.