Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 709384 - dev-qt/qtcore-5.14.1-r1 - building qt modules from code.qt.io/cgit/ fail with x86_64-pc-linux-gnu-ar: invalid option -- '.'
Summary: dev-qt/qtcore-5.14.1-r1 - building qt modules from code.qt.io/cgit/ fail with...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-12 14:13 UTC by Steffen Kastner
Modified: 2020-02-14 09:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info dev-qt/qtcore (emerge_info.txt,7.15 KB, text/plain)
2020-02-12 22:39 UTC, Steffen Kastner
Details
make output of git://code.qt.io/qt/qtftp.git (make_log_of_qtftp.txt,8.04 KB, text/plain)
2020-02-12 22:48 UTC, Steffen Kastner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Kastner 2020-02-12 14:13:20 UTC
Hi, I tried to build https://code.qt.io/cgit/qt/qtftp.git/, which is needed for a projekt I am working on.

The build failed with:
x86_64-pc-linux-gnu-ar ../../lib/libQt5Ftp.a .obj/qftp.o .obj/qurlinfo.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
  --output=DIRNAME - specify the output directory for extraction operations
 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

The ar command was called without options. 
Executing:
user $ x86_64-pc-linux-gnu-ar cqs ../../lib/libQt5Ftp.a .obj/qftp.o .obj/qurlinfo.o
did the job as expected.

On my search where the archiver + options are set I found these settings.
user $ cat /usr/lib64/qt5/mkspecs/linux-g++/qmake.conf          
#
# qmake configuration for linux-g++
#

MAKEFILE_GENERATOR      = UNIX
CONFIG                 += incremental
QMAKE_INCREMENTAL_STYLE = sublib

include(../common/linux.conf)
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
load(qt_config)
user $ cat /usr/lib64/qt5/mkspecs/common/linux.conf          
#
# qmake configuration for common linux
#

QMAKE_PLATFORM         += linux

include(unix.conf)

QMAKE_CFLAGS_THREAD    += -D_REENTRANT
QMAKE_CXXFLAGS_THREAD  += $$QMAKE_CFLAGS_THREAD
QMAKE_LFLAGS_GCSECTIONS = -Wl,--gc-sections

QMAKE_LFLAGS_REL_RPATH  = -Wl,-z,origin
QMAKE_REL_RPATH_BASE    = $ORIGIN

QMAKE_INCDIR            =
QMAKE_LIBDIR            =
QMAKE_INCDIR_X11        =
QMAKE_LIBDIR_X11        =
QMAKE_INCDIR_OPENGL     =
QMAKE_LIBDIR_OPENGL     =
QMAKE_INCDIR_OPENGL_ES2 = $$QMAKE_INCDIR_OPENGL
QMAKE_LIBDIR_OPENGL_ES2 = $$QMAKE_LIBDIR_OPENGL
QMAKE_INCDIR_EGL        =
QMAKE_LIBDIR_EGL        =
QMAKE_INCDIR_OPENVG     =
QMAKE_LIBDIR_OPENVG     =

QMAKE_LIBS              =
QMAKE_LIBS_DYNLOAD      = -ldl
QMAKE_LIBS_X11          = -lXext -lX11 -lm
QMAKE_LIBS_EGL          = -lEGL
QMAKE_LIBS_OPENGL       = -lGL
QMAKE_LIBS_OPENGL_ES2   = -lGLESv2
QMAKE_LIBS_OPENVG       = -lOpenVG
QMAKE_LIBS_THREAD       = -lpthread
QMAKE_LIBS_VULKAN       =

QMAKE_INCDIR_WAYLAND    =
QMAKE_LIBS_WAYLAND_CLIENT = -lwayland-client
QMAKE_LIBS_WAYLAND_SERVER = -lwayland-server
QMAKE_LIBDIR_WAYLAND    =
QMAKE_DEFINES_WAYLAND   =
QMAKE_WAYLAND_SCANNER   = wayland-scanner

QMAKE_AR                = ar cqs
QMAKE_OBJCOPY           = objcopy
QMAKE_NM                = nm -P
QMAKE_RANLIB            =

QMAKE_STRIP             = strip
QMAKE_STRIPFLAGS_LIB   += --strip-unneeded
user $ grep -r "x86_64-pc-linux-gnu-ar" /usr/lib64/qt5/
/usr/lib64/qt5/mkspecs/gentoo/qmodule-qtcore.pri:    QMAKE_AR=x86_64-pc-linux-gnu-ar
/usr/lib64/qt5/mkspecs/qmodule.pri:    QMAKE_AR=x86_64-pc-linux-gnu-ar 

It seems like the ar command with the right options from linux.conf is overwritten by QMAKE_AR=x86_64-pc-linux-gnu-ar without any options when building qtftp.

The same also happens with other modules like qthttp or qtlocation.

Sorry if I am at the wrong bug tracker for this. I am not sure if this is an qt or gentoo bug.
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2020-02-12 14:29:51 UTC
What package owns </usr/lib64/qt5/mkspecs/linux-g++/qmake.conf>?
Comment 2 Steffen Kastner 2020-02-12 14:36:49 UTC
It belongs to dev-qt/qtcore
user $ equery b /usr/lib64/qt5/mkspecs/linux-g++/qmake.conf 
 * Searching for /usr/lib64/qt5/mkspecs/linux-g++/qmake.conf ... 
dev-qt/qtcore-5.14.1-r1 (/usr/lib64/qt5/mkspecs/linux-g++/qmake.conf)
Comment 3 Jonas Stein gentoo-dev 2020-02-12 19:28:33 UTC
Thank you for the report. Please recompile and 
*attach* the logfiles and 
paste the emerge info as described on
https://wiki.gentoo.org/wiki/Attach_the_logs_to_the_bug_ticket
We need to have all information at hand before ticket assignment, so that the maintainer can look after it in one session with minimal number of callbacks.
Please reopen this ticket (Status:unconfirmed) afterwards.
Comment 4 Steffen Kastner 2020-02-12 22:39:38 UTC
Created attachment 613588 [details]
emerge --info dev-qt/qtcore
Comment 5 Steffen Kastner 2020-02-12 22:48:31 UTC
Created attachment 613590 [details]
make output of git://code.qt.io/qt/qtftp.git

git clone git://code.qt.io/qt/qtftp.git
cd qtftp
qmake
make

similar output with git://code.qt.io/qt/qthttp.git and git://code.qt.io/qt/qtlocation.git