0

I am developing a C++ project which mostly was developed in my local machine.

It consists of the following folders: installations/ #repository where I installed all the dependencies of my code src/ applications/

It builds/compiles/run without no problems in my local machine. Then I pushed everything to git and clone it in the target machine. When building my application using cmake, it keeps throwing: "Error: No rule to make target '/usr/lib/x86_64-linux-gnu/libdl.a'"

That makes sense since, in the target machine, libdl.a is located at /usr/lib64 ('/usr/lib/x86_64-linux-gnu/libdl.a'" is where it is located in my local machine actually). That is the only error ocurring during building/compilation in the target machine. Anyone have any idea what might be causing cmake to point to a non-existing target? Can it be because I imported the binaries of the dependencies together?

I have tried to set it manualy using -DCMAKE_SYSTEM_LIBRARY_PATH=/usr/lib64 and -DCMAKE_LIBRARY_PATH=/usr/lib64 but it did not work.

NCLibardi
  • 1
  • 1
  • "Then I pushed everything to git" - You have pushed a **build directory**, haven't you? Never do that: build directory is usable only on the machine where it is created. Only source directory could be stored in git and be cloned on other machine. – Tsyvarev Jul 07 '23 at 18:05
  • @Tsyvarev No, I haven't. I have pushed "installation", "src" and "applications". The only binaries I pushed are the one in "installation", a directory with all the depencencies I need to develop my code in "src" – NCLibardi Jul 08 '23 at 08:25
  • 1
    Ok, so the problem is somewhere in **your code**, which creates "installation". For find the problem and suggest a solution we need to see that code. Please, prepare [mcve]. – Tsyvarev Jul 08 '23 at 13:26

0 Answers0