I try to manully compile Freecad from the latest github and have the following errors when I make:
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_closure_alloc@LIBFFI_CLOSURE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_uint8@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_prep_closure_loc@LIBFFI_CLOSURE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_uint64@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_type_pointer@LIBFFI_BASE_7.0'
/usr/bin/ld: /lib/x86_64-linux-gnu/libp11-kit.so.0: undefined reference to `ffi_prep_cif@LIBFFI_BASE_7.0'
collect2: error: ld returned 1 exit status
make[2]: *** [tests/src/Base/CMakeFiles/Tests_Tools_run.dir/build.make:128: tests/src/Base/Tests_Tools_run] Error 1
make[1]: *** [CMakeFiles/Makefile2:7332: tests/src/Base/CMakeFiles/Tests_Tools_run.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
I have installed libffi-dev on ubuntu 20.04 but i dont know why it fails to compile
-KP
[Solved] Build fail with undefned ffi references
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Solved] Build fail with undefned ffi references
Last edited by lqfjun88 on Fri Jan 27, 2023 1:13 pm, edited 1 time in total.
Re: Build fail with undefned ffi references
Managed to solve this issue by making the following changes in 3 CMakeLists.txt by adding -lffi to link libffi library:
Replace CMakeLists.txt with the following files in the directory (remember to rename the files to CMakeLists.txt:
CMakeLists1.txt : tests/
CMakeLists2.txt : tests/src/Base
CMakeLists3.txt : src/Main
Replace CMakeLists.txt with the following files in the directory (remember to rename the files to CMakeLists.txt:
CMakeLists1.txt : tests/
CMakeLists2.txt : tests/src/Base
CMakeLists3.txt : src/Main
- Attachments
-
- CMakeLists3.txt
- (4.43 KiB) Downloaded 345 times
-
- CMakeLists2.txt
- (324 Bytes) Downloaded 93 times
-
- CMakeLists1.txt
- (2.03 KiB) Downloaded 160 times