UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
1,941 Views
Registered: ‎10-08-2016

Upgrading libraries to Petalinux 2016.4

Jump to solution

I'm making progress on my 2015.4-to-2016.4 upgrade, but now I have two issues with pre-built libraries.  Boost is the biggest, so I'll use it as an example.

 

1.  It's customary to install libraries in two parts: one part is the full binary with version information embedded in the filename (such as libboost_graph.so.1.60.0) and a symbolic link to that file, but without version information (libboost_graph.so -> libboost_graph.so.1.60.0).  In Petalinux 2016.4, it was a simple matter of including a line like this in the install: target of a Makefile in the components/libs/xxx folder:

   cp -RP $SRC/usr/lib* ${TARGETDIR}/usr/lib

The -P option would correctly preserve the symlinks, and all was good.  Now, with a similar line in the appropriate .bb file's do_install() function, I have this:

   cp -RP ${STAGING}/usr/lib/libboost* ${D}${libdir}
and the links don't get copied, only the main binary file.  What do I need to do to retain the links?

 

2.  As a diagnostic step, I manually re-instated the links, but ran into another problem.  One of my libraries (UHD) comes with a collection of utilities and examples, all of which worked correctly under Petalinux 2015.4, but now will not load at all under Petalinux 2016.4.  The shell says "No file or directory", when in fact the file is definitely there with execute permissions for all.  I believe the root cause is the shared libraries.  I note that they were built with arm-linux-gnueabi-g++, whereas everything under 2016.4 seems to be built with arm-linux-gnueabihf-g++.  I do know that when I try to build a new project under 2016.4 referencing the other library, I get linker errors (undefined reference).  Does anyone have any experience with such problems?  I'm certainly willing to rebuild the three libraries in question under 2016.4, but I have not seen any documentation on how to accomplish that.

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
3,418 Views
Registered: ‎10-08-2016

Re: Upgrading libraries to Petalinux 2016.4

Jump to solution

And now, finally, some answers.

 

1.  The error was mine when I originally built the libraries and copied them into my "staging" directory, I failed to include the -P option to the cp command.  So the originals did not have the symlinks.

 

2.  Xilinx, in its silent wisdom, has changed the C++ compiler from arm-xilinx-linux-gnueabi-g++ to  arm-linux-gnueabihf-g++.  At least, that's the conclusion I'm driven to by having re-compiled Boost with the abihf compiler and now I can compile one of my own apps that uses Boost.  I'm sure there's a perfectly good reason for that change.  It might be enlightening to know what that reason might be.

0 Kudos
1 Reply
Explorer
Explorer
3,419 Views
Registered: ‎10-08-2016

Re: Upgrading libraries to Petalinux 2016.4

Jump to solution

And now, finally, some answers.

 

1.  The error was mine when I originally built the libraries and copied them into my "staging" directory, I failed to include the -P option to the cp command.  So the originals did not have the symlinks.

 

2.  Xilinx, in its silent wisdom, has changed the C++ compiler from arm-xilinx-linux-gnueabi-g++ to  arm-linux-gnueabihf-g++.  At least, that's the conclusion I'm driven to by having re-compiled Boost with the abihf compiler and now I can compile one of my own apps that uses Boost.  I'm sure there's a perfectly good reason for that change.  It might be enlightening to know what that reason might be.

0 Kudos