#StackBounty: #apt #c++ #cmake #g++ #boost Trying to build with boost filesystem: relocation … can not be used when making a shared o…

Bounty: 100

Ubuntu 18.04, boost 1.65, g++ 7.5.0, cmake 3.10.2, GNU make 4.1. Pretty much everything at the default version for ubuntu 18.04.

I’m trying to port software that uses a number of different boost components to an NVidia Jetson TX2 board… which uses the aforementioned version of ubuntu on it’s dev board and host machine.

The hurdle I’m trying to clear at the moment is that linking the first shared lib in cmake: add_library(<name> SHARED ...) fails in g++ with the error from the title. The ‘blah blah blah’ portion mentions a specific entry point within boost filesystem.

I conclude that I need to rebuild boost filesystem with the requested build flags, -fPIC.

Do I need to download the boost source directly and rebuild it, or can I do something with the apt installed -dev boost module[s]?

I’ll also need to cross compile them for arm (currently on amd64) so any advice there would be welcome too, but mostly just trying to get boost to link here.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.