Error when compiling Basler Camera Sample code on Jetson TX1

Hi all,

I installed Basler’s driver (http://www.baslerweb.com/en/support/downloads/software-downloads?type=28&series=0&model=0) for ARM (hardware float) according to the instructions in the INSTALL file.

Unfortunately when I try to run make in order to compile the samples in the ./Samples/C++ directory, I get the following error:

ubuntu@tegra-ubuntu:~/pylon-5.0.5.9000-armhf/Samples/C++$ make
for subDirectory in DeviceRemovalHandling Grab Grab_CameraEvents Grab_ChunkImage Grab_MultiCast Grab_MultipleCameras Grab_Strategies Grab_UsingActionCommand Grab_UsingBufferFactory Grab_UsingExposureEndEvent Grab_UsingGrabLoopThread Grab_UsingSequencer LegacySamples ParametrizeCamera_AutoFunctions ParametrizeCamera_Configurations ParametrizeCamera_GenericParameterAccess ParametrizeCamera_LoadAndSave ParametrizeCamera_LookupTable ParametrizeCamera_NativeParameterAccess ParametrizeCamera_Shading ParametrizeCamera_UserSets Utility_Image Utility_ImageFormatConverter Utility_ImageLoadAndSave; do \
        make -C $subDirectory PYLON_ROOT="/opt/pylon5" all; \
        if test $? -ne 0; then exit 1; fi; \
done
make[1]: Entering directory '/home/ubuntu/pylon-5.0.5.9000-armhf/Samples/C++/DeviceRemovalHandling'
g++ -Wl,--enable-new-dtags -Wl,-rpath,/opt/pylon5/lib -o DeviceRemovalHandling DeviceRemovalHandling.o -L/opt/pylon5/lib -Wl,-E -lpylonbase -lpylonutility -lGenApi_gcc_v3_0_Basler_pylon_v5_0 -lGCBase_gcc_v3_0_Basler_pylon_v5_0
/usr/bin/ld: skipping incompatible /opt/pylon5/lib/libpylonbase.so when searching for -lpylonbase
/usr/bin/ld: cannot find -lpylonbase
/usr/bin/ld: skipping incompatible /opt/pylon5/lib/libpylonutility.so when searching for -lpylonutility
/usr/bin/ld: cannot find -lpylonutility
/usr/bin/ld: skipping incompatible /opt/pylon5/lib/libGenApi_gcc_v3_0_Basler_pylon_v5_0.so when searching for -lGenApi_gcc_v3_0_Basler_pylon_v5_0
/usr/bin/ld: cannot find -lGenApi_gcc_v3_0_Basler_pylon_v5_0
/usr/bin/ld: skipping incompatible /opt/pylon5/lib/libGCBase_gcc_v3_0_Basler_pylon_v5_0.so when searching for -lGCBase_gcc_v3_0_Basler_pylon_v5_0
/usr/bin/ld: cannot find -lGCBase_gcc_v3_0_Basler_pylon_v5_0
collect2: error: ld returned 1 exit status
Makefile:21: recipe for target 'DeviceRemovalHandling' failed
make[1]: *** [DeviceRemovalHandling] Error 1
make[1]: Leaving directory '/home/ubuntu/pylon-5.0.5.9000-armhf/Samples/C++/DeviceRemovalHandling'
Makefile:34: recipe for target 'all' failed
make: *** [all] Error 1

Any thoughts on what to do to properly compile everything?

Which L4T release are you using ?

head -1 /etc/nv_tegra_release

Not sure about this, but it looks you’ve installed a 32 bits armhf library while you are on a TX1. This is more targeted to TK1. Older versions of L4T for TX1 have been using 32 bits userland, but the linker message makes me thinking to 32bits library not suitable for 64bits system.

I’m running R24.2.1. Do you have a pointer to versions which run 32 bit? Is there any way to get it to compile on a 64 bit system?

If you can find a package pylon-5.x.x.x-aarch64 and install it it would probably be the easiest way.

I cannot tell how to run 32bits libraries on a 64bits system, albeit this might not be impossible.

If you cannot get the binary aarch64 version, you can try to get the sources of pylon and compile by yourself on TX1, this would produce 64bits libraries and you would be able to link your samples against these 64bits libraries.

In this case, what is the latest version of L4T which is 32 bit?

Not sure at all about this, I think that last 32bits version for TX1 was R23.2 (JetPack 2.1).
You can check: https://developer.nvidia.com/embedded/jetpack-archive

Be aware that this will not be a solution for future improvements, 32bits is no longer supported on TX1, and this would stick you to cuda7.

It works fine at my side with the following up2date versions:

R32 (release), REVISION: 3.1, GCID: 18186506, BOARD: t210ref, EABI: aarch64, DATE: Tue Dec 10 06:58:34 UTC 2019

root@jetson-nano:/opt/pylon/share/pylon/Samples/C++# uname -a
Linux jetson-nano 4.9.140-tegra #1 SMP PREEMPT Mon Dec 9 22:47:42 PST 2019 aarch64 aarch64 aarch64 GNU/Linux

ii pylon 6.1.0.19674-deb0 arm64 Basler pylon Camera Software Suite
ii pylon-supplementary-package-for-mpeg-4 1.0.1.117-deb0 arm64 Basler pylon Supplementary Package for MPEG-4

root@jetson-nano:/opt/pylon/share/pylon/Samples/C++# make
for subDirectory in DeviceRemovalHandling Grab Grab_CameraEvents Grab_ChunkImage Grab_MultiCast Grab_MultipleCameras Grab_Strategies Grab_UsingActionCommand Grab_UsingBufferFactory Grab_UsingExposureEndEvent Grab_UsingGrabLoopThread Grab_UsingSequencer ParametrizeCamera_AutoFunctions ParametrizeCamera_Configurations ParametrizeCamera_GenericParameterAccess ParametrizeCamera_LoadAndSave ParametrizeCamera_LookupTable ParametrizeCamera_NativeParameterAccess ParametrizeCamera_Shading ParametrizeCamera_UserSets Utility_GrabVideo Utility_Image Utility_ImageDecompressor Utility_ImageFormatConverter Utility_ImageLoadAndSave Utility_IpConfig Utility_InstantInterface; do
make -C subDirectory PYLON_ROOT="/opt/pylon" all; \ if test ? -ne 0; then exit 1; fi;
done
make[1]: Entering directory ‘/opt/pylon/share/pylon/Samples/C++/DeviceRemovalHandling’
g++ -I/opt/pylon/include -c -o DeviceRemovalHandling.o DeviceRemovalHandling.cpp
g++ -Wl,–enable-new-dtags -Wl,-rpath,/opt/pylon/lib -o DeviceRemovalHandling DeviceRemovalHandling.o -L/opt/pylon/lib -Wl,-E -lpylonbase -lpylonutility -lGenApi_gcc_v3_1_Basler_pylon -lGCBase_gcc_v3_1_Basler_pylon
make[1]: Leaving directory ‘/opt/pylon/share/pylon/Samples/C++/DeviceRemovalHandling’