Building QxOrm 1.2.8 with Boost 1.56.0 on OSX fails

Forum for posting problems using QxOrm library

Building QxOrm 1.2.8 with Boost 1.56.0 on OSX fails

Postby doulos » Tue Aug 12, 2014 3:43 pm

Hello all,

I just tried to build QxOrm under OSX 10.9.4 on top of a freshly compiled and installed boost 1.56.0. The first thing I saw was a few compile errors which originated in QxSerialze_shared_ptr.h, mentioning something about "singleton" and "extended_type_info" not being defined in namespace "boost::serialization". The compile errors actually originated from boost/serialization/shared_ptr.hpp, which led me to conclude that the issue could be mended by adding appropriate #includes to QxSerialze_shared_ptr.h. So I added

Code: Select all
#include <boost/serialization/extended_type_info.hpp>
#include <boost/serialization/singleton.hpp>


in front of
Code: Select all
#include <boost/serialization/shared_ptr.hpp>


and the compile went through! However, now I am faced wilth linker errors shown below that I cannot make sense of. Note that I looked into libboost_serialization.a (using gobjdump), and it says "file format mach-o-x86-64", and there are entry points that look like the ones missing, however not exactly.. Has anyone successfully built the configuration at hand?

Code: Select all
Undefined symbols for architecture x86_64:
  "boost::archive::xml_iarchive_impl<boost::archive::xml_iarchive>::load(std::string&)", referenced from:
      void boost::serialization::qx_load<boost::archive::xml_iarchive>(boost::archive::xml_iarchive&, QByteArray&, unsigned int) in QxSerialize_QByteArray.o
      boost::archive::detail::iserializer<boost::archive::xml_iarchive, std::pair<std::string, QVariant> >::load_object_data(boost::archive::detail::basic_iarchive&, void*, unsigned int) const in QxSerialize_QObject.o
      void boost::serialization::qx_serialize_qstring<true>::load<boost::archive::xml_iarchive>(boost::archive::xml_iarchive&, QString&, unsigned int) in QxSerialize_QString.o
  "boost::archive::xml_iarchive_impl<boost::archive::xml_iarchive>::xml_iarchive_impl(std::istream&, unsigned int)", referenced from:
      qx::QxArchive<qx::service::QxTransaction, boost::archive::xml_iarchive, boost::archive::xml_oarchive>::fromByteArray(qx::service::QxTransaction&, QByteArray const&, unsigned int) in QxTools.o
  "boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::save(std::string const&)", referenced from:
      void boost::serialization::qx_save<boost::archive::xml_oarchive>(boost::archive::xml_oarchive&, QByteArray const&, unsigned int) in QxSerialize_QByteArray.o
      boost::archive::detail::oserializer<boost::archive::xml_oarchive, std::pair<std::string, QVariant> >::save_object_data(boost::archive::detail::basic_oarchive&, void const*) const in QxSerialize_QObject.o
      void boost::serialization::qx_serialize_qstring<true>::save<boost::archive::xml_oarchive>(boost::archive::xml_oarchive&, QString const&, unsigned int) in QxSerialize_QString.o
  "boost::archive::xml_oarchive_impl<boost::archive::xml_oarchive>::xml_oarchive_impl(std::ostream&, unsigned int)", referenced from:
      qx::QxArchive<qx::service::QxTransaction, boost::archive::xml_iarchive, boost::archive::xml_oarchive>::toByteArray(qx::service::QxTransaction const&, std::string*, unsigned int) in QxTools.o
  "boost::archive::basic_text_oprimitive<std::ostream>::~basic_text_oprimitive()", referenced from:
      qx::QxArchive<qx::service::QxTransaction, boost::archive::xml_iarchive, boost::archive::xml_oarchive>::toByteArray(qx::service::QxTransaction const&, std::string*, unsigned int) in QxTools.o
      boost::archive::xml_oarchive::~xml_oarchive() in QxTools.o
      boost::archive::xml_oarchive::~xml_oarchive() in QxTools.o
doulos
 
Posts: 15
Joined: Mon Aug 11, 2014 1:24 pm

Re: Building QxOrm 1.2.8 with Boost 1.56.0 on OSX fails

Postby qxorm » Wed Aug 13, 2014 7:03 am

Hello,

which led me to conclude that the issue could be mended by adding appropriate #includes to QxSerialze_shared_ptr.h. So I added :
#include <boost/serialization/extended_type_info.hpp>
#include <boost/serialization/singleton.hpp>


This is not normal : the only file you can change in the QxOrm package is the QxOrm.pri file.
You should not change any other files.
If you have a problem with boost 1.56 (I didn't test it yet, just released a few days ago), then you should install boost 1.55 : there is no problem with this version.

now I am faced wilth linker errors shown below that I cannot make sense of.


Yes, thanks to another user (Lamont Peterson), it seems that you can find the solution here : https://qt-project.org/forums/viewthread/35646
So you should add this line in your *.pro file (or in the QxOrm.pri file) : QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
And maybe this line too : macx:QMAKE_MAC_SDK=macosx10.9
qxorm
Site Admin
 
Posts: 481
Joined: Mon Apr 12, 2010 7:45 am


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 6 guests