grotius-cnc / hal-core

cnc and robot realtime controller. runs on a hal kernel module.
GNU General Public License v2.0
43 stars 20 forks source link

./make | dofs.so : No such file or directory #13

Closed jjrbfi closed 3 years ago

jjrbfi commented 3 years ago

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

grotius-cnc commented 3 years ago

That's strange. I will have a look.

grotius-cnc commented 3 years ago

I did a workaround to solve this. Just curious, are you compiling on rpi4?

jjrbfi commented 3 years ago

I still have that issue compiling it. Yes I'm using RPI4

jjrbfi commented 3 years ago

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

jjrbfi commented 3 years ago

Maybe I missing some packages?

But I already installed all needed from src/README.md

grotius-cnc commented 3 years ago

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?

jjrbfi commented 3 years ago

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.

grotius-cnc commented 3 years ago

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?

grotius-cnc commented 3 years ago

Ok, i removed the .so files from the /rtlib. During the make process, everything will be put over there.

jjrbfi commented 3 years ago

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
jjrbfi commented 3 years ago

I think I missing some packages for that maybe?

Quite rare have that issue that I had not before.

grotius-cnc commented 3 years ago

Yes strange. Haha

grotius-cnc commented 3 years ago

Ok. let's comment out the dofs lib for now in the make file. Then we focus on the ethercat bus.

grotius-cnc commented 3 years ago

I will comment it you now.

jjrbfi commented 3 years ago

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?

grotius-cnc commented 3 years ago

just try it.

jjrbfi commented 3 years ago

Nope. the problem still. -_-´

jjrbfi commented 3 years ago

I will skip it for a bit to try to get EtherCAT working. Thanks!

grotius-cnc commented 3 years ago

Yes perfect !