Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 620464 - Crossdev of Mingw (both i686-w64-mingw32 and x86_64-w64-mingw32) fail in stage2 because ld does not recognize -z
Summary: Crossdev of Mingw (both i686-w64-mingw32 and x86_64-w64-mingw32) fail in stag...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
Depends on:
Reported: 2017-06-03 03:23 UTC by Rob Stoddard
Modified: 2017-12-28 02:44 UTC (History)
1 user (show)

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

the zip of the failure logs as requested by emerge (,100.81 KB, application/x-zip-compressed)
2017-06-03 03:23 UTC, Rob Stoddard

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Stoddard 2017-06-03 03:23:30 UTC
Created attachment 475056 [details]
the zip of the failure logs as requested by emerge

I was following the instructions on the Gentoo MinGW site and ended up failing after running:

crossdev --ov-output /usr/portage i686-w64-mingw32

and similarly,

crossdev --ov-output /usr/portage x86_64-w64-mingw32

Apparently ld does not support the -z option.  What gets me is I don't see where in the (very busy) log ld is being run with -z.
Comment 1 Rob Stoddard 2017-06-06 22:10:58 UTC
Portage 2.3.5 (python 2.7.12-final-0, hardened/linux/amd64, gcc-5.4.0, glibc-2.23-r3, 4.4.6-gentoo x86_64)
System uname: Linux-4.4.6-gentoo-x86_64-Intel-R-_Xeon-R-_CPU_E5507_@_2.27GHz-with-gentoo-2.3
KiB Mem:    49448288 total,  15723340 free
KiB Swap:  100663292 total, 100632256 free
Timestamp of repository gentoo: Mon, 05 Jun 2017 17:30:01 +0000
sh bash 4.3_p48-r1
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p48-r1::gentoo
dev-lang/perl:            5.24.1-r2::gentoo
dev-lang/python:          2.7.12::gentoo, 3.4.5::gentoo
dev-util/cmake:           3.7.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.3::gentoo
sys-apps/openrc:          0.26.3::gentoo
sys-apps/sandbox:         2.10-r3::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.14.1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo, 2.26.1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 4.9.4::gentoo, 5.4.0-r3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r3::gentoo

    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://
    priority: -1000

    location: /usr/local/portage-crossdev
    masters: gentoo
    priority: 10

CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.6/ext-active/ /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync 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"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
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"
USE="acl amd64 apache2 bash-completion berkdb bzip2 cairo cli cracklib crypt cxx dri gdbm git graphviz hardened iconv ipv6 jpeg justify modules multilib ncurses nls nptl openmp pam pax_kernel pcre perl php pie png postgres readline seccomp session ssl ssp static-libs tcpd unicode urandom xattr xtpax zip zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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="mmx mmxext sse sse2 sse3" ELIBC="glibc" 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="libinput keyboard mouse" 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" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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"
Comment 2 Rob Stoddard 2017-06-06 23:19:33 UTC
Comment on attachment 475056 [details]
the zip of the failure logs as requested by emerge

This is a zip containing the following files:

Comment 3 Jonas Stein gentoo-dev 2017-06-11 22:52:52 UTC
It is sad to read that you have problems with crossdev. The situation seems to be a bit more complicate and requires some analysis.
We can not help you efficiently via bug tracker. The bug tracker aims rather on specific problems in .ebuilds and less on individual systems. 

I have had very good experience on the gentoo IRC [1] with questions like this. Of course there are also forums and mailing lists [2,3].
I hope you understand, that I will close the bug here therefore and wish you good luck on one of the mentioned channels [4].
Please reopen the ticket in order to provide an indication for an error in the ebuild.

Comment 4 Rob Stoddard 2017-06-12 12:43:51 UTC
Allow me to take the long way around on this.

Today we know very little about how the Vikings lived or worshiped their gods.  Even though many, if not most of them were literate, the facts about their daily lives and religion were obvious to them and since "everybody knows it" nobody bothered to write these things down in a place with some form of permanence, and now nobody knows it.  Today we have the writings of Snorri Sturlson, who wrote down what was passed through oral tradition after five hundred years of Christianity.  Oh, and we cannot forget what was written on the Osburg Ship, the single script we have to go by from their day regarding their beliefs and culture which translates to "Man knows little."

Continuing in the oral tradition are great technologies like IRC.  All of the time, effort and wisdom passed through IRC becomes whispers on the wind.  Truth be told, I've posted of problems perhaps twice or three times in the long and storied history of my Gentoo usage primarily because there are people who have not used IRC to ask their questions, and those questions have been answered.  And I was able to use those answers to solve the very problems that I had.

I had two machines that were built with pretty much the same hardware.  They were loaded a few months apart, so I didn't consider looking at the similarities and differences until last night.  It turns out the problematic machine was running with the HARDENED profile, where the machine that built MinGW flawlessly was not.   This profile set certain USE flags that were breaking the MinGW build.  To be exact, "pie ssp vtv" are the offending USE flags.
Comment 5 Maciej Piechotka 2017-07-04 18:11:46 UTC
Given that on hardened profile those flag are forced shouldn't crossdev add them automatically to package.use.force as it does with multilib?
Comment 6 R030t1 2017-12-27 05:24:24 UTC
(In reply to Rob Stoddard from comment #4)
> To be exact, "pie ssp vtv" are the offending USE flags.

Turning these off when building has been no help. I have no idea how to follow up on this.
Comment 7 R030t1 2017-12-28 02:44:50 UTC
cross-x86_64-w64-mingw32/gcc -fortran -vtv -pie -hardened -sanitize

If using portage, unmask kernel_Winnt and elibc_mingw and mask kernel_linux and elibc_glibc in the profile.