Opened 6 years ago

Last modified 5 years ago

#12741 assigned Bugs

Linker error in cross compiling with x86_64-w64-mingw32-g++

Reported by: zimmermann@… Owned by: Robert Ramey
Milestone: To Be Determined Component: serialization
Version: Boost 1.63.0 Severity: Problem
Keywords: Cc:

Description

Using

using gcc : i686 : i686-w64-mingw32-g++ ;
using gcc : x86_64 : x86_64-w64-mingw32-g++ ;

in tools/build/src/user-config.jam

with x86_64-w64-mingw32-g++ (GCC) 5.3.1 20160211 and calling

./b2 toolset=gcc-x86_64 address-model=64 link=shared --stagedir=x64 target-os=windows threading=multi threadapi=win32 variant=release --with-date_time --with-filesystem --with-graph --with-math --with-program_options --with-serialization --with-system --with-thread --with-timer

gives linker errors

gcc.link.dll bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/libboost_wserialization.dll.a
bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/basic_text_wiprimitive.o:basic_text_wiprimitive.cpp:(.rdata$.refptr._ZTVN5boost7archive12codecvt_nullIwEE[.refptr._ZTVN5boost7archive12codecvt_nullIwEE]+0x0): undefined reference to `vtable for boost::archive::codecvt_null<wchar_t>'
bin.v2/libs/serialization/build/gcc-mingw-x86_64/release/target-os-windows/threadapi-win32/threading-multi/xml_wiarchive.o:xml_wiarchive.cpp:(.rdata$.refptr._ZTVN5boost7archive6detail18utf8_codecvt_facetE[.refptr._ZTVN5boost7archive6detail18utf8_codecvt_facetE]+0x0): undefined reference to `vtable for boost::archive::detail::utf8_codecvt_facet'

The 32bit version i686-w64-mingw32-g++ with toolset=gcc-i686 address-model=32 works.

Change History (3)

comment:1 by Robert Ramey, 5 years ago

Status: newassigned

I've got some issues with minnow regarding linking visibility. You can see this on the boost library testing matrix for the serialization library. Not having a windows machine, I've been unable to isolate and fix them. The same also goes for cygwin platform as they seem to be a hybrid of windows and posix machines. So before I'd get worked up about cross compiling, I'd first like to see just the regular tests build, link and run correctly on this platform. If that can be made to work, the issue you've raised my just go away on its own. So if you want to spend some effort on making the tests compile link and run for minnow I'd would much appreciate it. Note that b2 amounts to a one button test setup. To use this I also use my Library Test program and macro to generate a cool table with results across configurations. But that's likely just me. Anyway, thanks for reporting this.

comment:2 by zimmermann@…, 5 years ago

Just for information: the problem is still present in 1.65.0

I'd like to spend some effort on helping, but I only have a Linux machine with cross compiler. Therefore I need advice what to do exactly.

comment:3 by James E. King, III, 5 years ago

Is this a duplicate of #12205?

Note: See TracTickets for help on using tickets.