Details
-
Bug
-
Resolution: Unresolved
-
P4: Low
-
None
-
5.9.4
-
None
-
Tested on debian Jessie and Stretch using the provided gcc and Qt 5.9.4.
Description
Reproduce as follows:
Create a .pro file with the following contents:
TEMPLATE = lib
CONFIG += staticlib
SOURCES += all.c
The contents of "all.c" are irrelevant, you may use an empty file.
The build will always fail until you rename all.c to something else.
An error comes from a garbage additional command, for instance:
Using SOURCE.c the following compile output is shown:
gcc -c -pipe -g -fPIC -Wall -W -D_REENTRANT -DQT_QML_DEBUG -I../all_c_test -I. -I../../qt594debug/mkspecs/linux-g++ -o SOURCE.o ../all_c_test/SOURCE.c
rm -f liball_c_test.a
ar cqs liball_c_test.a SOURCE.o
Using all.c we get the same output plus an additional "gcc" call:
gcc -c -pipe -g -fPIC -Wall -W -D_REENTRANT -DQT_QML_DEBUG -I../all_c_test -I. -I../../qt594debug/mkspecs/linux-g++ -o all.o ../all_c_test/all.c
rm -f liball_c_test.a
ar cqs liball_c_test.a all.o
gcc all.o Makefile liball_c_test.a -o all
it looks like the makefile has an "all" directive that collides with the name of the source OR object file all.c/all.o somehow.
If the name "all" can't be used because when using qmake this should be made clear in the build output, now we get a "collect2: error: ld returned 1 exit status" message.
Attachments
Issue Links
- relates to
-
QTBUG-30813 implicit targets get in the way
- Closed