snapper dynamic link problem on armv[67]h, not aarch64

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

snapper dynamic link problem on armv[67]h, not aarch64

Postby jernst » Wed Feb 14, 2018 7:00 pm

I'm having difficulties with snapper on the RPi1 and 2:
$this->bbcode_second_pass_code('', '
% snapper -c 'root' --no-dbus create-config -t ubos-default '/
snapper: error while loading shared libraries: libboost_system.so.1.65.1: cannot open shared object file: No such file or directory
')
I suspect that's because the repos contain version 0.5.0-3 for armv6h and armv7h, while aarch64 has 0.5.4-1 (which is the current version on x86_64 as well).

Package boost-libs in 1.66.0-1 on all arch's, so no wonder it can't find the old library.

On aarch64 snapper has a build date of Feb 01. Is the build pipeline working on armv6h and armv7h?

Cheers,


Johannes.
jernst
 
Posts: 75
Joined: Tue Aug 20, 2013 4:22 pm
Location: Silicon Valley

Re: snapper dynamic link problem on armv[67]h, not aarch64

Postby jernst » Fri Feb 16, 2018 1:08 am

Result of the investigation so far:
  • armv6h and armv7h do not have newer executables because the build fails there. It works on aarch64 and x86_64.
  • specifically linking the snapper executable fails with this error:
    $this->bbcode_second_pass_code('', '/usr/bin/ld: ../snapper/.libs/libsnapper.so: undefined reference to symbol '_ZN5boost6system16generic_categoryEv'
    /usr/lib/gcc/armv7l-unknown-linux-gnueabihf/7.2.1/../../../libboost_system.so: error adding symbols: DSO missing from command line')
  • the symbol exists in boost-libs, and the build script does add them with -lboost_thread -lboost_system
  • I can get snapper to link if I manually move the boost libraries to the end of the link command, instead of the middle

Details:

makepkg attempts to run this link command, which fails:
$this->bbcode_second_pass_code('', '
/bin/sh ../libtool --tag=CXX --mode=link g++ -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o snapper snapper.o types.o commands.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o errors.o ../snapper/libsnapper.la utils/libutils.la ../dbus/libdbus.la -lbtrfs
')
Expanded into:
$this->bbcode_second_pass_code('', '
g++ -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/snapper snapper.o types.o commands.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o errors.o ../snapper/.libs/libsnapper.so utils/.libs/libutils.a /build/tmp/snapper/src/snapper-0.5.4/snapper/.libs/libsnapper.so -lboost_thread -lboost_system -lxml2 -lacl -lz -lmount ../dbus/.libs/libdbus.a -ldbus-1 -lbtrfs
')

By reordering the arguments, it works:
$this->bbcode_second_pass_code('', '
/bin/sh ../libtool --tag=CXX --mode=link g++ -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -o snapper snapper.o types.o commands.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o errors.o ../snapper/libsnapper.la utils/libutils.la ../dbus/libdbus.la -lbtrfs -lboost_thread -lboost_system
')
Expanded into:
$this->bbcode_second_pass_code('', '
g++ -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -O2 -pipe -fstack-protector-strong -fno-plt -std=c++11 -Wall -Wextra -Wformat=2 -Wnon-virtual-dtor -Wno-unused-parameter -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z -Wl,relro -Wl,-z -Wl,now -o .libs/snapper snapper.o types.o commands.o cleanup.o proxy.o proxy-dbus.o proxy-lib.o misc.o errors.o ../snapper/.libs/libsnapper.so utils/.libs/libutils.a /build/tmp/snapper/src/snapper-0.5.4/snapper/.libs/libsnapper.so -lxml2 -lacl -lz -lmount ../dbus/.libs/libdbus.a -ldbus-1 -lbtrfs -lboost_thread -lboost_system
')

I'm puzzled by it, because the only object file that complains about the missing symbols is ahead of the libraries in the command in either case.
jernst
 
Posts: 75
Joined: Tue Aug 20, 2013 4:22 pm
Location: Silicon Valley

Re: snapper dynamic link problem on armv[67]h, not aarch64

Postby jernst » Sat Feb 17, 2018 2:05 am

Compilation works when setting:

$this->bbcode_second_pass_code('', 'export LIBS="-lboost_thread -lboost_system"')

This causes those libraries to be appended one more time at the end of the relevant commands, and the package builds successfully. Now why that is needed ... idk.
jernst
 
Posts: 75
Joined: Tue Aug 20, 2013 4:22 pm
Location: Silicon Valley


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 6 guests