Solved Compile error when building project (process: "/usr/bin/make" -j8)
-
Hey, I am still getting familiar with Qt and I have been working with it on windows on a GUI application and it was working fine. I wanted to test it's scalability on my Ubuntu machine (20.04.1), so I installed the same version of Qt there. However when I am building, I am getting this error and I am not sure why.
... SS-QT-Desktop_Qt_5_12_10_GCC_64bit-Debug/Makefile qmake_all
make: Nothing to be done for 'qmake_all'.
14:37:54: The process "/usr/bin/make" exited normally.
14:10:20: Starting: "/usr/bin/make" -j8
make: *** No rule to make target '/home/adham/Test_Tools/SS/GUI/SS-QT/./libftd2xx.a', needed by 'SS'. Stop.
14:10:20: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project SS-QT (kit: Desktop Qt 5.12.10 GCC 64bit)
When executing step "Make"
14:10:20: Elapsed time: 00:00.It seems the error is happening when creating the executable file for the project, help would be appreciated.
Thanks -
Hi
It says it dont know how to build libftd2xx
so if you downloaded it for windows, then you need to recompile it to be used in Linux. -
@mrjj This project compiles and runs on other linux machines. I think it might be a compiler error or something related to Qt's build settings/steps?
-
Try to compile it without
-j8
-
@Christian-Ehrlicher It seems I can't remove the -j8 as it is a setting in the build steps. I can adjust the number of cores chosen I believe (ex, -j4 etc.). I am still having troubles building this project. Also, one thing to note is that this same projects builds and runs on other Linux machines.
-
Okay so I was digging deeper in the .pro file and I found these few lines of code at the bottom. It seems this is where the error is originating from. I believe these are different build rules depending on the environment, I am still not sure what is the problem
-
Hi,
Do you have that static library available in the project sources ?
-
@SGaist I do have the header file ftd2xx.h. However, I do not have the compiled static file libftd2xx.a. On my Windows machine, I think (and I might be wrong) the library is being compiled at run time because I just checked there and only the header file is available in the project sources.
-
In that case you should first get the library for your OS.
-
@SGaist I installed the libftd2xx.a static library and copied it into usr/lib as well as usr/local/lib and I am getting the same error. Am I missing something?
-
The PRE_TARGETDEPS points within your sources.
One thing you can do is comment out this line.
It's usually used to ensure that if a static library is changed, then it will trigger a rebuild of the target. In your can you do not seem to build libftd2xx so you should be safe from that point of vue.
-
@SGaist I commented out the line you mentioned, and now I get a bunch more errors relating to that same library. Seems to be originating from line above the one I removed:
/usr/bin/ld: skipping incompatible /usr/local/lib/libftd2xx.so when searching for -lftd2xx
/usr/bin/ld: skipping incompatible /usr/local/lib/libftd2xx.a when searching for -lftd2xx
/usr/bin/ld: cannot find -lftd2xx
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
make: *** [Makefile:626: SS] Error 1
12:14:39: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project SS-QT (kit: Desktop Qt 5.12.10 GCC 64bit)
When executing step "Make"
12:14:39: Elapsed time: 01:03. -
You are missing the OpenGL development package for your distribution.
You likely have a 32bit build of ftd2xx.
-
@SGaist Awesome, you were right. Now with the 64bit ftd2xx and OpenGL package installed, it builds and runs. I guess I'll leave that last line commented out until I figure out the problem with it.
Thanks for your help, highly appreciated.
-
@Adham said in Compile error when building project (process: "/usr/bin/make" -j8):
I guess I'll leave that last line commented out until I figure out the problem with it.
As I wrote before, this line expects to find the static libftd2xx library file within the project sources.
-
@SGaist I heard you, I tried throwing it in there but I got the same error. Anyways I should be good for now. I'll come back if I can't figure it out later on lol. Thanks again.