whizard is hosted by Hepforge, IPPP Durham

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#8 closed defect (fixed)

Static version test compilation fails to link libHepMC properly

Reported by: Juergen Reuter Owned by: Juergen Reuter
Priority: P4 Milestone:
Component: configure Version: 2.0.0alpha
Severity: minor Keywords: gfortran, static version, MAC OS X
Cc:

Description

When executing the whizard_test_static.sh testbed with gfortran 4.5.0, it crashes with the following error messages: libmanager.f90:47.27:

c_fptr = c_funloc (processes_get_n_processes)

1

Error: Parameter 'processes_get_n_processes' to 'c_funloc' at (1) must be BIND(C) libmanager.f90:49.27:

c_fptr = c_funloc (processes_get_process_id)

1

Error: Parameter 'processes_get_process_id' to 'c_funloc' at (1) must be BIND(C) libmanager.f90:51.27:

c_fptr = c_funloc (processes_get_model_name)

1

etc.

Change History (8)

comment:1 Changed 15 years ago by Juergen Reuter

Owner: changed from kilian to Juergen Reuter
Status: newassigned

Fixed this by including bind(C) in the module process_libraries. Works for i686 32 bit, still needs confirmation for MAC OS X. Therefore I leave the ticket open.

comment:2 Changed 15 years ago by Juergen Reuter

Priority: majorP2
Severity: critical

For MAC OS X there is somehow a problem with the inclusion of the HepMC libraries: Undefined symbols:

"std::_Rb_tree_increment(std::_Rb_tree_node_base const*)", referenced from:

std::_Rb_tree_const_iterator<std::pair<int const, HepMC::GenParticle*> >::operator++() in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) std::_Rb_tree_const_iterator<std::pair<int const, int> >::operator++() in libwhizard.a(libHepMCWrap_la-HepMCWrap.o)

"std::allocator<char>::allocator()", referenced from:

_new_io_gen_event_in in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) _new_io_gen_event_out in libwhizard.a(libHepMCWrap_la-HepMCWrap.o)

"std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))", referenced from:

HepMC::ParticleDataTable::ParticleDataTable?(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) HepMC::ParticleDataTable::ParticleDataTable?(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) HepMC::ParticleDataTable::ParticleDataTable?(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) HepMC::IO_BaseClass::print(std::basic_ostream<char, std::char_traits<char> >&) const in libwhizard.a(libHepMCWrap_la-HepMCWrap.o)

"std::allocator<char>::~allocator()", referenced from:

_new_io_gen_event_in in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) _new_io_gen_event_in in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) _new_io_gen_event_out in libwhizard.a(libHepMCWrap_la-HepMCWrap.o) _new_io_gen_event_out in libwhizard.a(libHepMCWrap_la-HepMCWrap.o)

comment:3 Changed 15 years ago by Juergen Reuter

However, when HepMC is disabled, the static test works also under MAC OS X.

comment:4 Changed 15 years ago by Juergen Reuter

Priority: P2P3
Severity: criticalnormal
Summary: WHIZARD static version test compilation crashes with bind(C) error messagesStatic version test compilation fails to link libHepMC properly

It looks like that there is a linking problem for the static version under MAC OS X. Tried to change the order of linking the files, but up to now unsuccessful. My knowledge about the MAC linking seems not be sufficient.

comment:5 Changed 15 years ago by Juergen Reuter

Priority: P3P4
Severity: normalminor

I found out that the problem disappears if I include on the MAC the C++ standard library libstdc++.dylib by just adding after the libHepMC.dylib. What I don't know is whether -- although working -- this is the correct procedure or not. In principle, GNU libtool should be able to do that job. Or is there a flag missing or something like that?

comment:6 Changed 15 years ago by Juergen Reuter

Component: coreconfigure
Keywords: MAC OS X added; C binding removed
Milestone: v2-compiles-gfortranv2.0-beta

comment:7 Changed 15 years ago by Juergen Reuter

Resolution: fixed
Status: assignedclosed

Fixed in r1223. Introduction of a flag LDFLAGS_STATIC which is set to "-lstdc++-static" for MAC OS X. Could not test under FreeBSD yet.

comment:8 Changed 14 years ago by Juergen Reuter

Milestone: v2.0-beta

Milestone v2.0-beta deleted

Note: See TracTickets for help on using tickets.