Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
List-MoreUtils-XS emerge fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Wed Dec 06, 2017 1:50 am    Post subject: List-MoreUtils-XS emerge fails Reply with quote

[Moderator note: the first three posts, and the post from eccerr0r encouraging a merge, were originally posted in one thread. All other posts up to and including my now-second post were in another thread. Per suggestion from eccerr0r, and considering that both of these seem to be related to calls to ld that ought to be calls to gcc, I merged the two threads. -Hu]

Trying to install gscan2pdf. It has a long list of dependencies. I got through about half or so.

Code:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] dev-perl/List-MoreUtils-XS-0.426.0::gentoo  USE="{-test}" 0 KiB
[ebuild  N     ] dev-perl/PDF-API2-2.31.0::gentoo  USE="-examples" 0 KiB
[ebuild  N     ] dev-perl/List-MoreUtils-0.426.0::gentoo  USE="xs {-test}" 0 KiB
[ebuild  N     ] dev-perl/Module-Build-Tiny-0.39.0::gentoo  USE="{-test}" 0 KiB
[ebuild  N     ] dev-perl/Readonly-2.10.0::gentoo  USE="{-test}" 0 KiB
[ebuild  N     ] dev-perl/ExtUtils-PkgConfig-1.160.0::gentoo  0 KiB
[ebuild  N     ] dev-perl/glib-perl-1.326.0::gentoo  0 KiB
[ebuild  N     ] dev-perl/Cairo-1.106.0::gentoo  USE="{-test}" 0 KiB
[ebuild  N     ] dev-perl/Image-Sane-0.140.0::gentoo  USE="-examples {-test}" 0 KiB
[ebuild  N     ] dev-perl/Pango-1.227.0::gentoo  USE="-examples -minimal {-test}" 0 KiB
[ebuild   R    ] media-gfx/imagemagick-6.9.9.23:0/6.9.9.23::gentoo  USE="X bzip2 corefonts cxx jpeg lcms openmp pango perl* png svg tiff truetype xml zlib -djvu -fftw -fontconfig -fpx -graphviz -hdri -jbig -jpeg2k -lqr -lzma -opencl -openexr -postscript -q32 -q8 -raw -static-libs {-test} -webp -wmf" 0 KiB
[ebuild  N     ] dev-perl/Gtk2-1.249.920::gentoo  USE="{-test}" 0 KiB
[ebuild  N     ] media-gfx/gtkimageview-1.6.4::gentoo  USE="-examples -static-libs" 0 KiB
[ebuild  N     ] x11-libs/goocanvas-1.0.0::gentoo  USE="-examples" 0 KiB
[ebuild  N     ] dev-perl/Gtk2-Ex-Simple-List-0.500.0-r2::gentoo  USE="-examples {-test}" 0 KiB
[ebuild  N     ] dev-perl/Gtk2-ImageView-0.50.0-r2::gentoo  USE="-examples {-test}" 0 KiB
[ebuild  N     ] dev-perl/Goo-Canvas-0.60.0-r2::gentoo  USE="-examples" 0 KiB
[ebuild  N     ] dev-perl/Gtk2-Ex-PodViewer-0.180.0-r2::gentoo  0 KiB
[ebuild  N     ] media-gfx/gscan2pdf-1.8.10::gentoo  0 KiB


Then:

Code:

* Package:    dev-perl/List-MoreUtils-XS-0.426.0
 * Repository: gentoo
 * Maintainer: perl@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking List-MoreUtils-XS-0.426.tar.gz to /var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work
>>> Source unpacked in /var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work
>>> Preparing source in /var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work/List-MoreUtils-XS-0.426 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work/List-MoreUtils-XS-0.426 ...
 * Using ExtUtils::MakeMaker
 * perl Makefile.PL PREFIX=/usr INSTALLDIRS=vendor INSTALLMAN3DIR=none DESTDIR=/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/image/
Checking whether pureperl is required... no
Checking for cc... ld: -pipe: unknown option
ld: use the --help option for usage information

Can't produce loadable XS module at inc/Config/AutoConf/LMU.pm line 73.
 * ERROR: dev-perl/List-MoreUtils-XS-0.426.0::gentoo failed (configure phase):
 *   Unable to build!
 *
 * Call stack:
 *     ebuild.sh, line 124:  Called src_configure
 *   environment, line 964:  Called perl-module_src_configure
 *   environment, line 518:  Called die
 * The specific snippet of code:
 *               perl Makefile.PL "$@" <<< "${pm_echovar}" || die "Unable to build!";
 *
 * If you need support, post the output of `emerge --info '=dev-perl/List-MoreUtils-XS-0.426.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-perl/List-MoreUtils-XS-0.426.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work/List-MoreUtils-XS-0.426'
 * S: '/var/tmp/portage/dev-perl/List-MoreUtils-XS-0.426.0/work/List-MoreUtils-XS-0.426'


Looks like a linker problem but a change to ld.bfd did not work either. Failed at about the same place but with different errors.

make.conf:

Code:

CFLAGS="-O2 -pipe -march=native"

GRAPHITE="-floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block"

CFLAGS="${CFLAGS} -flto=4 -fuse-linker-plugin -fomit-frame-pointer ${GRAPHITE} -ftree-vectorize"

CXXFLAGS="${CFLAGS}"

LDFLAGS="${LDFLAGS}  ${CFLAGS} -Wl,-flto"

# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
CHOST="x86_64-pc-linux-gnu"

# These are the USE and USE_EXPAND flags that were used for
# buidling in addition to what is provided by the profile.


#    bluray \


USE="X \
    fuse \
    gnome \
    gphoto2 \
    graphite lto \
    cleartype corefonts caps \
    ffmpeg \
    mtp \
    nfs \
    usb \
    hpcups \
    -qt3 -qt4 \
    -multilib"

AR="gcc-ar"
NM="gcc-nm"
RANLIB="gcc-ranlib"

CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

ACCEPT_KEYWORDS="~amd64"

PORTDIR="/usr/portage"

DISTDIR="${PORTDIR}/distfiles"

PKGDIR="${PORTDIR}/packages"

MAKEOPTS="-j3"

ALSA_CARDS="hda-intel"

GPSD_PROTOCOLS="garmin garmintxt gpsclock nmea sirf ublox ubx"

XTABLES_ADDONS=""

CALLIGRA_FEATURES=""

COLLECTD_PLUGINS=""

INPUT_DEVICES="libinput"

LCD_DEVICES=""

VIDEO_CARDS="intel i965 fbdev void"

ACCEPT_LICENSE="*"

SANE_BACKENDS="hp net"


emerge --info

Code:

Portage 2.3.16 (python 3.5.4-final-0, default/linux/amd64/13.0/no-multilib, gcc-7.2.0, glibc-2.26-r3, 4.14.0 x86_64)
=================================================================
System uname: Linux-4.14.0-x86_64-Intel-R-_Core-TM-_i7-6500U_CPU_@_2.50GHz-with-gentoo-2.4.1
KiB Mem:    16339088 total,    218124 free
KiB Swap:   14648316 total,  12388604 free
Head commit of repository gentoo: 878a91292bfd59f34f1e1b80350dc34aa61b5a24

sh bash 4.4_p12
ld GNU gold (Gentoo 2.29.1 p3 2.29.1) 1.14
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo
dev-util/cmake:           3.10.0::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 6.4.0::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.9.0-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r3::gentoo
Repositories:

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

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize"
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"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed  -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize -Wl,-flto"
MAKEOPTS="-j3"
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="X a52 aac acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo caps cdda cdr cleartype cli colord corefonts cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo exif fam ffmpeg firefox flac fortran fuse gdbm gif glamor gnome gnome-keyring gnome-online-accounts gphoto2 gpm graphite gstreamer gtk hpcups iconv introspection ipv6 jpeg lcms ldap libnotify libsecret lto mad mng modules mp3 mp4 mpeg mtp nautilus ncurses nfs nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt5 readline sdl seccomp session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt gpsclock nmea sirf ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="intel i965 fbdev void"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Thanks for help.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30897
Location: here

PostPosted: Wed Dec 06, 2017 7:13 am    Post subject: Reply with quote

Your problem is
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed  -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize -Wl,-flto"

You mixed ldflags and cflags, defaults ldflags are
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed"

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Thu Dec 07, 2017 5:31 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Your problem is
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed  -O2 -pipe -march=native -flto=4 -fuse-linker-plugin -fomit-frame-pointer -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -ftree-vectorize -Wl,-flto"

You mixed ldflags and cflags, defaults ldflags are
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed"


Thanks for the reply. I have tried to make this so but I get the same error. Even though I have attempted to set LDFLAGS as you say.

Code:

gene@go:~# emerge --info
...
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
...


How or where else can -pipe be pulled in?
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Wed Jan 24, 2018 1:53 pm    Post subject: openssh-7.6_p1-r3 fails with ld errors Reply with quote

I have two almost identical laptops configured similarly and get to the same failure on each.

Code:

ld -o ssh ssh.o readconf.o clientloop.o sshtty.o sshconnect.o sshconnect2.o mux.o -L. -Lopenbsd-compat/ -Wl,-O1 -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fstack-protector-strong -Wl,-O1 -Wl,--as-needed -pie  -lssh -lopenbsd-compat  -lssl -lcrypto -ldl -lldap -lutil -lz  -lcrypt -lresolv
ld: -Wl,-O1: unknown option


What is the actual error? According the man page for ld; -Wl,-O1 are acceptable.

This may not be enough info. I can supply more.

I also have what I think is a related problem in another post:

https://forums.gentoo.org/viewtopic-t-1073258-highlight-.html

Thanks for help.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Thu Jan 25, 2018 8:25 pm    Post subject: Reply with quote

I think you got your LDFLAGS and CFLAGS mixed up. Ld does not take gcc options and gcc may not take ld options (it may pass stuff to the linker conditionally however).

Clear out your LDFLAGS and CFLAGS, especially remove gcc flags (like CFLAGS) from LDFLAGS, and ensure that works first.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Fri Jan 26, 2018 2:28 am    Post subject: Reply with quote

The emerge --info in the linked post agrees with eccerr0r's diagnosis. However, the current end of that thread contains a claim that the LDFLAGS have been set right. imesg, what are your current LDFLAGS for this package?

To elaborate slightly on eccerr0r's post, ld understands -O1. gcc understands -Wl,-O1 to be a request to pass -O1 to ld. You cannot pass -Wl,-O1 to ld directly.
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Fri Jan 26, 2018 3:31 pm    Post subject: Reply with quote

Hu wrote:
The emerge --info in the linked post agrees with eccerr0r's diagnosis. However, the current end of that thread contains a claim that the LDFLAGS have been set right. imesg, what are your current LDFLAGS for this package?

To elaborate slightly on eccerr0r's post, ld understands -O1. gcc understands -Wl,-O1 to be a request to pass -O1 to ld. You cannot pass -Wl,-O1 to ld directly.


There in lies the problem. I have not intentionally set LDFLAGS at all. That is what I am trying to determine i.e. how are LDFLAGS being set.

From the man page:
Code:

Note---if the linker is being invoked indirectly, via a compiler driver (e.g. gcc) then all the linker command line options should be prefixed by
       -Wl, (or whatever is appropriate for the particular compiler driver) like this:

                 gcc -Wl,--start-group foo.o bar.o -Wl,--end-group


...

Code:

-O level
           If level is a numeric values greater than zero ld optimizes the output.  This might take significantly longer and therefore probably should
           only be enabled for the final binary.  At the moment this option only affects ELF shared library generation.  Future releases of the linker may
           make more use of this option.  Also currently there is no difference in the linker's behaviour for different non-zero values of this option.
           Again this may change with future releases.


From the man page it looks like 'ld: -Wl,-O1' should be ok.

Thanks for the help.
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7470

PostPosted: Fri Jan 26, 2018 4:17 pm    Post subject: Reply with quote

LDFLAGS is set in your make.conf and if you wonder why that user from the link you gave has problem with them it's because this user has set LDFLAGS="${LDFLAGS} ${CFLAGS} -Wl,-flto" in his make.conf, which end up with his cflags pass to ld.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Fri Jan 26, 2018 4:52 pm    Post subject: Reply with quote

Again the suggestion is to totally get rid of extra CFLAGS/LDFLAGS that are written in your /etc/make.conf or /etc/portage/make.conf .
Then start adding them back and seeing which ones break things again and fix from there. Unless the other post has the wrong make.conf - this is all we can work with to figure out what's going on...

Perhaps we should get a mod to merge these threads ...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Fri Jan 26, 2018 6:56 pm    Post subject: Reply with quote

eccerr0r wrote:
Again the suggestion is to totally get rid of extra CFLAGS/LDFLAGS that are written in your /etc/make.conf or /etc/portage/make.conf .
Then start adding them back and seeing which ones break things again and fix from there. Unless the other post has the wrong make.conf - this is all we can work with to figure out what's going on...

Perhaps we should get a mod to merge these threads ...


The guy in the other thread was me. That problem has not resolved. I removed all LDFLAGS I could find after that. I still had CFLAGS and CXXFLAGS in make.conf but now I have that all removed and the problem persists. LDFLAGS is set somewhere else.

Code:

root@go3:~# emerge --info
Portage 2.3.20 (python 3.5.4-final-0, default/linux/amd64/17.0/no-multilib, gcc-7.2.0, glibc-2.26-r5, 4.14.8 x86_64)
=================================================================
System uname: Linux-4.14.8-x86_64-Intel-R-_Core-TM-_i7-6560U_CPU_@_2.20GHz-with-gentoo-2.4.1
KiB Mem:    16318472 total,    887052 free
KiB Swap:   14648316 total,  14648316 free
Timestamp of repository gentoo: Fri, 26 Jan 2018 14:47:00 +0000
Head commit of repository gentoo: bc2ecf6e55c2aa5a7ba262d4036f59fd1c7eed66

Timestamp of repository poly-c: Wed, 10 Jan 2018 20:57:36 +0000
sh bash 4.4_p12-r1
ld GNU gold (Gentoo 2.28 p1.2 2.28) 1.14
app-shells/bash:          4.4_p12-r1::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.4.6-r1::gentoo, 3.5.4-r1::gentoo, 3.6.4::gentoo
dev-util/cmake:           3.10.2::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.27::gentoo, 2.28-r2::gentoo, 2.28.1::gentoo, 2.29::gentoo, 2.29.1-r1::gentoo
sys-devel/gcc:            6.3.0::gentoo, 7.1.0-r1::gentoo, 7.2.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.14::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r5::gentoo
Repositories:

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

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

gnome
    location: /var/lib/layman/gnome
    masters: gentoo
    priority: 50

haarp
    location: /var/lib/layman/haarp
    masters: gentoo
    priority: 50

java
    location: /var/lib/layman/java
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    masters: gentoo
    priority: 50

poly-c
    location: /var/lib/layman/poly-c
    masters: gentoo
    priority: 50

rust
    location: /var/lib/layman/rust
    masters: gentoo
    priority: 50

stefantalpalaru
    location: /var/lib/layman/stefantalpalaru
    masters: gentoo rust
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
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"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j3"
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="X a52 aac acl acpi aio alsa amd64 archive berkdb bluetooth bluray branding bzip2 cairo caps cdda cdr clang cleartype cli colord corefonts crypt cups curl cxx dbus dri drm dts dvd dvdr eds emboss encode evo exif fam fat fdt ffmpeg filecaps firefox flac fortran gcj gdbm gif glamor gnome gnome-keyring gnome-online-accounts gnutls gpm gps graphite gstreamer gtk gtk3 hackrf hpcups iconv introspection ipv6 javascript jpeg lcms ldap libnotify librtmp libsecret lto mad mjpeg mng modules motif mp3 mp4 mpeg nautilus ncurses nfs nfsv4 nfsv41 nls nptl nsplugin ntfs ntp obex ogg opengl openmp pam pango pcre pdf perl png policykit ppds pulseaudio q16 qt3support qt5 readline rtlsdr rtmp samba sdl seccomp sendto smartcard sna spell ssl startup-notification subtitles svg systemd tcpd tiff tracker truetype type1 udev udisks unicode upnp upower usb vaapi vhost-net vorbis wayland wifi wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="garmin garmintxt gpsclock nmea0183 ublox" INPUT_DEVICES="libinput" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_4 python3_5" RUBY_TARGETS="ruby20 ruby21 ruby23" SANE_BACKENDS="hp net" USERLAND="GNU" VIDEO_CARDS="intel i965 fbdev void"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Fri Jan 26, 2018 7:00 pm    Post subject: Reply with quote

Is it in your environment?

# echo $LDFLAGS

Did you set it in /etc/portage/bashrc?

You have set it somewhere, I can't think of it coming in manually and it's not the default setup... I'm not sure what the overlays do, I hope those didn't add this on somehow.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Fri Jan 26, 2018 11:38 pm    Post subject: Reply with quote

Mods should merge https://forums.gentoo.org/viewtopic-t-1075912-highlight-.html - looks like the same problem.

Somehow you're still adding in bad LDFLAGS and CFLAGS.

If you have both LDFLAGS and CFLAGS completely unset or set to "" (empty) - portage should still work. Is this the case?

I don't believe that the LDFLAGS listed above is valid. Start with an empty one.

-pipe belongs in CFLAGS along with -O2 and -march=xxx. The linker is too late to choose most instructions and does not make sense to put those flags there.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Jan 27, 2018 12:45 am    Post subject: Reply with quote

On my system, it appears it is default. I blanked /etc/portage/make.conf, then ran /usr/bin/env -i /usr/bin/emerge --info (so as not to have any environment variables that might affect it).
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Per the GNU Make Info page, the intended use of $LDFLAGS is:
Code:
'LDFLAGS'
     Extra flags to give to compilers when they are supposed to invoke
     the linker, 'ld', such as '-L'.  Libraries ('-lfoo') should be
     added to the 'LDLIBS' variable instead.
Based on this and a few other places in the Info page (and ignoring one such place which gives conflicting advice), $LDFLAGS is meant to be valid input for calling gcc to run the linker, not for directly invoking the linker. From that interpretation, I would consider the failed command quoted in the opening post of this thread to be incorrect. OP's flags should work as-is and openssh should not be calling ld directly. It should be calling gcc, and letting gcc call ld with appropriately reprocessed arguments. The question then becomes, why is this not broken for everyone? It's likely extremely rare that Gentoo users have an $LDFLAGS that can be directly consumed by ld, so if the openssh Makefile calls ld and passes $LDFLAGS, everyone should see it broken.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Sat Jan 27, 2018 1:09 am    Post subject: Reply with quote

Thanks for merge, was getting tedious to switch to the other page to reference :)

And ahhhh... I was tricked by a misnomer, that would be true that using gcc to link would require different command than using ld directly to link and hence that default really is a default if it's passed to gcc to do the linking.

Still odd that somehow the wrong flags are being passed to the linker causing it to fail.

Plus errors from configure that look like
Quote:
Code:
Checking for cc... ld: -pipe: unknown option
ld: use the --help option for usage information


The openssh build rule looks like:
Code:
LD=gcc
[...]
ssh$(EXEEXT): $(LIBCOMPAT) libssh.a $(SSHOBJS)
        $(LD) -o $@ $(SSHOBJS) $(LDFLAGS) -lssh -lopenbsd-compat $(SSHLIBS) $(LIBS) $(GSSLIBS)

So somehow openssh got LD set to ld or this isn't the actual rule that's being used...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Sat Jan 27, 2018 5:17 pm    Post subject: Reply with quote

Hu wrote:
On my system, it appears it is default. I blanked /etc/portage/make.conf, then ran /usr/bin/env -i /usr/bin/emerge --info (so as not to have any environment variables that might affect it).
Code:
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Per the GNU Make Info page, the intended use of $LDFLAGS is:
Code:
'LDFLAGS'
     Extra flags to give to compilers when they are supposed to invoke
     the linker, 'ld', such as '-L'.  Libraries ('-lfoo') should be
     added to the 'LDLIBS' variable instead.
Based on this and a few other places in the Info page (and ignoring one such place which gives conflicting advice), $LDFLAGS is meant to be valid input for calling gcc to run the linker, not for directly invoking the linker. From that interpretation, I would consider the failed command quoted in the opening post of this thread to be incorrect. OP's flags should work as-is and openssh should not be calling ld directly. It should be calling gcc, and letting gcc call ld with appropriately reprocessed arguments. The question then becomes, why is this not broken for everyone? It's likely extremely rare that Gentoo users have an $LDFLAGS that can be directly consumed by ld, so if the openssh Makefile calls ld and passes $LDFLAGS, everyone should see it broken.


So what to do. As stated I have two dell xps 13s which are configured almost the same and both have this problem. Both balk on openssh and List-MoreUtils-XS.

Thanks for the help.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9678
Location: almost Mile High in the USA

PostPosted: Sat Jan 27, 2018 6:17 pm    Post subject: Reply with quote

Well see what happens if you unset the environment variable LD
Code:
# unset LD

If i set LD=ld, I can reproduce the problem verbatim with both List-MoreUtils-XS and openssh .
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Jan 27, 2018 11:05 pm    Post subject: Reply with quote

That fits, and may also explain why this is limited to a few packages. Normally, setting $LD would not cause this:
cat -n Makefile:
     1   LD=gcc
     2   test:
     3      echo LD=$(LD)
Code:
$ make
echo LD=gcc
LD=gcc
$ LD=ld make
echo LD=gcc
LD=gcc
$ make LD=ld
echo LD=ld
LD=ld
$ LD=ld make -e
echo LD=ld
LD=ld
From this, a normal user calling GNU make behaves as I expect:
  • Without -e, environment variables are overridden by Make variables
  • Make command line parameters override Make variables
  • With -e, environment variables override Make variables.
However, openssh Makefile.in does not set LD=gcc (as initially implied by eccerr0r's prior post, which shows a fragment of the generated Makefile). It sets LD=@LD@, and lets configure substitute in a value for @LD@. In turn, openssh configure lets environment variable $LD influence the value substituted for @LD@. So while the Makefile fragment that eccerr0r quoted above would work fine on its own, that is not necessarily the fragment that OP gets. If eccerr0r is correct that OP has set $LD, then OP gets a fragment with LD=ld, and breakage follows. Packages that do not propagate environment variable $LD into a Makefile variable LD are unaffected and build normally.
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Sun Feb 04, 2018 12:39 am    Post subject: Reply with quote

Hu wrote:
That fits, and may also explain why this is limited to a few packages. Normally, setting $LD would not cause this:
cat -n Makefile:
     1   LD=gcc
     2   test:
     3      echo LD=$(LD)
Code:
$ make
echo LD=gcc
LD=gcc
$ LD=ld make
echo LD=gcc
LD=gcc
$ make LD=ld
echo LD=ld
LD=ld
$ LD=ld make -e
echo LD=ld
LD=ld
From this, a normal user calling GNU make behaves as I expect:
  • Without -e, environment variables are overridden by Make variables
  • Make command line parameters override Make variables
  • With -e, environment variables override Make variables.
However, openssh Makefile.in does not set LD=gcc (as initially implied by eccerr0r's prior post, which shows a fragment of the generated Makefile). It sets LD=@LD@, and lets configure substitute in a value for @LD@. In turn, openssh configure lets environment variable $LD influence the value substituted for @LD@. So while the Makefile fragment that eccerr0r quoted above would work fine on its own, that is not necessarily the fragment that OP gets. If eccerr0r is correct that OP has set $LD, then OP gets a fragment with LD=ld, and breakage follows. Packages that do not propagate environment variable $LD into a Makefile variable LD are unaffected and build normally.


Thanks for helping. I have been away and have just got back to this thread.

It seems that some problem I had "LD=ld" fixed it but I can't for the life of me find where I set it now.

Code:

gene@go3:~# echo $LD
ld


Both packages emerged when I unset LD.

Thanks for the help. I still need a clue as to where I set LD=ld.

Thanks,
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Sat Mar 10, 2018 2:18 pm    Post subject: Reply with quote

This thread died. There is still not an answer other than unset LD. I still have the problem.

Thanks,
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21607

PostPosted: Sat Mar 10, 2018 3:59 pm    Post subject: Reply with quote

Unsetting LD in the running shells and removing it from your dotfiles is the answer. It is not normally set. We do not know where you set it. If you cannot find it via recursive grep, you could try using the shell's execution trace feature (set -x for a running shell; pass -x when starting a new one), but beware that this does not nest, so it might be turned off early.
Back to top
View user's profile Send private message
imesg
Guru
Guru


Joined: 12 Jul 2002
Posts: 445

PostPosted: Tue Mar 13, 2018 1:08 pm    Post subject: Reply with quote

Hu wrote:
Unsetting LD in the running shells and removing it from your dotfiles is the answer. It is not normally set. We do not know where you set it. If you cannot find it via recursive grep, you could try using the shell's execution trace feature (set -x for a running shell; pass -x when starting a new one), but beware that this does not nest, so it might be turned off early.


Thanks for the advice Hu. All I wanted to know is where to start because I had run out of ideas. I know you do not know where. But now because of your advice I may be able to find what is going on.

Thanks again,
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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