public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/39573]  New: linking fails when optimizations are enabled
@ 2009-03-28 15:42 fpbeekhof at gmail dot com
  2009-04-03 12:01 ` [Bug other/39573] " fpbeekhof at gmail dot com
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: fpbeekhof at gmail dot com @ 2009-03-28 15:42 UTC (permalink / raw)
  To: gcc-bugs

Linking in debugging mode is fine:
$ make CNF=gcc MODE=debug
scons -j 2 CNF=gcc MODE=debug BACKEND=
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c -pipe -I. -Wall -g -fopenmp main.cpp
g++ -o tinystr.o -c -pipe -I. -Wall -g -fopenmp tinystr.cpp
g++ -o tinyxml.o -c -pipe -I. -Wall -g -fopenmp tinyxml.cpp
g++ -o tinyxmlerror.o -c -pipe -I. -Wall -g -fopenmp tinyxmlerror.cpp
g++ -o tinyxmlparser.o -c -pipe -I. -Wall -g -fopenmp tinyxmlparser.cpp
g++ -o shapes -g -fopenmp tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
main.o -lcvmlcpp
scons: done building targets.

But in release mode, it's not:
$ make CNF=gcc
scons -j 2 CNF=gcc MODE= BACKEND=
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o main.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native
-ftree-vectorize -DNDEBUG main.cpp
g++ -o tinystr.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native
-ftree-vectorize -DNDEBUG tinystr.cpp
g++ -o tinyxml.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp -march=native
-ftree-vectorize -DNDEBUG tinyxml.cpp
g++ -o tinyxmlerror.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp
-march=native -ftree-vectorize -DNDEBUG tinyxmlerror.cpp
g++ -o tinyxmlparser.o -c -pipe -I. -Wall -O3 -funroll-loops -fopenmp
-march=native -ftree-vectorize -DNDEBUG tinyxmlparser.cpp
g++ -o shapes -fopenmp tinystr.o tinyxml.o tinyxmlerror.o tinyxmlparser.o
main.o -lcvmlcpp
main.o: In function
`_ZN7cvmlcppL25extractSurfaceFromAdapterIN6shapes20ShapeSurfaceAdaptor_IdEEdEEvRKT_RNS_8GeometryIT0_EEd.omp_fn.1':
main.cpp:(.text+0x5838): undefined reference to `void
cvmlcpp::extractSurfaceFromAdapter<shapes::ShapeSurfaceAdaptor_<double>,
double>(shapes::ShapeSurfaceAdaptor_<double> const&,
cvmlcpp::Geometry<double>&, double)::C.724'
collect2: ld returned 1 exit status
scons: *** [shapes] Error 1
scons: building terminated because of errors.
make: *** [compile] Error 2

$ g++ -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu12'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu12) 

Unfortunately, I'm not exactly sure how to complete this report. I have no idea
what component does this, so I just guessed. And should I simply attach all
source code ?


-- 
           Summary: linking fails when optimizations are enabled
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fpbeekhof at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39573


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2009-04-28 23:41 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-28 15:42 [Bug other/39573] New: linking fails when optimizations are enabled fpbeekhof at gmail dot com
2009-04-03 12:01 ` [Bug other/39573] " fpbeekhof at gmail dot com
2009-04-04 16:57 ` fpbeekhof at gmail dot com
2009-04-04 17:30 ` [Bug target/39573] Linking fails on AMD with -march=native, works with generic x86_64 steven at gcc dot gnu dot org
2009-04-04 17:40 ` rguenth at gcc dot gnu dot org
2009-04-04 17:45 ` fpbeekhof at gmail dot com
2009-04-04 17:47 ` rguenth at gcc dot gnu dot org
2009-04-04 18:02 ` fpbeekhof at gmail dot com
2009-04-04 18:04 ` rguenth at gcc dot gnu dot org
2009-04-04 18:13 ` fpbeekhof at gmail dot com
2009-04-04 18:41 ` steven at gcc dot gnu dot org
2009-04-04 19:50 ` fpbeekhof at gmail dot com
2009-04-04 20:00 ` rguenth at gcc dot gnu dot org
2009-04-04 20:03 ` rguenth at gcc dot gnu dot org
2009-04-04 20:15 ` [Bug target/39573] Linking fails on AMD with -march=native and -fopenmp, " fpbeekhof at gmail dot com
2009-04-04 20:45 ` rguenth at gcc dot gnu dot org
2009-04-05  8:17 ` fpbeekhof at gmail dot com
2009-04-06  8:59 ` jakub at gcc dot gnu dot org
2009-04-08 20:05 ` [Bug middle-end/39573] " jakub at gcc dot gnu dot org
2009-04-08 20:14 ` jakub at gcc dot gnu dot org
2009-04-08 20:14 ` jakub at gcc dot gnu dot org
2009-04-28 23:41 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).