Error while trying to run ARGoS3 examples

Requests regarding how to set up experiments in ARGoS.
svk
Posts: 3
Joined: Thu Jan 08, 2015 10:15 am

Error while trying to run ARGoS3 examples

Postby svk » Fri Jan 09, 2015 6:57 am

Error message "argos3: error while loading shared libraries: libargos3core_simulator.so: cannot open shared object file: No such file or directory"

I looked for the file and it is present in build_simulator/core. Why is argos3 not able to find it? :?: :!:

Please help,
Thank you.

pincy
Site Admin
Posts: 637
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error while trying to run ARGoS3 examples

Postby pincy » Sun Jan 11, 2015 5:15 am

Hi,

You need to install ARGoS3 system-wide. You can do it following the instructions here: https://github.com/ilpincy/argos3#insta ... d-binaries.

Cheers!
Carlo
I made ARGoS.

svk
Posts: 3
Joined: Thu Jan 08, 2015 10:15 am

Re: Error while trying to run ARGoS3 examples

Postby svk » Sun Jan 11, 2015 8:58 am

Hi Carlo,

I had followed those instructions the first time itself. Nevertheless I did it again, multiple times, and I encountered the same error.

I noticed that there was a directory argos2 in usr/lib/ but no argos3. So I created a directory named argos3 and copied libargos3core_simulator.so into it. It seemed to have solved it.

Now I get this warning, [WARNING] Can't open library "./build/controllers/footbot_diffusion/libfootbot_diffusion": ./build/controllers/footbot_diffusion/libfootbot_diffusion: cannot open shared object file: No such file or directory

But the simulation ran as expected, despite the warning.

Are there any other shared object files that I have to copy into usr/lib/argos3 ?

Thanks and Cheers,
Venkat

svk
Posts: 3
Joined: Thu Jan 08, 2015 10:15 am

Re: Error while trying to run ARGoS3 examples

Postby svk » Sun Jan 11, 2015 10:00 am

Update : Debugging the warning was pretty straightforward. The extension .so was missing in the <footbot_diffusion_controller ..> tag

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Error while trying to run ARGoS3 examples

Postby M_Rizk » Wed Jul 08, 2015 3:45 am

For anyone else who gets this error, I solved it by following the instructions at this page:

https://lonesysadmin.net/2013/02/22/err ... ject-file/

Essentially, the problem is that the .so files are located in usr/local/lib and the dynamic linker doesn't check that directory. If you have root priviliges, you just add usr/local/lib in the last line of /etc/ld.so.conf and that should fix it. If you don't have root priviliges, the article mentions that too.

pincy
Site Admin
Posts: 637
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error while trying to run ARGoS3 examples

Postby pincy » Wed Jul 08, 2015 3:52 am

The fix you're mentioning works on some distributions, but not on all. Some distributions use the /etc/ld.so.conf.d/ directory, in which the ARGoS installer puts a dedicated file automatically.

Other distributions don't use this directory (but they're becoming rare, because it's the old system), and require you to edit /etc/ld.so.conf as you correctly posted. In this case, you get the above error.

Moral of the story: always specify the type of distribution you're using :-)

Final word: thanks for linking the article and taking the time to share! :-)
I made ARGoS.

Tameem
Posts: 1
Joined: Thu Apr 11, 2024 10:17 pm

Re: Error while trying to run ARGoS3 examples

Postby Tameem » Thu Apr 11, 2024 10:22 pm

I have installed argos in Linux (Ubuntu 22.04).
While create build folder and run cmake, I encounter with this error. Need help.

-- Build files have been written to: /home/tameem/Downloads/neatfa/argos/build
[ 2%] Automatic MOC for target iAnt_controller
[ 2%] Built target iAnt_controller_autogen
[ 4%] Building CXX object source/CMakeFiles/iAnt_controller.dir/iAnt_controller_autogen/mocs_compilation.cpp.o
[ 6%] Building CXX object source/CMakeFiles/iAnt_controller.dir/iAnt_controller.cpp.o
[ 8%] Building CXX object source/CMakeFiles/iAnt_controller.dir/iAnt_loop_functions.cpp.o
[ 10%] Building CXX object source/CMakeFiles/iAnt_controller.dir/iAnt_pheromone.cpp.o
[ 12%] Building CXX object source/CMakeFiles/iAnt_controller.dir/nn/Perceptron.cpp.o
[ 14%] Building CXX object source/CMakeFiles/iAnt_controller.dir/nn/Neuron.cpp.o
[ 16%] Building CXX object source/CMakeFiles/iAnt_controller.dir/nn/NeuralNetwork.cpp.o
[ 18%] Building CXX object source/CMakeFiles/iAnt_controller.dir/ga/Chromosome.cpp.o
[ 20%] Building CXX object source/CMakeFiles/iAnt_controller.dir/nn/NeuralNetFactory.cpp.o
[ 22%] Building CXX object source/CMakeFiles/iAnt_controller.dir/nn/ValueNeuron.cpp.o
[ 25%] Building CXX object source/CMakeFiles/iAnt_controller.dir/ga/BasicGA.cpp.o
[ 27%] Building CXX object source/CMakeFiles/iAnt_controller.dir/ga/Unique.cpp.o
[ 29%] Building CXX object source/CMakeFiles/iAnt_controller.dir/ga/ChromosomeFactory.cpp.o
[ 31%] Linking CXX shared library libiAnt_controller.so
/usr/bin/ld: cannot find -largos3core_simulator: No such file or directory
/usr/bin/ld: cannot find -largos3plugin_simulator_entities: No such file or directory
/usr/bin/ld: cannot find -largos3plugin_simulator_footbot: No such file or directory
/usr/bin/ld: cannot find -largos3plugin_simulator_genericrobot: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [source/CMakeFiles/iAnt_controller.dir/build.make:289: source/libiAnt_controller.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:108: source/CMakeFiles/iAnt_controller.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

pincy
Site Admin
Posts: 637
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Error while trying to run ARGoS3 examples

Postby pincy » Tue May 07, 2024 4:43 pm

This error is unrelated to the thread, which is about linking at run-time. This error happens during compilation. It looks like ARGoS is not correctly installed or your CMakeList.txt file is incorrect. Can you share how you installed ARGoS and what the root CMakeLists.txt file looks like?
I made ARGoS.


Return to “How to... ?”