Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
qtcore doesn't compile: collect2: error: ld returned 1 exit
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
karlguy
n00b
n00b


Joined: 05 Nov 2017
Posts: 1

PostPosted: Sun Nov 05, 2017 1:42 am    Post subject: qtcore doesn't compile: collect2: error: ld returned 1 exit Reply with quote

I am on musl libc, using clang and clang++ as native compilers, and using libc++ as the native stdlib. I also use libressl instead of openssl.
No matter what I try, using gcc fallback, forcing usage of bfd via LDFLAGS, trying to compile with libstdcxx fallback, nothing works.

EDIT: my forcing bfd was just a simple -W1,-fuse-ld=bfd. I don't know if this prevented gold from being used, or if it is even the problem in the first place.
EDIT 2: It compiles perfectly fine, it fails at the link phase

build.log

info:
Code:

Portage 2.3.13 (python 3.4.6-final-0, hardened/linux/musl/amd64, gcc-6.4.0, musl-1.1.18, 4.13.10-30.current x86_64)
=================================================================
System uname: Linux-4.13.10-30.current-x86_64-Intel-R-_Core-TM-_i7-6560U_CPU_@_2.20GHz-with-gentoo-2.4.1
KiB Mem:    16342776 total,   5108316 free
KiB Swap:          0 total,         0 free
Head commit of repository gentoo: 974707d375cc8cb22593224b38c73853e906d157

sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14::gentoo, 3.4.6::gentoo
dev-util/cmake:           3.9.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.5::gentoo
sys-apps/sandbox:         2.12::musl
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15-r2::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            6.4.0::musl
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::musl (virtual/os-headers)
sys-libs/musl:            1.1.18::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: git
    sync-uri: https://github.com/gentoo/gentoo
    priority: -1000

libressl
    location: /var/lib/layman/libressl
    masters: gentoo
    priority: 300

musl
    location: /var/lib/layman/musl
    masters: gentoo
    priority: 500

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O3 -march=native -pipe"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXX="clang++"
CXXFLAGS="-O3 -march=native -pipe -stdlib=libc++"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="amd64 clang cli compiler-rt cracklib crypt cxx default-compiler-rt default-libcxx dri fortran iconv ipv6 jit libcxx libressl modules ncurses nls nptl openmp pam pcre pic python readline seccomp session sqlite ssl tcpd unicode xattr xml zlib" ABI_X86="64" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="synaptics libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby22" USERLAND="GNU" VIDEO_CARDS="intel i965" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Nov 06, 2017 11:48 pm    Post subject: Reply with quote

I am not a specialist.

I also use gold

I suggest you try with

Code:
binutils-config --linker ld.bfd


Than change back.

Most stuff here fails at the link stage recently. Sometimes the software in question, or the ebuild in question is just borked, or am I using too old gcc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum