Good Afternoon,
I have been using POCO for some time now on Linux (very nice API), but I would also like to use it on the freescale-platform.
I have been trying to cross-compile the lib using the tool-chain downloaded from https://sourcery.mentor.com/GNUToolchain/package9493/public/m68k-uclinux/freescale-coldfire-2011.09-23-m68k-uclinux-i686-pc-linux-gnu.tar.bz2.
After some minor tweaks, such as changing fork() to vfork(), adding some flags for SQLite3 to compile, the lib compiles without much problems.
Also I removed some SharedClasses, such as (NamedEvent NamedMutex SharedMemory SharedLibrary) as I was reading the forum for IPhone-specific compilations.
This is my configuration statement: (The config file FREESCALE5329 can be found inside the attached diff-file)
./configure --config=FREESCALE5329 --omit=Data/MySQL,Data/ODBC,Crypto,NetSSL_OpenSSL,PageCompiler --static --no-sharedmemory --no-fpenvironment --no-sharedlibs --no-wstring --no-tests --no-samples
I have attached a diff-file which shows the configuration that I am using, plus the alterations that I made to the source-code.
The real problem starts when I try to link a simple program against the static libraries that have been created. Here i run into errors such as:
/home/user/amb2012/freescale-coldfire-2011.09/bin/m68k-uclinux-g++ -o config_test config_test.o --start-group /home/user/amb2012/poco-1.4.4-all/lib/Linux/FS5329/libPocoXML.a /home/user/amb2012/poco-1.4.4-all/lib/Linux/FS5329/libPocoUtil.a /home/user/amb2012/poco-1.4.4-all/lib/Linux/FS5329/libPocoFoundation.a --end-group -lpthread
/home/user/amb2012/poco-1.4.4-all/lib/Linux/FS5329/libPocoUtil.a(AbstractConfiguration.o): In function `Poco::Util::AbstractConfiguration::~AbstractConfiguration()':
AbstractConfiguration.cpp:(.text+0x1fa): undefined reference to `__sync_sub_and_fetch_4'
AbstractConfiguration.cpp:(.text+0x294): undefined reference to `__sync_sub_and_fetch_4'
AbstractConfiguration.cpp:(.text+0x32a): undefined reference to `__sync_sub_and_fetch_4'
Also the libraries seem to be shot, since I am getting:
XMLConfiguration.cpp:(.text+0x382): undefined reference to `typeinfo for Poco::XML::Element'
XMLConfiguration.cpp:(.text+0x388): undefined reference to `typeinfo for Poco::XML::Node'
XMLConfiguration.cpp:(.text+0x3a2): undefined reference to `Poco::XML::Element::getAttribute(std::string const&) const'
XMLConfiguration.cpp:(.text+0x3cc): undefined reference to `Poco::XML::Element::getAttribute(std::string const&) const'
XMLConfiguration.cpp:(.text+0x43a): undefined reference to `typeinfo for Poco::XML::Element'
XMLConfiguration.cpp:(.text+0x442): undefined reference to `typeinfo for Poco::XML::Node'
I placed the libs between a start- and end-group in the hope this would resolve it.
I must confess that I do not have extensive experience with cross-compiling, maybe I am overlooking something very basic here.
Any direction would be greatly appreciated,
Kind regards,
Fabian





