Overview
Features
Download
Documentation
Community
Add-Ons & Services

Linking problems when using POCO with ARM

Please post support and help requests here.

Linking problems when using POCO with ARM

Postby throstur62 » 09 Dec 2013, 13:54

I have a problem porting POCO 1.4.6p2 to ARM based platform. I have successfully maked all the POCO libraries and installed those using cross-compiling and a ToolChain from Karo Electronics for their TX28 board (http://www.karo-electronics.com/tx28.html).
However when I try to link to any of the dynamic release POCO libraries, f. ex. libPocoFoundation.so I get link errors like this:

Linking CXX executable hellodingo
/home/armsdk/projects/poco/install/lib/libPocoFoundation.so: undefined reference to `Poco::Channel::setProperty(std::string const&, std::string const&)'
/home/armsdk/projects/poco/install/lib/libPocoFoundation.so: undefined reference to `Poco::LoggingRegistry::channelForName(stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> > const&) const'
/home/armsdk/projects/poco/install/lib/libPocoFoundation.so: undefined reference to `Poco::SystemException::SystemException(std::string const&, int)'
/home/armsdk/projects/poco/install/lib/libPocoFoundation.so: undefined reference to `Poco::RegularExpressionException::RegularExpressionException(std::string const&, int)'
...

However if I link instead to the dynamic debug version of the POCO libraries, f.ex. libPocoFoundationd.so, everything links without a problem.

This is also true if I try to build the POCO libraries and do not omit PageCompiler,PageCompiler/File2Page which are executables needing PocoFoundation and more POCO libraries.

I'm using version gcc and g++ version 4.7.2 (the cross compiler).
I'm using the STLport v. 5.2.1 when building the POCO libraries.

What can be causing this link-difference between the release and debug version of the POCO libraries?
throstur62
 
Posts: 9
Joined: 22 Nov 2012, 18:44

Re: Linking problems when using POCO with ARM

Postby guenter » 09 Dec 2013, 17:57

That's a rather strange error because all these undefined symbols are actually defined in PocoFoundation.so. Can you share the commands that you use to build Poco?
guenter
 
Posts: 1091
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Linking problems when using POCO with ARM

Postby throstur62 » 09 Dec 2013, 19:11

I downloded POCO 1.4.6.p2-all.tar.gz from pocoproject.org
and exploded it on my Linux Mint virtual machine.
Then I took a copy of ~/projects/poco/poco-1.4.6p2-all/build/config/ARM-Linux
and then changed the ARM-Linux file such:
STLPORT_INCLUDE = /home/armsdk/projects/STLport/install/include/stlport
STLPORT_LIB = /home/armsdk/projects/STLport/install/arm-926ejs-linux-gnueabi-lib
TOOL = arm-926ejs-linux-gnueabi
Then I ran:
./configure --config=ARM-Linux --no-tests --no-samples --omit=Data/MySQL,NetSSL_OpenSSL,Crypto,PageCompiler,PageCompiler/File2Page
make
make install

If I instead run:
./configure --config=ARM-Linux --no-tests --no-samples --omit=Data/MySQL,NetSSL_OpenSSL,Crypto
make
Building PageCompiler will fail with the previously explained errors.
throstur62
 
Posts: 9
Joined: 22 Nov 2012, 18:44

Re: Linking problems when using POCO with ARM

Postby guenter » 09 Dec 2013, 21:46

Try building without STLport (use DigiEL, ELDK or Angstrom as template for your build configuration).
guenter
 
Posts: 1091
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Linking problems when using POCO with ARM

Postby throstur62 » 10 Dec 2013, 14:52

Now I get a little frusturated as the POCO release I downlaoded is stating in the file {POCOdir}/build/config/ARM-Linux this comment:
# Make settings for ARM Linux/gcc 2.95.3 (cross-compile, using STLport 4.6.2)
So I thought that was the only way to compile using the STLport.
...and I realy wonder why?!?

Well anyway I took the Armstrong setup file as it was the only one that was setup for Dynamic Link Libraries (not Static). I changed it to use our ToolChain, ran ./config and then make. Wolla everything compiled and everyting seems to be working propperly now.

But why this STLPort thing with the ARM-Linux setup file??!! I just wonder why it was needed?
throstur62
 
Posts: 9
Joined: 22 Nov 2012, 18:44

Re: Linking problems when using POCO with ARM

Postby guenter » 10 Dec 2013, 16:03

The requirement for STLport was because of the GCC version (2.95.3) used in that configuration, which had various issues in the standard library implementation.
That was a long time ago, and I guess nobody's using GCC 2.95 anymore, so we should remove this configuration to avoid confusion in the future.
Btw, you can build static and shared with all build configurations, the difference is just what is the default.
guenter
 
Posts: 1091
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest