Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4698 closed Bugs (fixed)

serialization link errors mingw

Reported by: Anton Sergunov <setosha@…> Owned by: Robert Ramey
Milestone: Boost 1.45.0 Component: serialization
Version: Boost 1.45.0 Severity: Showstopper
Keywords: Cc: setosha@…, Bryce Adelstein Lelbach

Description

Wery similar #4670 but under mingw

1.43 works fine

bjam build successed, but when use boost_serializtion got

Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_iarchiveEEEE12get_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_iarchiveEEEE12is_destroyedEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_iarchiveEEEE18get_const_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_iarchiveEEEE20get_mutable_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_oarchiveEEEE12get_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_oarchiveEEEE12is_destroyedEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_oarchiveEEEE18get_const_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_15binary_oarchiveEEEE20get_mutable_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_21naked_binary_iarchiveEEEE12get_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_21naked_binary_iarchiveEEEE12is_destroyedEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_21naked_binary_iarchiveEEEE18get_const_instanceEv: symbol not found
Cannot export _ZN5boost13serialization9singletonINS_7archive6detail12_GLOBAL__N_13mapINS2_21naked_binary_iarchiveEEEE20get_mutable_instanceEv: symbol not found
collect2: ld returned 1 exit status
C:\Qt\2010.05\mingw\bin>gcc -v
Using built-in specs.
Target: mingw32
Configured with: ../gcc-4.4.0/configure --enable-languages=c,ada,c++,fortran,java,objc,obj-c++ --disable-sjlj-exceptions --enable-shared --enable-libgcj --enabl
e-libgomp --with-dwarf2 --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --prefix=/mingw --with-gmp=/mingw/src/gmp/root
--with-mpfr=/mingw/src/mpfr/root --build=mingw32
Thread model: win32
gcc version 4.4.0 (GCC)

Attachments (1)

ser_cannot_export.patch (2.3 KB ) - added by Jim Bell <jim@…> 12 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Anton Sergunov <setosha@…>, 12 years ago

Cc: setosha@… added

comment:2 by Anton Sergunov <setosha@…>, 12 years ago

bjam reports many code visibility warnings in build process.

comment:3 by Robert Ramey, 12 years ago

Status: newassigned

comment:4 by Jim Bell <jim@…>, 12 years ago

Demangled, the name translates to

boost::serialization::singleton<boost::archive::detail::(anonymous namespace)::map<boost::archive::xml_iarchive> >::get_instance()

The unnamed namespace is what's causing the problem. I give the namespace a name ('extra_detail' for example), and these linker errors go away.

There are two files using them: archive/impl/archive_serializer_map.ipp and serialization/export.hpp.

See the attached patch file.

by Jim Bell <jim@…>, 12 years ago

Attachment: ser_cannot_export.patch added

comment:5 by Vladimir Prus, 12 years ago

Severity: ProblemShowstopper
Version: Boost 1.44.0Boost 1.45.0

This appears to make serialization unusable on mingw, therefore marking this as release blocker for now.

comment:6 by Vladimir Prus, 12 years ago

Milestone: To Be DeterminedBoost-1.45.0

comment:7 by Bryce Adelstein Lelbach, 12 years ago

Cc: Bryce Adelstein Lelbach added
Resolution: fixed
Status: assignedclosed

This is fixed, with Jim's patch.

comment:8 by Robert Ramey, 12 years ago

I've also checked in changes to address this. Let me know if the version on the trunk doesn't address it.

Robert Ramey

Note: See TracTickets for help on using tickets.