Closed jjrbfi closed 3 years ago
That's strange. I will have a look.
I did a workaround to solve this. Just curious, are you compiling on rpi4?
I still have that issue compiling it. Yes I'm using RPI4
Got the same this the last commit we have:
make: Leaving directory '/opt/hal-core/src' /opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so: file not recognized: file format not recognized collect2: error: ld returned 1 exit status cp: cannot stat 'dofs.so': No such file or directory
Maybe I missing some packages?
But I already installed all needed from src/README.md
try to do add ldconfig for the dir : $ sudo ldconfig /opt/hal-core/src/hal/components/dofs/cpp_interface I think when compiling the dofs.so it can not find the c++ directory.
Maybe try to add this in the make file of /opt/hal-core/src/hal/components/dofs/make
And can you manually copy a library file like : libdofs.so.1.0.0 to another place?
I got this error before your last edit:
ldconfig: /opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so.1 is not a symbolic link
/opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
cp: cannot stat 'dofs.so': No such file or directory
I have the libdofs.so.1.0.0 located in /opt/hal-core/rtlib right now. and in opt/hal-core/src/hal/components/dofs/cpp_interface
I also commented it and got al compiled (not the dofs) but will be nice to get that working also.
Hi, libdofs.so.1.0.0 is located in /rtlib when it is cloned. Maybe delete it from the /rtlib and let the compile procedure put it there.
The command to set a filepath for linux to search for libs is: sudo ldconfig /opt/hal-core/src/hal/components/dofs/cpp_interface/
It is a idea to use symoblic links. What output is above command given?
Ok, i removed the .so files from the /rtlib. During the make process, everything will be put over there.
I removed all the libdofs* from rtlib and them added sudo ldconfig /opt/hal-core/src/hal/components/dofs/cpp_interface/ and got this:
chown root ../bin/rtapi_app
chmod 4750 ../bin/rtapi_app
chown root ../bin/module_helper
chmod 4750 ../bin/module_helper
make: Leaving directory '/opt/hal-core/src'
ldconfig: /opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so.1 is not a symbolic link
/opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
cp: cannot stat 'dofs.so': No such file or directory
I think I missing some packages for that maybe?
Quite rare have that issue that I had not before.
Yes strange. Haha
Ok. let's comment out the dofs lib for now in the make file. Then we focus on the ethercat bus.
I will comment it you now.
I will recompile it changing cc to gcc.
https://github.com/grotius-cnc/hal-core/blob/main/src/hal/components/dofs/make#L6
Or should be cc?
just try it.
Nope. the problem still. -_-´
I will skip it for a bit to try to get EtherCAT working. Thanks!
Yes perfect !
Looks like the dofs.so is not created or not in the place.
make: Entering directory '/opt/hal-core/src' chown root ../bin/rtapi_app chmod 4750 ../bin/rtapi_app chown root ../bin/module_helper chmod 4750 ../bin/module_helper make: Leaving directory '/opt/hal-core/src' /opt/hal-core/src/hal/components/dofs/cpp_interface/libdofs.so: file not recognized: file format not recognized collect2: error: ld returned 1 exit status cp: cannot stat 'dofs.so': No such file or directory