leggedrobotics / elevation_mapping_cupy

Elevation Mapping on GPU.
MIT License
553 stars 117 forks source link

undefined reference to `ffi_closure_alloc@LIBFFI_CLOSURE_7.0' #104

Open benijohn opened 1 month ago

benijohn commented 1 month ago

Hi, I have been working on getting this built on a Jetson Orin AGX for the last few days and I am out of ideas. I first had issues with opencv as the version installed with apt did not include the xphoto directory.. after some questionable work, I rebuilt opencv from scratch and copied the files into the /usr/include path and finally got past that issue. However, I have been getting this error all along as well. I originally thought they might be related(and they might still be?) but I am not sure what try next.

/usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_closure_alloc@LIBFFI_CLOSURE_7.0' /usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference toffi_prep_closure_loc@LIBFFI_CLOSURE_7.0' /usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_type_uint8@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference toffi_prep_cif@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference to ffi_type_pointer@LIBFFI_BASE_7.0' /usr/bin/ld: /lib/aarch64-linux-gnu/libp11-kit.so.0: undefined reference toffi_type_uint64@LIBFFI_BASE_7.0' collect2: error: ld returned 1 exit status

I reinstalled both libffi and libp11-kit. I tried catkin_make clean. I have also checked they are linked by running:

$ ldd /lib/aarch64-linux-gnu/libp11-kit.so.0 linux-vdso.so.1 (0x0000ffff95a4e000) /usr/lib/aarch64-linux-gnu/libffi.so.7 (0x0000ffff958b9000) libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff9585b000) libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff9582a000) libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff956b7000) /lib/ld-linux-aarch64.so.1 (0x0000ffff95a1e000)

The paths appear correct to me.

Any ideas on what to try next? Has anyone seen this issue before? It seems most things online point to a missing ffi library, but that is not the case here.

Gatswei commented 2 weeks ago

I encounter the same problem. Have you solved it?

benijohn commented 2 weeks ago

Not yet. I am reflashing my Jetson with a clean JetPack install and will try again later today. I will update here if I have any luck. I have built this successfully many times on x64 machines so this seems to be Jetson related. Are you also on Jetson?