mit-biomimetics / Cheetah-Software

MIT License
2.61k stars 926 forks source link

have some problem when build on TI-am572x #38

Open Savoyyang opened 4 years ago

Savoyyang commented 4 years ago

Hi everyone, I see that the document says that it supports embedded devices, so I plan to transplant to TI's AM5728-evm, and then I made the following changes.

First, I blocked sim (QT) and then manually compiled the lcm library. Second, I started to compile the problems encountered, I adopted the method of shielding ` mkdir build

cd build

cmake -DMINI_CHEETAH_BUILD=TRUE -DEMBEDDED=TRUE ..

./../scripts/make_types.sh

make -j2 `

cmake error: /nfsboot/mini_demo_x7/third-party/casadi/CMakeLists.txt if(FORTRAN_REQUIRED)

enable_language(Fortran)

set(Fortran_language_works ON)

if(WITH_IPOPT)

find_package(IPOPT REQUIRED)

endif()

build error: Scanning dependencies of target casadi_rootfinder_kinsol /usr/lib/gcc/arm-linux-gnueabi/7.2.1/../../../../arm-linux-gnueabi/bin/ld: ../../../lib/libcasadi_sundials.a(nvector_serial.c.o): relocation R_ARM_MOVW_ABS_NC against `N_VClone_Serial' can not be used when making a shared object; recompile with -fPIC ../../../lib/libcasadi_sundials.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: [third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_sundials_common.dir/build.make:97: third-party/casadi/lib/libcasadi_sundials_common.so.3.5] Error 1 make[1]: [CMakeFiles/Makefile2:2922: third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_sundials_common.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 65%] Building CXX object third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_rootfinder_kinsol.dir/kinsol_interface_meta.cpp.o [ 65%] Building CXX object third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_rootfinder_kinsol.dir/kinsol_interface.cpp.o

[ 66%] Linking CXX shared library ../../../lib/libcasadi_rootfinder_kinsol.so /usr/lib/gcc/arm-linux-gnueabi/7.2.1/../../../../arm-linux-gnueabi/bin/ld: ../../../lib/libcasadi_sundials.a(nvector_serial.c.o): relocation R_ARM_MOVW_ABS_NC against N_VClone_Serial' can not be used when making a shared object; recompile with -fPIC ../../../lib/libcasadi_sundials.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[2]: *** [third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_rootfinder_kinsol.dir/build.make:123: third-party/casadi/lib/libcasadi_rootfinder_kinsol.so.3.5] Error 1 make[1]: *** [CMakeFiles/Makefile2:2960: third-party/casadi/casadi/interfaces/sundials/CMakeFiles/casadi_rootfinder_kinsol.dir/all] Error 2 make: *** [Makefile:152: all] Error 2 root@am57xx-evm:/nfsboot/mini_demo_x7/build# /usr/lib/gcc/arm-linux-gnueabi/7.2.1/../../../../arm-linux-gnueabi/bin/ld: ../../../lib/libcasadi_sundials.a(nvector_serial.c.o): relocation R_ARM_MOVW_ABS_NC againstN_VClone_Serial' can not be used when making a shared object; recompile with -fPIC -sh: syntax error near unexpected token `('

if(WITH_SUNDIALS)

add_subdirectory(sundials)

endif()

if(WITH_CSPARSE)

add_subdirectory(csparse)

endif()

if(WITH_TINYXML)

add_subdirectory(tinyxml)

endif()

build error: could not found /nfsboot/mini_demo_x7/third-party/JCQP/CholeskySparseSolver.cpp // #include

/nfsboot/mini_demo_x7/third-party/JCQP/CholeskyDenseSolver.cpp // #include

Finally stuck when build ‘common/CMakeFiles/biomimetics.dir/src/Dynamics/FloatingBaseModel.cpp.o’ ,did not report an error.Can someone help with the same problem, thank you very much

` root@am57xx-evm:/nfsboot/mini_demo_x7/build# make -j2 [ 3%] Built target JCQP

[ 8%] Built target dynacore_yaml-cpp [ 8%] Built target inih [ 8%] Built target qdldlobject [ 8%] Built target linsys_qdldl [ 9%] Built target imu [ 11%] Built target lord_imu [ 13%] Built target soem [ 14%] Built target serial [ 14%] Built target Goldfarb_Optimizer [ 18%] Built target libvnc [ 20%] Built target qdldl [ 20%] Built target osqpstatic [ 20%] Built target qdldlstatic [ 23%] Built target qpOASES [ 25%] Built target test_imu [ 28%] Built target yaml-cpp [ 28%] Built target casadi_tinyxml [ 37%] Built target casadi_csparse [ 46%] Built target casadi_sundials [ 46%] Built target serial_example [ 47%] Built target gtest [ 47%] Built target WBIC [ 47%] Built target dynacore_param_handler [ 48%] Built target osqp [ 58%] Built target qdldl_example [ 63%] Built target casadi [ 64%] Built target yaml-cpp-parse [ 64%] Built target yaml-cpp-read [ 65%] Built target yaml-cpp-sandbox [ 65%] Built target casadi_rootfinder_fast_newton [ 66%] Built target casadi_interpolant_linear [ 66%] Built target casadi_integrator_collocation [ 67%] Built target casadi_importer_shell [ 68%] Built target casadi_rootfinder_newton [ 69%] Built target casadi_conic_nlpsol [ 69%] Built target casadi_nlpsol_scpgen [ 70%] Built target casadi_linsol_lsqr [ 71%] Built target casadi_integrator_rk [ 71%] Built target casadi_conic_qrqp [ 71%] Built target casadi_rootfinder_nlpsol [ 71%] Built target casadi_interpolant_bspline [ 72%] Built target casadi_nlpsol_sqpmethod [ 73%] Built target casadi_linsol_symbolicqr [ 73%] Built target casadi_linsol_qr [ 73%] Built target casadi_linsol_ldl [ 73%] Built target gmock [ 73%] Built target gtest_main [ 73%] Built target libs [ 73%] Built target gmock_main [ 73%] Building CXX object common/CMakeFiles/biomimetics.dir/src/Dynamics/FloatingBaseModel.cpp.o `

qiayuanl commented 4 years ago

Build Casadi on ARM looks like has some problem? You can block Casadi since it is useless.

Savoyyang commented 4 years ago

Build Casadi on ARM looks like has some problem? You can block Casadi since it is useless. Thank you for your reply, I followed your suggestion, but it has no effect, still stuck on compilation