Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: casadi_interface_g_proxg #5

Open
Subhankhan41 opened this issue Sep 16, 2020 · 6 comments
Open

undefined symbol: casadi_interface_g_proxg #5

Subhankhan41 opened this issue Sep 16, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@Subhankhan41
Copy link

Hello,

I tried running some of the demos and got some casadi based errors. I changed my Casadi version to 3.4.5 as per (#2) and still couldn't resolve the issue. I tried the TwoCricTrailer.m and it completes 100% but gives the error at the end: Could you please resolve it. Thanks

GENERATING output folders of controller:
../test_controller_builds/demo_controller_matlab: folder already exists, leaving it in place
../test_controller_builds/demo_controller_matlab/casadi: folder already exists, leaving it in place
../test_controller_builds/demo_controller_matlab/globals: folder already exists, leaving it in place
../test_controller_builds/demo_controller_matlab/include: folder already exists, leaving it in place
../test_controller_builds/demo_controller_matlab/PANOC: folder already exists, leaving it in place
../test_controller_builds/demo_controller_matlab/python_interface: folder already exists, leaving it in place
GENERATING PANOC
../test_controller_builds/demo_controller_matlab/PANOC/buffer.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/buffer.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/casadi_definitions.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/lbfgs.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/lbfgs.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/lipschitz.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/lipschitz.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/matrix_operations.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/matrix_operations.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/nmpc.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/panoc.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/panoc.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/proximal_gradient_descent.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/proximal_gradient_descent.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/casadi_interface.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/casadi_interface.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/include/nmpc.h: file already exists, replacing it
GENERATING static globals
../test_controller_builds/demo_controller_matlab/globals/globals.h: file already exists, replacing it
GENERATING python interface
../test_controller_builds/demo_controller_matlab/python_interface/nmpc_python.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/python_interface/nmpc_python.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/python_interface/timer.h: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/python_interface/timer_linux.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/python_interface/timer_windows.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/python_interface/timer_mac.c: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/libpython_interface.h: file already exists, replacing it
GENERATING Build system
../test_controller_builds/demo_controller_matlab/CMakeLists.txt: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/PANOC/CMakeLists.txt: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/casadi/CMakeLists.txt: file already exists, replacing it
../test_controller_builds/demo_controller_matlab/casadi/cost_function.c already exists: removing file...
../test_controller_builds/demo_controller_matlab/casadi/cost_function.h already exists: removing file...
../test_controller_builds/demo_controller_matlab/casadi/cost_function_derivative_combined.c already exists: removing file...
../test_controller_builds/demo_controller_matlab/casadi/cost_function_derivative_combined.h already exists: removing file...
Generating globals file at: ../test_controller_builds/demo_controller_matlab/globals/globals_dyn.h
../test_controller_builds/demo_controller_matlab/casadi/integrator.c already exists: removing file...
../test_controller_builds/demo_controller_matlab/casadi/integrator.h already exists: removing file...
../test_controller_builds/demo_controller_matlab/casadi/g.c already exists, removing it before adding the new file
generating g-type function

ans =

Source_file_generator with properties:

     location: '../test_controller_builds/demo_controller_matlab/casadi/g.c'
function_type: 'g'

../test_controller_builds/demo_controller_matlab/casadi/proxg.c already exists, removing it before adding the new file
generating proxg-type function

ans =

Source_file_generator with properties:

     location: '../test_controller_builds/demo_controller_matlab/casadi/proxg.c'
function_type: 'proxg'

cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by cmake)
-- Detected the following casadi files: cost_function_derivative_combined.c;cost_function.c;integrator.c
-- No main.c detected in project root folder
-- Configuring done
-- Generating done
-- Build files have been written to: /home/subhan/Downloads/PANOC1/nmpc-codegen-master/test_controller_builds/demo_controller_matlab/build
cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Scanning dependencies of target CASADI_lib
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 6%] Building C object casadi/CMakeFiles/CASADI_lib.dir/cost_function_derivative_combined.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 12%] Building C object casadi/CMakeFiles/CASADI_lib.dir/cost_function.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 18%] Building C object casadi/CMakeFiles/CASADI_lib.dir/integrator.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 25%] Linking C static library libCASADI_lib.a
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 25%] Built target CASADI_lib
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Scanning dependencies of target PANOC_lib
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 31%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/buffer.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 37%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/casadi_interface.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 43%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/lbfgs.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 50%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/lipschitz.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 56%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/matrix_operations.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 62%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/nmpc.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 68%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/panoc.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 75%] Building C object PANOC/CMakeFiles/PANOC_lib.dir/proximal_gradient_descent.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 81%] Linking C static library libPANOC_lib.a
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 81%] Built target PANOC_lib
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Scanning dependencies of target python_interface
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 87%] Building C object CMakeFiles/python_interface.dir/python_interface/nmpc_python.c.o
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[ 93%] Linking C shared library libpython_interface.so
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
[100%] Built target python_interface
/usr/bin/cmake: /usr/local/MATLAB/R2018b/bin/glnxa64/libcurl.so.4: no version information available (required by /usr/bin/cmake)
Loading nmpc_panoc library \n
Error using loadlibrary
There was an error loading the library
"/home/subhan/Downloads/PANOC1/nmpc-codegen-master/nmpc-codegen-matlab-master/../test_controller_builds/demo_controller_matlab/build/libpython_interface.so"
/home/subhan/Downloads/PANOC1/nmpc-codegen-master/nmpc-codegen-matlab-master/../test_controller_builds/demo_controller_matlab/build/libpython_interface.so:
undefined symbol: casadi_interface_g_proxg

Error in nmpccodegen.tools.Simulator/load_library (line 77)
[notfound,warnings] = loadlibrary(lib_file_name,lib_file_header_name,'alias','nmpc_panoc');

Error in nmpccodegen.tools.Simulator (line 104)
obj.load_library();

Error in simulate_demo_trailer (line 9)
sim = nmpccodegen.tools.Simulator(trailer_controller.location);

Error in TwoCircTrailer (line 49)
[ state_history,time_history,iteration_history,input_history,~ ] =
simulate_demo_trailer(trailer_controller,initial_state,...

Caused by:
Error using loaddefinedlibrary
/home/subhan/Downloads/PANOC1/nmpc-codegen-master/nmpc-codegen-matlab-master/../test_controller_builds/demo_controller_matlab/build/libpython_interface.so:
undefined symbol: casadi_interface_g_proxg

@MelisWillem
Copy link

Hmm well it seems casadi is fine, the controller is generated and successfully compiled, this is the hard part. But when trying to load the binary it fails.

Could you provide a list of the files in : /home/subhan/Downloads/PANOC1/nmpc-codegen-master/nmpc-codegen-matlab-master/../test_controller_builds/demo_controller_matlab/build ?

And what operating system are you using?

@MelisWillem MelisWillem self-assigned this Sep 16, 2020
@MelisWillem MelisWillem added the bug Something isn't working label Sep 16, 2020
@Subhankhan41
Copy link
Author

Thank you for the reply.
I'm using Ubuntu 20.04, In the /home/subhan/Downloads/PANOC1/nmpc-codegen-master/nmpc-codegen-matlab-master/../test_controller_builds/demo_controller_matlab/build I'm getting the following:
1- CmakeCache.txt 2-cmake_install.cmake 3-libpython_interface.so 4-Makefile
Folders: Casadi, CmakeFiles, and PANOC.
Thanks

@MelisWillem
Copy link

MelisWillem commented Sep 17, 2020

@Subhankhan41 that all looks good, can you send me the whole demo_controller_matlab as zip? Please go into the build subfolder first and do "make clean". Then upload it somewhere and link it here, or send it via wetransfer to [removed email].

@Subhankhan41
Copy link
Author

Hello, I've e-mailed you the demo_controller_matlab as zip.

@MelisWillem
Copy link

MelisWillem commented Sep 18, 2020

@Subhankhan41 I think you found a bug indeed, I don't have matlab on my pc, but i do have python. And was able to reproduce the error.

I made a fix pushed it on on the branch feature/bug-fix, can you try this and see if the problem is resolved. If so then we can merge this to master.

@Subhankhan41
Copy link
Author

@Zilleplus Thanks a lot for fixing the bug. Works perfect!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants