Page 1 of 2

linkage error when trying to run argos3

Posted: Wed Jan 05, 2022 9:07 pm
by YonTan
Hi,

I synced to beta59, uninstall old branch and followed the instructions from README file.
when i run
argos3/build_simulator/core$ ./argos3 -q all
I get the following error:

Code: Select all

[quote][b][INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/core/libargos3core_simulator.so" [INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/visualizations/qt-opengl/libargos3plugin_simulator_qtopengl.so" [INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics2d/libargos3plugin_simulator_dynamics2d.so" [INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_magnetism.so" [INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_floor.so" [INFO] Loaded library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_gravity.so" [FATAL] Can't load library "/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so" after trying the following: /home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so: /home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/block/libargos3plugin_simulator_block.so: undefined symbol: _ZTIN5argos18CSimpleRadioMediumE /home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so.so: /home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so.so: cannot open shared object file: No such file or directory /home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so.so: /home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d/libargos3plugin_simulator_dynamics3d_srocs.so.so: cannot open shared object file: No such file or directory[/b][/quote]
any idea what i did wrong ?

thank you!

Re: linkage error when trying to run argos3

Posted: Wed Jan 05, 2022 9:12 pm
by pincy
Somehow you're linking ARGoS in the build directory, which is not a correct procedure. Just install ARGoS system-wide. Is there a reason why you're not using the packages?

Re: linkage error when trying to run argos3

Posted: Wed Jan 05, 2022 10:37 pm
by YonTan
Thank you for your reply.

I just followed the instructions from README:

Code: Select all

$ git clone https://github.com/ilpincy/argos3.git argos3 $ cd argos3 $ mkdir build_simulator $ cd build_simulator $ cmake ../src $ make $ make doc $ . setup_env.sh # or 'source setup_env.sh' $ cd core $ ./argos3 -q all # this shows
all the plugins recognized by ARGoS

Re: linkage error when trying to run argos3

Posted: Wed Jan 05, 2022 10:48 pm
by pincy
OK, I'll update the README to remove that procedure altogether :-) It's meant for me, normal users should install ARGoS system-wide.

Why are you compiling ARGoS from the sources, if your OS is Ubuntu? Why not using the packages?

If your intention is to add a new module to ARGoS, doing it by modifying the code in this repository is the wrong approach.

Anyway, the correct procedure is as follows:

Code: Select all

cd argos3 mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release .. make make doc sudo make install
Make sure no other version of ARGoS is installed anywhere.

Re: linkage error when trying to run argos3

Posted: Wed Jan 05, 2022 11:24 pm
by YonTan
Thank you for your answer.

I didn't use the package because it didn't work for me.
I deleted the source tree and uninstalled everything, and then install the package

Code: Select all

$sudo apt install ./argos3_simulator-3.0.0-x86_64-beta59.deb
Now, I downloaded the examples and run

Code: Select all

$ mkdir build $ cd build $ cmake -DCMAKE_MODULE_PATH=/usr/share/argos3/cmake/ -DCMAKE_BUILD_TYPE=Release ..
where /usr/share/argos3/cmake/ has ARGoSConfig and ARGoSSettings

Code: Select all

$ ls /usr/share/argos3/cmake/ ARGoSConfig.cmake FindARGoSQTOpenGL.cmake FindFreeImage.cmake FindPthreads.cmake ARGoSSettings.cmake FindDLFCN.cmake FindGooglePerfTools.cmake
and I'm getting the following error

Code: Select all

-- Found ARGoS: /usr/local/lib/argos3/libargos3core_simulator.so CMake Error at /usr/share/argos3/cmake/ARGoSConfig.cmake:109 (include): include could not find load file: ARGoSSettings Call Stack (most recent call first): CMakeLists.txt:22 (find_package) -- Configuring incomplete, errors occurred! See also "/home/ubuntu/argos3-examples/CMakeFiles/CMakeOutput.log".
I also update ARGOS_PLUGIN_PATH

Code: Select all

$ export ARGOS_PLUGIN_PATH=/home/ubuntu/argos3-examples/build
what an I missing ?

Thank you!!

Re: linkage error when trying to run argos3

Posted: Thu Jan 06, 2022 1:17 am
by pincy
The output you show reports that you still have another version of ARGoS installed in the system, and that confuses CMake.

Let's first make sure that ARGoS is completely cleared. This will wipe your previous attempts at installing ARGoS manually, which usually end up in /usr/local. The output you showed reports that some files are still there.

Code: Select all

sudo rm -rf /usr/local/bin/argos3 sudo rm -rf /usr/local/doc/argos3 sudo rm -rf /usr/local/include/argos3 sudo rm -rf /usr/local/lib/argos3 sudo rm -rf /usr/local/libexec/argos3 sudo rm -rf /usr/local/share/man/man1/argos3.1.gz sudo rm -rf /usr/local/share/argos3 sudo rm -rf /etc/ld.so.conf.d/argos3.conf
Then delete and reinstall the package:

Code: Select all

sudo apt rm argos3_simulator sudo apt install ./argos3_simulator-3.0.0-x86_64-beta59.deb
Test that the installation went OK using this command:

Code: Select all

argos3 -q all
You should see that all the libraries that are linked (written in green) are located in /usr/lib, and nowhere else. If you see extra stuff, something is wrong (please write back in that case).

Now it's time to compile the examples:

Code: Select all

cd argos3-examples rm -rf build mkdir build cmake ../src make
And let's test them:

Code: Select all

cd argos3-examples argos3 -c experiments/diffusion_10.argos

Re: linkage error when trying to run argos3

Posted: Thu Jan 06, 2022 7:38 am
by YonTan
Thank you very much for the detailed answer!

I deleted everything before the output I sent earlier. Did it again now, and this is the output of argos3 -q all:

Code: Select all

$ argos3 -q all ARGOS_PLUGIN_PATH problem terminate called after throwing an instance of 'char const*' Aborted (core dumped)
where ARGOS_PLUGIN_PATH is

Code: Select all

$ echo ${ARGOS_PLUGIN_PATH} /home/ubuntu/orig_argos/argos3/build_simulator/core:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/visualizations/qt-opengl:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics2d:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/dynamics3d:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/physics_engines/pointmass3d:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/media:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/simulator/entities:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/generic:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/builderbot:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/drone:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/foot-bot:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/eye-bot:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/e-puck:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/pi-puck:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/spiri:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/prototype:/home/ubuntu/orig_argos/argos3/build_simulator/plugins/robots/block
I removed all paths from ARGOS_PLUGIN_PATH but I get the same result :(

Thank you very much for your help!!

Re: linkage error when trying to run argos3

Posted: Thu Jan 06, 2022 7:43 am
by pincy
ARGOS_PLUGIN_PATH should not contain anything at all, how did you set that value? What commands do you run to do it?

Make sure that you try this:

Code: Select all

unset ARGOS_PLUGIN_PATH argos3 -q all
and that nowhere in your .bashrc, .profile you have commands to set that variable.

Re: linkage error when trying to run argos3

Posted: Thu Jan 06, 2022 7:54 am
by YonTan
ok, thanks!

Now this is the output I get - is it expected ?

Code: Select all

$ argos3 -q all [WARNING] Error opening directory "/usr/local/lib/argos3/": No such file or directory AVAILABLE ACTUATORS AVAILABLE SENSORS AVAILABLE PHYSICS ENGINES AVAILABLE MEDIA AVAILABLE VISUALIZATIONS AVAILABLE ENTITIES [ floor ] It contains the properties of the arena floor.

Re: linkage error when trying to run argos3

Posted: Thu Jan 06, 2022 7:58 am
by YonTan
Anyway, I'm getting the same results when compiling the examples:

Code: Select all

~/argos3-examples/build$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_MODULE_PATH=/usr/share/argos3/cmake/ .. -- Found ARGoS: /usr/local/lib/argos3/libargos3core_simulator.so CMake Error at /usr/share/argos3/cmake/ARGoSConfig.cmake:109 (include): include could not find load file: ARGoSSettings Call Stack (most recent call first): CMakeLists.txt:22 (find_package) -- Configuring incomplete, errors occurred! See also "/home/ubuntu/argos3-examples/CMakeFiles/CMakeOutput.log".