KiCad / KicadOSXBuilder

Kicad OSX Builder, which I plan to use as my boxed development environment on Mac OSX
87 stars 27 forks source link

building universal binary (i386 + x86_64), fails during linking boost libs (Undefined symbols for architecture i386) #26

Open jmaibaum opened 10 years ago

jmaibaum commented 10 years ago

At commit d7bcd17f10 (currently the latest), invoking build.sh with standard parameters (e.g. meaning to build a universal binary with support for both x86_64 and i386) fails during linking the boost libs. They seem to be missing the symbols for i386, even though boost got built with address-model = 32_64.

Here is what I got:

Linking CXX shared module _pcbnew.so
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_date_time.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_date_time.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_filesystem.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_filesystem.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_iostreams.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_iostreams.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_locale.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_locale.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_program_options.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_program_options.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_regex.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_regex.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_system.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_system.a
ld: warning: ignoring file /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_thread.a, file was built for archive which is not the architecture being linked (i386): /<snip>/KicadOSXBuilder/src/kicad/boost_root/lib/libboost_thread.a
Undefined symbols for architecture i386:
  "boost::detail::thread_data_base::~thread_data_base()", referenced from:
      boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf2<void, FOOTPRINT_LIST, wxString const*, int>, boost::_bi::list3<boost::_bi::value<FOOTPRINT_LIST*>, boost::_bi::value<wxString*>, boost::_bi::value<int> > > >::~thread_data() in libpcbcommon.a(footprint_info.cpp.o)
      boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf2<void, FOOTPRINT_LIST, wxString const*, int>, boost::_bi::list3<boost::_bi::value<FOOTPRINT_LIST*>, boost::_bi::value<wxString*>, boost::_bi::value<int> > > >::~thread_data() in libpcbcommon.a(footprint_info.cpp.o)
  "boost::system::system_category()", referenced from:
      boost::thread_exception::thread_exception(int, char const*) in libpcbcommon.a(footprint_info.cpp.o)
      __GLOBAL__I_a in libpcbcommon.a(footprint_info.cpp.o)
  "boost::system::generic_category()", referenced from:
      __GLOBAL__I_a in libpcbcommon.a(footprint_info.cpp.o)
  "boost::thread::join_noexcept()", referenced from:
      FOOTPRINT_LIST::ReadFootprintFiles(FP_LIB_TABLE*, wxString const*) in libpcbcommon.a(footprint_info.cpp.o)
  "boost::thread::native_handle()", referenced from:
      FOOTPRINT_LIST::ReadFootprintFiles(FP_LIB_TABLE*, wxString const*) in libpcbcommon.a(footprint_info.cpp.o)
  "boost::thread::start_thread_noexcept()", referenced from:
      boost::thread::thread<void (FOOTPRINT_LIST::*)(wxString const*, int), FOOTPRINT_LIST*, wxString*, int>(void (FOOTPRINT_LIST::*)(wxString const*, int), FOOTPRINT_LIST*, wxString*, int) in libpcbcommon.a(footprint_info.cpp.o)
  "boost::thread::detach()", referenced from:
      boost::thread::~thread() in libpcbcommon.a(footprint_info.cpp.o)
  "typeinfo for boost::detail::thread_data_base", referenced from:
      typeinfo for boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf2<void, FOOTPRINT_LIST, wxString const*, int>, boost::_bi::list3<boost::_bi::value<FOOTPRINT_LIST*>, boost::_bi::value<wxString*>, boost::_bi::value<int> > > > in libpcbcommon.a(footprint_info.cpp.o)
  "vtable for boost::detail::thread_data_base", referenced from:
          boost::detail::thread_data_base::thread_data_base() in libpcbcommon.a(footprint_info.cpp.o)
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [pcbnew/_pcbnew.so] Error 1
make[1]: *** [pcbnew/CMakeFiles/_pcbnew.dir/all] Error 2
make: *** [all] Error 2
build error on BUILD KICAD  STEP: 5