Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
corssdev cross-x86_64-w64-mingw32/gcc-9.2.0-r2 compile fails
View unanswered posts
View posts from last 24 hours

 
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
wilsonmeier
n00b
n00b


Joined: 12 Jan 2016
Posts: 6

PostPosted: Thu Feb 06, 2020 1:08 pm    Post subject: corssdev cross-x86_64-w64-mingw32/gcc-9.2.0-r2 compile fails Reply with quote

Hi everyone,

i'm trying to get my crossdev tollchain working but i fail!

I've folowed the instructions from the Gentoo Wiki Page https://wiki.gentoo.org/wiki/Mingw

But crossdev failes to compile gcc.

Code:
# crossdev -S -f --show-fail-log --with-headers --target x86_64-w64-mingw32


fails with

Code:
config.status: creating omp_lib.f90
config.status: creating libgomp_f.h
config.status: creating Makefile
config.status: creating testsuite/Makefile
/usr/libexec/gcc/x86_64-w64-mingw32/ld: strtod/.libs/strtoflt128.o: in function `memcpy':
/usr/x86_64-w64-mingw32/sys-include/string.h:202: undefined reference to `__memcpy_chk'
/usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/sys-include/string.h:202: undefined reference to `__memcpy_chk'
/usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/sys-include/string.h:202: undefined reference to `__memcpy_chk'
/usr/libexec/gcc/x86_64-w64-mingw32/ld: /usr/x86_64-w64-mingw32/sys-include/string.h:202: undefined reference to `__memcpy_chk'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:828: libquadmath.la] Error 1
make[3]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/build/x86_64-w64-mingw32/libquadmath'
make[2]: *** [Makefile:576: all] Error 2
make[2]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/build/x86_64-w64-mingw32/libquadmath'
make[1]: *** [Makefile:12866: all-target-libquadmath] Error 2
config.status: creating libgomp.spec
config.status: creating testsuite/libgomp-test-support.pt.exp
config.status: creating config.h
config.status: executing default-1 commands
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing gstdint.h commands
make[1]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/build'
make: *** [Makefile:954: all] Error 2
 * ERROR: cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'`,
 * the complete build log and the output of `emerge -pqv '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'`.
 * The complete build log is located at '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/temp/environment'.
 * Working directory: '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/build'
 * S: '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/gcc-9.2.0'
 *
 * Please include /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-9.2.0-r2/work/gcc-build-logs.tar.bz2 in your bug report.
 *

>>> Failed to emerge cross-x86_64-w64-mingw32/gcc-9.2.0-r2, Log file:


I tried with and without "--with-headers", emerged cross-x86_64-w64-mingw32/mingw64-runtime with libraries USE flag, added -fortran USE flag to cross-i686-w64-mingw32/gcc but nothing helps.

Can someone please give me a hint?

Thanks!
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22857

PostPosted: Fri Feb 07, 2020 3:09 am    Post subject: Reply with quote

If I were to guess, you tried to build a hardened cross-compiler, and that does not work. Please follow the instructions Portage gave you, so that we can see what you are building.
wilsonmeier wrote:
Code:
 * If you need support, post the output of `emerge --info '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'`,
 * the complete build log and the output of `emerge -pqv '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'`.
Back to top
View user's profile Send private message
wilsonmeier
n00b
n00b


Joined: 12 Jan 2016
Posts: 6

PostPosted: Fri Feb 07, 2020 6:24 pm    Post subject: Reply with quote

Here you go:

Code:
# emerge --info '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'

Portage 2.3.79 (python 3.6.9-final-0, default/linux/amd64/17.0/desktop/gnome/systemd, gcc-9.2.0, glibc-2.29-r7, 4.19.82-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.19.82-gentoo-x86_64-Intel-R-_Core-TM-_i7-8700K_CPU_@_3.70GHz-with-gentoo-2.6
KiB Mem:    65883176 total,  22447536 free
KiB Swap:   29360124 total,  29358076 free
Timestamp of repository gentoo: Sun, 26 Jan 2020 11:15:01 +0000
Head commit of repository gentoo: 0c33afd1125949610ad8f3e35e8577488d3ee69e
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.32 p2) 2.32.0
distcc 3.3.3 x86_64-pc-linux-gnu [disabled]
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.30.1::gentoo
dev-lang/python:          2.7.17::gentoo, 3.5.7::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo
dev-util/cmake:           3.14.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.41.2::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.32-r1::gentoo
sys-devel/gcc:            6.5.0-r1::gentoo, 9.2.0-r2::gentoo
sys-devel/gcc-config:     2.1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync9.de.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts:

localrepo
    location: /usr/local/portage
    masters: gentoo

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

ace
    location: /var/lib/layman/ace
    sync-type: laymansync
    sync-uri: https://github.com/ananace/overlay.git
    masters: gentoo
    priority: 50

didactic-duck
    location: /var/lib/layman/didactic-duck
    sync-type: laymansync
    sync-uri: https://github.com/lucianposton/didactic-duck.git
    masters: gentoo
    priority: 50

dotnet
    location: /var/lib/layman/dotnet
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/dotnet.git
    masters: gentoo
    priority: 50

eclipse
    location: /var/lib/layman/eclipse
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/eclipse-overlay.git
    masters: gentoo
    priority: 50

gentoo-zh
    location: /var/lib/layman/gentoo-zh
    sync-type: laymansync
    sync-uri: git://github.com/microcai/gentoo-zh.git
    masters: gentoo
    priority: 50

gitlab
    location: /var/lib/layman/gitlab
    sync-type: laymansync
    sync-uri: https://gitlab.awesome-it.de/overlays/gitlab.git
    masters: gentoo
    priority: 50

haarp
    location: /var/lib/layman/haarp
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/user/haarp.git
    masters: gentoo
    priority: 50

jm-overlay
    location: /var/lib/layman/jm-overlay
    sync-type: laymansync
    sync-uri: https://github.com/Jannis234/jm-overlay.git
    masters: gentoo
    priority: 50

miramir
    location: /var/lib/layman/miramir
    sync-type: laymansync
    sync-uri: https://github.com/miramir/miramir-layman.git
    masters: gentoo
    priority: 50

mva
    location: /var/lib/layman/mva
    sync-type: laymansync
    sync-uri: https://github.com/msva/mva-overlay
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    sync-type: laymansync
    sync-uri: git://github.com/pentoo/pentoo-overlay.git
    masters: gentoo
    priority: 50

pinkpieea
    location: /var/lib/layman/pinkpieea
    sync-type: laymansync
    sync-uri: https://notabug.org/soredake/gentoo-overlay.git
    masters: gentoo
    priority: 50

seeds
    location: /var/lib/layman/seeds
    sync-type: laymansync
    sync-uri: git://github.com/vonavi/seeds.git
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    sync-type: laymansync
    sync-uri: git://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

sublime-text
    location: /var/lib/layman/sublime-text
    sync-type: laymansync
    sync-uri: git://github.com/DamnWidget/sublime-text.git
    masters: gentoo
    priority: 50

swegener
    location: /var/lib/layman/swegener
    sync-type: laymansync
    sync-uri: rsync://rsync.gentoo.stealer.net/swegener-overlay/
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=core-avx-i"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.2/ext-active/ /etc/php/apache2-php7.3/ext-active/ /etc/php/cgi-php7.2/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cli-php7.2/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=core-avx-i"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/"
INSTALL_MASK="/usr/share/locale -/usr/share/locale/de -/usr/share/locale/de_DE -/usr/share/locale/en -/usr/share/locale/en_GB -/usr/share/locale/en_US"
LANG="de_DE.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j12"
PKGDIR="/var/cache/binpkgs"
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="X a52 aac acl acpi alsa amd64 apache2 berkdb bluetooth branding bzip2 cairo cdda cdr cli colord crypt cups cxx dbus dlna dri dri3 dts dvd dvdr eds egl emboss encode evo exif faac ffmpeg flac fortran gd gdbm gif glamor gles gnome gnome-keyring gnome-online-accounts gpg gpm gstreamer gtk iconv icu imap introspection ipv6 joystick jpeg lcms ldap libnotify libsecret libtirpc libwww mad maildir mmx mng mp3 mp4 mpeg multilib mysql nautilus ncurses networkmanager nfs nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp server spell spice split-usr sse sse2 ssl startup-notification svg systemd tcpd threads tiff truetype udev udisks unicode upower usb vhosts vorbis vpx vulkan wxwidgets x264 xattr xcb xml xv xvid zfs zlib zsh-completion" ABI_X86="64" ADA_TARGET="gnat_2018" 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="actions alias auth_basic auth_digest authn_alias authn_anon authn_core authn_dbm authn_default authn_file authz_core authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgid deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_connect proxy_fcgi proxy_ftp proxy_http proxy_scgi proxy_wstunnel rewrite setenvif socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" APACHE2_MPMS="event" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc emu multiboot" INPUT_DEVICES="evdev keyboard mouse joystick" KERNEL="linux" L10N="de" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python3_6 python3_5 python2_7" RUBY_TARGETS="ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia dummy" 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:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev was built with the following:
USE="(libssp) nls nptl pch ssp (-altivec) -cxx -d -debug -doc (-fixed-point) -fortran -go -graphite -hardened -jit -lto -multilib -objc -objc++ -objc-gc -openmp -pgo -pie -sanitize -systemtap -test -vanilla -vtv" ABI_X86="(64)"
CFLAGS="-O2 -pipe"
CXXFLAGS="-O2 -pipe"
FEATURES="news assume-digests distlocks sandbox protect-owned multilib-strict usersync userfetch ipc-sandbox sfperms preserve-libs unmerge-logs binpkg-docompress binpkg-logs ebuild-locks merge-sync strict splitdebug xattr collision-protect binpkg-dostrip unmerge-orphans unknown-features-warn userpriv pid-sandbox parallel-fetch usersandbox config-protect-if-modified network-sandbox fixlafiles"


Code:
# emerge -pqv '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'

[ebuild   R   ] cross-x86_64-w64-mingw32/gcc-9.2.0-r2  USE="cxx* (libssp) nls nptl openmp* pch ssp (-altivec) -d -debug -doc (-fixed-point) -fortran -go -graphite -hardened -jit -lto -multilib -objc -objc++ -objc-gc -pgo -pie -sanitize -systemtap -test -vanilla -vtv"


Thanks in advance.
Back to top
View user's profile Send private message
wilsonmeier
n00b
n00b


Joined: 12 Jan 2016
Posts: 6

PostPosted: Fri Feb 14, 2020 10:24 am    Post subject: Reply with quote

No one has a clue?
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2884

PostPosted: Fri Feb 14, 2020 8:47 pm    Post subject: Reply with quote

Looking at this "(libssp)" and "ssp" it's likely related to this commit. Have you tried disabling ssp? As previously pointed, looks related to some hardening features.

Without either it's working for me but my setup is also a bit non-standard (including a few things regarding fortify sources) so hard to say if there's a bug or not.
Back to top
View user's profile Send private message
wilsonmeier
n00b
n00b


Joined: 12 Jan 2016
Posts: 6

PostPosted: Fri Feb 14, 2020 11:06 pm    Post subject: Reply with quote

Unfortunately disabling ssp didn't solve it.

Code:
# emerge -pqv '=cross-x86_64-w64-mingw32/gcc-9.2.0-r2::crossdev'
[ebuild   R   ] cross-x86_64-w64-mingw32/gcc-9.2.0-r2  USE="cxx* fortran* (libssp) nls nptl openmp* pch (-altivec) -d -debug -doc (-fixed-point) -go -graphite -hardened -jit -lto -multilib -objc -objc++ -objc-gc -pgo -pie -sanitize -ssp* -systemtap -test -vanilla -vtv"


Results in the exact same error.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2884

PostPosted: Sat Feb 15, 2020 1:51 am    Post subject: Reply with quote

I'm confused why (libssp) is still being enforced, for me it's
Code:
[ebuild   R   ] cross-x86_64-w64-mingw32/gcc-9.2.0-r3  USE="cxx nptl openmp pch (-altivec) -d -debug -doc (-fixed-point) -fortran -go -graphite -hardened -jit -libssp -lto -multilib -nls -objc -objc++ -objc-gc -pgo -pie -sanitize -ssp -systemtap -test -vanilla -vtv"
Had a look around profiles but I can't find a cause from my end. Not that I'm sure if it's even the issue here. I haven't tried on a stable system too.
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Gentoo on AMD64 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