whizard is hosted by Hepforge, IPPP Durham

Opened 9 years ago

Closed 9 years ago

#753 closed defect (fixed)

Build broken after StdHEP inclusion

Reported by: kilian Owned by: Juergen Reuter
Priority: P0 Milestone: v2.2.8
Component: configure Version: 2.2.7
Severity: blocker Keywords:
Cc:

Description

Sorry for that, but the system doesn't compile at all if there is no external code, because StdHEP wants libstdc++ but this is not linked. This is for a fresh build using nagfor.

I'll check how this was handled previously and update the configuration accordingly, hope I'll get it.

Change History (8)

comment:1 Changed 9 years ago by kilian

Owner: changed from ALL to kilian
Status: newassigned

comment:2 Changed 9 years ago by kilian

Owner: changed from kilian to Juergen Reuter
Status: assignednew

Linking works again with r7268, but simply forcing -lstdc++ on the main executable is probably not a sufficient solution, in particular it might break other things. @JR: can you check? The system should compile on Mac, and the static tests should also work. It seems like you didn't test a build where no C++ libraries were enabled, right?

It's somewhat unfortunate that after including StdHEP the Whizard system depends on C++. Hopefully, there won't be an OS where this doesn't exist, but we now have another source of potential configure problems ...

comment:3 Changed 9 years ago by Juergen Reuter

First comment: this is the very funny linker on Ubuntu. Neither on Jenkins, nor on Scientific Linux, nor on the MAC does this break. Oh well, on Scientific Linux it could be because I never install without HepMC and LCIO, and both demand libstdc++. Ok, I will check, what brings in the C++ dependence is the reader for the StdHep? consistency checks. Maybe I can make the one that depends on them conditional on the presence of the C++ library.

comment:4 Changed 9 years ago by Juergen Reuter

I CANNOT reproduce this on Scientifix Linux with a blank system. WK, compilation and linking goes through without the LDFLAGS_STDHEP. What is freaking wrong with your Linux?

comment:5 Changed 9 years ago by kilian

Reproduced on my OpenSuse? laptop. This is the linker error:

libtool: link: nagfor -C=all -gline -nan -f2008 -o .libs/whizard  whizard-core/.libs/libwhizard_main.so ./.libs/libwhizard.so /home/kilian/whizard/build/nag/vamp/src/.libs/libvamp.so /home/kilian/whizard/build/nag/circe1/src/.libs/libcirce1.so /home/kilian/whizard/build/nag/circe2/src/.libs/libcirce2.so prebuilt/.libs/libwhizard_prebuilt.so -ldl -Wl,-Wl,,-rpath -Wl,-Wl,,/home/kilian/whizard/install/nag/lib64
NAG Fortran Compiler Release 6.0(Hibiya) Build 1021
./.libs/libwhizard.so: undefined reference to `vtable for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >'
./.libs/libwhizard.so: undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
./.libs/libwhizard.so: undefined reference to `operator delete[](void*)'
./.libs/libwhizard.so: undefined reference to `operator new(unsigned long)'
./.libs/libwhizard.so: undefined reference to `VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >'
[snip]
./.libs/libwhizard.so: undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
./.libs/libwhizard.so: undefined reference to `std::ostream& std::ostream::_M_insert<double>(double)'
collect2: error: ld returned 1 exit status
Makefile:919: recipe for target 'whizard' failed
make[2]: *** [whizard] Error 1
make[2]: Leaving directory '/home/kilian/whizard/build/nag/src'
Makefile:954: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/kilian/whizard/build/nag/src'
Makefile:692: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Are you sure that you disabled all C++ libs? I set --disable-hepmc --disable-fastjet --disable-lhapdf.

Even if this worked, I'd suggest to avoid a mandatory C++ dependency.

comment:6 Changed 9 years ago by kilian

PS: and of course --disable-lcio, but LCIO doesn't work on my machines anyway.

comment:7 Changed 9 years ago by Juergen Reuter

Reproduced on Ubuntu. I now understand why it does work on Jenkins and on the DESY machines. Concerning, the C++ dependence: that's unavoidable if we want to keep the sanity checks for StdHep?. It would be a hell of work around this, no time to do that this year for sure.

comment:8 Changed 9 years ago by Juergen Reuter

Resolution: fixed
Status: newclosed

The reason why it worked on Jenkins and the DESY Scientific Linux was that there was a self-compiled gcc and g++ which contained a libstdc++.la file that was included via libtool into the dependency libs. This didn't work with pre-installed compilers from Linux distributions. Now, I check for the CXXLIBS and add them in the linking procecure. Worked, including static tests on a blank distribution on a blank Ubuntu. Closing.

Note: See TracTickets for help on using tickets.