For some qmake-based projects, qmake generates makefiles which fail to link static libraries. Reproducible: Always Steps to Reproduce: 1. git clone --recursive git://code.qt.io/qt3dstudio/qt3dstudio.git 2. cd qt3dstudio 3. qmake 4. make Actual Results: Build fails: rm -f ../../../lib/libEASTL.a x86_64-pc-linux-gnu-ar ../../../lib/libEASTL.a .obj/allocator.o .obj/assert.o .obj/fixed_pool.o .obj/hashtable.o .obj/red_black_tree.o .obj/string.o x86_64-pc-linux-gnu-ar: invalid option -- '.' Usage: x86_64-pc-linux-gnu-ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file... x86_64-pc-linux-gnu-ar -M [<mri-script] commands: d - delete file(s) from the archive m[ab] - move file(s) in the archive p - print file(s) found in the archive q[f] - quick append file(s) to the archive r[ab][f][u] - replace existing or insert new file(s) into the archive s - act as ranlib t[O][v] - display contents of the archive x[o] - extract file(s) from the archive command specific modifiers: [a] - put file(s) after [member-name] [b] - put file(s) before [member-name] (same as [i]) [D] - use zero for timestamps and uids/gids [U] - use actual timestamps and uids/gids (default) [N] - use instance [count] of name [f] - truncate inserted file names [P] - use full path names when matching [o] - preserve original dates [O] - display offsets of files in the archive [u] - only replace files that are newer than current archive contents generic modifiers: [c] - do not warn if the library had to be created [s] - create an archive index (cf. ranlib) [S] - do not build a symbol table [T] - make a thin archive [v] - be verbose [V] - display the version number @<file> - read options from <file> --target=BFDNAME - specify the target object format as BFDNAME optional: --plugin <p> - load the specified plugin emulation options: No emulation specific options x86_64-pc-linux-gnu-ar: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin make[6]: *** [Makefile:91: ../../../lib/libEASTL.a] Error 1 Expected Results: Successful build It looks like ar call lacks some options, specifically 'cqs'. This options is present on following line: https://github.com/gentoo/gentoo/blob/master/eclass/qt5-build.eclass#L711 But it's missing here: https://github.com/gentoo/gentoo/blob/master/eclass/qt5-build.eclass#L672 Adding 'cqs' option to line 672 of qt5-build.eclass and re-emerging dev-qt/qtcore fixes issue for me.
Created attachment 617484 [details] example.tar.bz2 Minimized example displaying this issue. QMake-based project for static library is created via qt-creator project wizard. After that line 'load(qt_helper_lib)' added to file 'untitled.pro' and file '.qmake.conf' created containing only one line: 'load(qt_build_config)'. If you unpack it, run 'qmake' and 'make' without fix, following error should be encountered: $ make x86_64-pc-linux-gnu-g++ -c -march=native -O2 -pipe -fomit-frame-pointer -fwrapv -Werror=return-type -fPIC -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I. -I/usr/lib64/qt5/mkspecs/linux-g++ -o .obj/untitled.o untitled.cpp rm -f lib/libuntitled.a x86_64-pc-linux-gnu-ar lib/libuntitled.a .obj/untitled.o x86_64-pc-linux-gnu-ar: invalid option -- '/' Usage: x86_64-pc-linux-gnu-ar [emulation options] [-]{dmpqrstx}[abcDfilMNoOPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file... x86_64-pc-linux-gnu-ar -M [<mri-script] commands: d - delete file(s) from the archive m[ab] - move file(s) in the archive p - print file(s) found in the archive q[f] - quick append file(s) to the archive r[ab][f][u] - replace existing or insert new file(s) into the archive s - act as ranlib t[O][v] - display contents of the archive x[o] - extract file(s) from the archive command specific modifiers: [a] - put file(s) after [member-name] [b] - put file(s) before [member-name] (same as [i]) [D] - use zero for timestamps and uids/gids [U] - use actual timestamps and uids/gids (default) [N] - use instance [count] of name [f] - truncate inserted file names [P] - use full path names when matching [o] - preserve original dates [O] - display offsets of files in the archive [u] - only replace files that are newer than current archive contents generic modifiers: [c] - do not warn if the library had to be created [s] - create an archive index (cf. ranlib) [S] - do not build a symbol table [T] - make a thin archive [v] - be verbose [V] - display the version number @<file> - read options from <file> --target=BFDNAME - specify the target object format as BFDNAME optional: --plugin <p> - load the specified plugin emulation options: No emulation specific options x86_64-pc-linux-gnu-ar: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big srec symbolsrec verilog tekhex binary ihex plugin make: *** [Makefile:69: lib/libuntitled.a] Error 1