Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4747 closed Bugs (fixed)

mingw linker errors: undefined references

Reported by: Jim Bell <jim@…> Owned by: Robert Ramey
Milestone: Boost 1.45.0 Component: serialization
Version: Boost 1.44.0 Severity: Showstopper
Keywords: mingw Cc: jim@…, Bryce Adelstein Lelbach

Description

The MinGW build fails to link, with fifteen or undefined references as such:

bin.v2\libs\serialization\build\gcc-mingw-4.4.0\release\threading-multi\basic_iarchive.o:basic_iarchive.cpp:(.text+0x564): undefined reference to `_imp_ZNK5boost13serialization18extended_type_infoltERKS1_'

Cause: the BOOST_SERIALIZATION_SOURCE flag isn't being set. Note that this flag is distinct from BOOST_ARCHIVE_SOURCE.

The attached patch file modifies the Jamfile.v2 to pass that flag into every compilation unit. Maybe that's the final solution, but it resolves this issue.

Attachments (2)

ser_jam-2010-10-15.patch (411 bytes ) - added by Jim Bell <jim@…> 12 years ago.
ser-link-errs-2010-10.txt (4.7 KB ) - added by Jim Bell <jim@…> 12 years ago.

Download all attachments as: .zip

Change History (10)

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

Attachment: ser_jam-2010-10-15.patch added

comment:1 by Bryce Adelstein Lelbach, 12 years ago

Jim, could you post the full error your getting? I'd like to see that before applying your patch.

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

Please forgive the typos: "... fifteen or so undefined references ..."

And that example without WikiFormatting is:

bin.v2\libs\serialization\build\gcc-mingw-4.4.0\release\threading-multi\basic_iarchive.o:
basic_iarchive.cpp:(.text+0x564):
 undefined reference to `_imp___ZNK5boost13serialization18extended_type_infoltERKS1_'

Which, demangled (without the win32 'imp' prefix) is:

boost::serialization::extended_type_info::operator<(boost::serialization::extended_type_info const&) const

I'll attach the full list of linker undefined references, but wanted put these here (for the search engines to find).

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

Attachment: ser-link-errs-2010-10.txt added

comment:3 by Vladimir Prus, 12 years ago

Severity: ProblemShowstopper
Version: Boost 1.44.0Boost 1.45.0

Boo, this means serialziation is just totally unusable on mingw, and there's easy fix? Let consider for 1.45

comment:4 by Vladimir Prus, 12 years ago

Milestone: To Be DeterminedBoost-1.45.0
Version: Boost 1.45.0Boost 1.44.0

comment:5 by Bryce Adelstein Lelbach, 12 years ago

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

Thanks for the patch, Jim. As of r66123 this is fixed. Hopefully it doesn't break anything on other compilers.

Last edited 12 years ago by Bryce Adelstein Lelbach (previous) (diff)

comment:6 by Robert Ramey, 12 years ago

I've updated the library so that this isn't needed please don't check this in.

Robert Ramey

comment:7 by Bryce Adelstein Lelbach, 12 years ago

Ramey - I asked on Boost.Users for people to confirm, I got reports back that this was not fixed. I was unable to build without this patch. I've already committed it, ofc we can always revert if need be.

comment:8 by Bryce Adelstein Lelbach, 12 years ago

Sorry Ramey - I thought this was Jim's other patch. You are correct, this isn't needed and I have NOT applied this patch. In my comment I was thanking Jim for the report/submission.

Note: See TracTickets for help on using tickets.