|
Boost Users : |
From: Jeffrey Chang (jeffrey.chang_at_[hidden])
Date: 2006-07-17 01:33:23
Hi,
I'm building boost_1_33_1 on mingw win32 environment via:
boost-jam-3.1.3-1-ntx86/bjam.exe -sTOOLS=mingw stage
Everything goes fine and most libraries are built and run without
problems, except for link-time errors of "undefined references" for the
following functions:
"boost::filesystem::detail::system_error_code()"
"boost::filesystem::filesystem_error::~filesystem_error()"
"boost::filesystem::filesystem_error::filesystem_error(...)"
"vtable for boost::filesystem::filesystem_error"
"boost::archive::ARCHIVE_VERSION()"
"boost::archive::ARCHIVE_SIGNATURE()"
"boost::signals::trackable::signal_connected(...)"
It seems some of the object files doesn't get picked up while building
their corresponding libraries; for example, ARCHIVE_VERSION() and
ARCHIVE_SIGNATURE() are defined in
libs/serialization/src/basic_archive.cpp file, which are compiled
correctly into basic_archive.obj, yet somehow the bjam link process
cannot find it while building the Serialization library. If I inline
the definition of ARCHIVE_VERSION() and ARCHIVE_SIGNATURE() into its
declaration header file of boost/archive/basic_archive.hpp, the the
Serialization library is built without problem. This shows that I'm
probably missing something for the above build command.
Also, in my mingw win32 build output of stage/lib directory, the
corresponding libraries with the above "undefined references"
(libboost_filesystem-mgw-*, libboost_serialization-mgt-*, and
libboost_signals-mgw-*) are generated as a result of the above bjam
build command, even though mingw's ld.exe doesn't recognize these lib
files. Is this a bug in bjam logic?
Here's my mingw win32 environment:
* MSYS-1.0.11-2004.04.30-1
* msysDTK-1.0.1
* binutils-2.16.91-20060119-1
* gcc-core-3.4.5-20060117-1
* gcc-g++-3.4.5-20060117-1
* w32api-3.7
* mingw-runtime-3.10
* mingw-utils-0.3
Attached is the excerpt of above undefined reference errors. I'm not
familiar with bjam; it'd be great if someone can shed lights on what's
wrong. (please cc me as I'm not subscribed to the list)
------------- begin: bjam build output ------------
FileClone stage\lib\boost_date_time-mgw-mt-d-1_33_1.lib
gcc-Link-action
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\debug\boost_filesystem-mgw-d-1_33_1.dll
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\debug\boost_filesystem-mgw-d-1_33_1.lib
Creating library file:
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\debug\boost_filesystem-mgw-d-1_33_1.lib
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\debug\operations_posix_windows.obj:
In function
`ZN5boost10filesystem6detail12dir_itr_initERNS_10shared_ptrINS1_11dir_itr_impEEERKNS0_4pathE':c:/e2e/win32/ref/boost/boost_1_33_1/libs/filesystem/build/../src/operations_posix_windows.cpp:308:
undefined reference to `boost::filesystem::detail::system_error_code()'
:c:/e2e/win32/ref/boost/boost_1_33_1/libs/filesystem/build/../src/operations_posix_windows.cpp:308:
undefined reference to
`boost::filesystem::filesystem_error::filesystem_error(std::string
const&, boost::filesystem::path const&, int)'
:c:/e2e/win32/ref/boost/boost_1_33_1/libs/filesystem/build/../src/operations_posix_windows.cpp:308:
undefined reference to
`boost::filesystem::filesystem_error::~filesystem_error()'
....
:c:/e2e/win32/ref/boost/boost_1_33_1/boost/iterator/iterator_facade.hpp:(.text$_ZN5boost10filesystem16filesys
tem_errorC1ERKS1_[boost::filesystem::filesystem_error::filesystem_error(boost::filesystem::filesystem_error
const&)]+0x4c): undefined reference to `vtable for
boost::filesystem::filesystem_error'
....
"g++" "-Wl,--enable-auto-image-base"
"-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__"
"-Wl,--out-implib,bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\boost_filesystem-mgw-mt-1_33_1.lib"
-mthreads -s -shared -Wl,--allow-multiple-definition -mno-cygwin -o
"bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\boost_filesystem-mgw-mt-1_33_1.dll"
-L""
"bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\exception.obj"
"bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\operations_posix_windows.obj"
"bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\path_posix_windows.obj"
"bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\convenience.obj"
...failed gcc-Link-action
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\boost_filesystem-mgw-mt-1_33_1.dll
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\boost_filesystem-mgw-mt-1_33_1.lib...
...removing
bin\boost\libs\filesystem\build\boost_filesystem.dll\mingw\release\threading-multi\boost_filesystem-mgw-mt-1_33_1.lib
...skipped <@boost!lib>boost_filesystem-mgw-mt-1_33_1.dll for lack of
<@boost!libs!filesystem!build\boost_filesystem.dll\mingw\release\threading-multi>boost_filesystem-mgw-mt-1_33_1.dll...
...skipped <@boost!lib>boost_filesystem-mgw-mt-1_33_1.lib for lack of
<@boost!libs!filesystem!build\boost_filesystem.dll\mingw\release\threading-multi>boost_filesystem-mgw-mt-1_33_1.lib...
FileClone stage\lib\boost_program_options-mgw-d-1_33_1.lib
FileClone stage\lib\boost_program_options-mgw-mt-d-1_33_1.lib
FileClone stage\lib\boost_python-mgw-d-1_33_1.lib
FileClone stage\lib\boost_python-mgw-mt-d-1_33_1.lib
FileClone stage\lib\boost_python-mgw-1_33_1.lib
FileClone stage\lib\boost_python-mgw-mt-1_33_1.lib
FileClone stage\lib\boost_regex-mgw-d-1_33_1.lib
FileClone stage\lib\boost_regex-mgw-mt-d-1_33_1.lib
FileClone stage\lib\boost_regex-mgw-1_33_1.lib
gcc-Link-action
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\debug\boost_serialization-mgw-d-1_33_1.dll
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\debug\boost_serialization-mgw-d-1_33_1.lib
Creating library file:
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\debug\boost_serialization-mgw-d-1_33_1.lib
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\debug\basic_iarchive.obj:
In function
`ZSt38__copy_backward_output_normal_iteratorIPN5boost7archive6detail19basic_iarchive_impl10cobject_idEN9__gnu_cxx17__normal_iteratorIS5_St6vectorIS4_SaIS4_EEEEET0_T_SD_SC_11__true_type':c:/e2e/win32/ref/boost/boost_1_33_1/libs/serialization/build/../src/basic_iarchive.cpp:(.text$_ZN5boost7archive6detail19basic_iarchive_implC1Ej[boost::archive::detail::basic_iarchive_impl::basic_iarchive_impl(unsigned
int)]+0x52): undefined reference to `boost::archive::ARCHIVE_VERSION()'
.....
'
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\debug\binary_iarchive.obj:
In function
`ZN5boost7archive20binary_iarchive_implINS0_15binary_iarchiveEE13load_overrideINS0_13tracking_typeEEEvRT_i':c:/e2e/win32/ref/boost/boost_1_33_1/boost/archive/binary_iarchive.hpp:(.text$_ZN5boost7archive21basic_binary_iarchiveINS0_15binary_iarchiveEE4initEv[boost::archive::basic_binary_iarchive<boost::archive::binary_iarchive>::init()]+0x6e):
undefined reference to `boost::archive::ARCHIVE_SIGNATURE()'
.....
"g++" "-Wl,--enable-auto-image-base"
"-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__"
"-Wl,--out-implib,bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\boost_serialization-mgw-mt-1_33_1.lib"
-mthreads -s -shared -Wl,--allow-multiple-definition -mno-cygwin -o
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\boost_serialization-mgw-mt-1_33_1.dll"
-L""
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_archive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_archive_impl.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_iarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_oarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_iserializer.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_oserializer.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_pointer_iserializer.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_pointer_oserializer.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_serializer_map.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_text_iprimitive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_text_oprimitive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\basic_xml_archive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\binary_iarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\binary_oarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\extended_type_info.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\extended_type_info_no_rtti.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\extended_type_info_typeid.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\polymorphic_iarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\polymorphic_oarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\stl_port.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\text_iarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\text_oarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\void_cast.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\xml_grammar.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\xml_iarchive.obj"
"bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\xml_oarchive.obj"
...failed gcc-Link-action
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\boost_serialization-mgw-mt-1_33_1.dll
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\boost_serialization-mgw-mt-1_33_1.lib...
...removing
bin\boost\libs\serialization\build\boost_serialization.dll\mingw\release\threading-multi\boost_serialization-mgw-mt-1_33_1.lib
...skipped <@boost!lib>boost_serialization-mgw-mt-1_33_1.dll for lack of
<@boost!libs!serialization!build\boost_serialization.dll\mingw\release\threading-multi>boost_serialization-mgw-mt-1_33_1.dll...
...skipped <@boost!lib>boost_serialization-mgw-mt-1_33_1.lib for lack of
<@boost!libs!serialization!build\boost_serialization.dll\mingw\release\threading-multi>boost_serialization-mgw-mt-1_33_1.lib...
gcc-Link-action
bin\boost\libs\signals\build\boost_signals.dll\mingw\debug\boost_signals-mgw-d-1_33_1.dll
bin\boost\libs\signals\build\boost_signals.dll\mingw\debug\boost_signals-mgw-d-1_33_1.lib
Creating library file:
bin\boost\libs\signals\build\boost_signals.dll\mingw\debug\boost_signals-mgw-d-1_33_1.lib
bin\boost\libs\signals\build\boost_signals.dll\mingw\debug\slot.obj: In
function
`ZN5boost7signals6detail9slot_base17create_connectionEv':c:/e2e/win32/ref/boost/boost_1_33_1/libs/signals/build/../src/slot.cpp:47:
undefined reference to
`boost::signals::trackable::signal_connected(boost::signals::connection,
boost::signals::detail::bound_object&) const'
collect2: ld returned 1 exit status
......
...failed gcc-Link-action
bin\boost\libs\signals\build\boost_signals.dll\mingw\release\threading-multi\boost_signals-mgw-mt-1_33_1.dll
bin\boost\libs\signals\build\boost_signals.dll\mingw\release\threading-multi\boost_signals-mgw-mt-1_33_1.lib...
...removing
bin\boost\libs\signals\build\boost_signals.dll\mingw\release\threading-multi\boost_signals-mgw-mt-1_33_1.lib
...skipped <@boost!lib>boost_signals-mgw-mt-1_33_1.dll for lack of
<@boost!libs!signals!build\boost_signals.dll\mingw\release\threading-multi>boost_signals-mgw-mt-1_33_1.dll...
...skipped <@boost!lib>boost_signals-mgw-mt-1_33_1.lib for lack of
<@boost!libs!signals!build\boost_signals.dll\mingw\release\threading-multi>boost_signals-mgw-mt-1_33_1.lib...
FileClone stage\lib\boost_thread-mgw-mt-d-1_33_1.lib
HardLink stage\lib\boost_date_time-mgw-mt-d.lib
...skipped <@boost!lib>boost_filesystem-mgw-d.lib for lack of
<@boost!lib>boost_filesystem-mgw-d-1_33_1.lib...
...skipped <@boost!lib>boost_filesystem-mgw-mt-d.lib for lack of
<@boost!lib>boost_filesystem-mgw-mt-d-1_33_1.lib...
...skipped <@boost!lib>boost_filesystem-mgw.lib for lack of
<@boost!lib>boost_filesystem-mgw-1_33_1.lib...
...skipped <@boost!lib>boost_filesystem-mgw-mt.lib for lack of
<@boost!lib>boost_filesystem-mgw-mt-1_33_1.lib...
HardLink stage\lib\boost_program_options-mgw-d.lib
HardLink stage\lib\boost_program_options-mgw-mt-d.lib
HardLink stage\lib\boost_python-mgw-d.lib
HardLink stage\lib\boost_python-mgw-mt-d.lib
HardLink stage\lib\boost_python-mgw.lib
HardLink stage\lib\boost_python-mgw-mt.lib
HardLink stage\lib\boost_regex-mgw-d.lib
HardLink stage\lib\boost_regex-mgw-mt-d.lib
HardLink stage\lib\boost_regex-mgw.lib
...skipped <@boost!lib>boost_serialization-mgw-d.lib for lack of
<@boost!lib>boost_serialization-mgw-d-1_33_1.lib...
...skipped <@boost!lib>boost_serialization-mgw-mt-d.lib for lack of
<@boost!lib>boost_serialization-mgw-mt-d-1_33_1.lib...
...skipped <@boost!lib>boost_serialization-mgw.lib for lack of
<@boost!lib>boost_serialization-mgw-1_33_1.lib...
...skipped <@boost!lib>boost_serialization-mgw-mt.lib for lack of
<@boost!lib>boost_serialization-mgw-mt-1_33_1.lib...
...skipped <@boost!lib>boost_signals-mgw-d.lib for lack of
<@boost!lib>boost_signals-mgw-d-1_33_1.lib...
...skipped <@boost!lib>boost_signals-mgw-mt-d.lib for lack of
<@boost!lib>boost_signals-mgw-mt-d-1_33_1.lib...
...skipped <@boost!lib>boost_signals-mgw.lib for lack of
<@boost!lib>boost_signals-mgw-1_33_1.lib...
...skipped <@boost!lib>boost_signals-mgw-mt.lib for lack of
<@boost!lib>boost_signals-mgw-mt-1_33_1.lib...
HardLink stage\lib\boost_thread-mgw-mt-d.lib
...failed updating 24 targets...
...skipped 36 targets...
...updated 22 targets...
------------- end: bjam build output ------------
Thanks,
--- Jeffrey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net