Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage Bugs?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
uxcn
n00b
n00b


Joined: 27 Nov 2015
Posts: 41
Location: Seattle, WA

PostPosted: Mon Dec 28, 2015 9:51 pm    Post subject: Portage Bugs? Reply with quote

I'm having trouble understanding some results using portage.

My default compiler is setup as clang...

make.conf
Code:

CC="x86_64-pc-linux-gnu-clang-3.7"
CXX="x86_64-pc-linux-gnu-clang++-3.7"

BUILD_CC="x86_64-pc-linux-gnu-clang-3.7"
BUILD_CXX="x86_64-pc-linux-gnu-clang++-3.7"

CFLAGS="-O3 -march=ivybridge -mtune=ivybridge -flto"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-O3 -march=ivybridge -mtune=ivybridge -flto -Wl,--as-needed"

PKGDIR="/var/pkg/ivybridge/clang-3.7"


However, I have a package.env/gcc setup for pypy since it doesn't compile with clang...

env/gcc.conf
Code:

CC="x86_64-pc-linux-gnu-gcc-4.9.3"
CXX="x86_64-pc-linux-gnu-g++-4.9.3"

BUILD_CC="x86_64-pc-linux-gnu-gcc-4.9.3"
BUILD_CXX="x86_64-pc-linux-gnu-g++-4.9.3"

CFLAGS="-O3 -march=ivybridge -mtune=ivybridge --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=6144 -flto=8 -pipe"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O3 -Wl,--as-needed -Wl,-flto=8"

PKGDIR="/var/pkg/ivybridge/gcc-4.9"


package.env/gcc
Code:

<=dev-python/pypy-4.0.1           gcc.conf


However, running emerge --info for pypy returns the clang environment information...

Code:

jason@io ~ emgi pypy
Portage 2.2.20.1 (python 3.3.5-final-0, funtoo/1.0/linux-gnu/arch/pure64, gcc-4.9.3, glibc-2.20-r2, 4.3.3-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.3.3-gentoo-x86_64-Intel-R-_Core-TM-_i7-3632QM_CPU_@_2.20GHz-with-gentoo-2.2.0
KiB Mem:    12176904 total,   9598000 free
KiB Swap:    4194300 total,   4194300 free
sh bash 4.3_p39-r1
ld GNU gold (Funtoo 2.25 2.25.0) 1.11
distcc 3.2rc1 x86_64-pc-linux-gnu [disabled]
ccache version 3.2.4 [enabled]
app-shells/bash:          4.3_p39-r1::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.10-r3::gentoo, 3.3.5-r2::gentoo
dev-util/ccache:          3.2.4::gentoo
dev-util/cmake:           3.4.1::gentoo
sys-apps/baselayout:      2.2.0-r6::gentoo
sys-apps/openrc:          0.18.3-r1::gentoo
sys-apps/sandbox:         2.9::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r1::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo
sys-devel/binutils:       2.25-r2::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6-r1::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA Oracle-BCLA-JavaSE FraunhoferFDK NVIDIA-CUDA Google-TOS AdobeFlash-11.x Oracle-BCLA-JavaSE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=ivybridge -mtune=ivybridge -flto"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O3 -march=ivybridge -mtune=ivybridge -flto"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--usepkg"
FEATURES="assume-digests binpkg-logs buildpkg candy ccache compress-build-logs config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch usersandbox usersync xattr"
FFLAGS="-march=core-avx-i -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-O3 -march=ivybridge -mtune=ivybridge -flto -Wl,--as-needed"
MAKEOPTS="-j16"
PKGDIR="/var/pkg/ivybridge/clang-3.7"
PORTAGE_CONFIGROOT="/"
PORTAGE_TMPDIR="/var/tmp"
USE="X aac acl acpi aio alsa amd64 avahi berkdb bluetooth bluray bzip2 c++0x c++11 c++14 cairo caps cdparanoia clang cracklib crypt cuda cups cxx dbus dri dts dvd egl eglfs flac gdbm gl glamor gles2 gnutls gold graphite gtk3 iconv icu inotify ipv6 jemalloc jpeg jpeg2k libnotify lz4 lzma lzo matroska mmx modules mp3 mpd mpeg mudflap musicbrainz ncurses nfsv4 nfsv41 nls nptl nsplugin numa ogg opengl openmp opus otr pam pcre png pulseaudio python qt5 readline resolvconf sasl snmp spice sse sse2 ssl syslog tcpd theora threads tls udev unicode usb uxa vaapi vdpau vim-syntax vorbis vpx wayland webp wifi x264 x265 xattr xft xkb xml xpm xvid xvmc xz zeroconf zip zlib" ABI_X86="64" APACHE2_MODULES="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 authn_core authz_core socache_shmcb unixd" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" 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 itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="evdev synaptics 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-5" PYTHON_ABIS="2.7 3.3" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python2_7 python3_3 pypy" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby20 ruby21 ruby22" USERLAND="GNU" VIDEO_CARDS="modesetting intel nvidia" 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, INSTALL_MASK, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS

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

dev-python/pypy-4.0.1::gentoo was built with the following:
USE="bzip2 gdbm jit ncurses -doc -low-memory (-sandbox) -shadowstack -sqlite -test -tk" CPU_FLAGS_X86="-sse2"
CFLAGS=""
CXXFLAGS=""
LDFLAGS=""


Although, when compiling it seems correct...

Code:

[platform:execute] x86_64-pc-linux-gnu-gcc-4.9.3 /var/tmp/portage/dev-python/pypy-4.0.1/temp/usession-release-4.0.1-0/platcheck_45.o -pthread -Wl,-O3 -Wl,--as-needed -Wl,-flto=8 -Wl,--export-dynamic -lz -lrt -o /var/tmp/portage/dev-python/pypy-4.0.1/temp/usession-release-4.0.1-0/platcheck_45


But, the package doesn't seem to be stored in the correct directory...

Code:

jason@io ~ ll /var/pkg/ivybridge/gcc-4.9/dev-python/pypy*
zsh: no matches found: /var/pkg/ivybridge/gcc-4.9/dev-python/pypy*
jason@io ~ ll /var/pkg/ivybridge/clang-3.7/dev-python/pypy*                                                                                                                                                                                                                                                                   
-rw-r--r-- 1 root root 28M Dec 28 13:48 /var/pkg/ivybridge/clang-3.7/dev-python/pypy-4.0.1.tbz2


I'm not sure if these are bugs, or if I'm using portage incorrectly, but any help would be sincerely appreciated.

For whatever it is worth, here is what /etc/portage looks like with respect to pypy,

Code:

jason@io ~ ag pypy /etc/portage
/etc/portage/package.env/ccache
2:<=dev-python/pypy-4.0.1 no-ccache.conf
3:<=dev-python/pypy3-2.4.0 no-ccache.conf

/etc/portage/package.env/gcc
7:<=dev-python/pypy-4.0.1           gcc.conf # (no compile)
8:<=dev-python/pypy3-2.4.0          gcc.conf # (no compile)

/etc/portage/package.use/base
1:dev-python/pypy shadowstack
2:dev-python/pypy3 shadowstack

/etc/portage/package.keywords/user
1:=dev-python/pypy3-9999 **

/etc/portage/make.clang-3.7.conf
13:PYTHON_TARGETS="python2_7 python3_3 pypy"

/etc/portage/make.gcc-4.9.conf
13:PYTHON_TARGETS="python2_7 python3_3 pypy"

_________________
Some possibly useful scripts...
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5879

PostPosted: Mon Dec 28, 2015 10:53 pm    Post subject: Reply with quote

Quote:
Code:
funtoo/1.0/linux-gnu/arch/pure64

Can you reproduce the problem on Gentoo?
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Mon Dec 28, 2015 11:08 pm    Post subject: Reply with quote

Funtoo also runs a modified portage, so it's hard to say if this is due to funtoo patches or a bug in main portage.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43560
Location: 56N 3W

PostPosted: Mon Dec 28, 2015 11:18 pm    Post subject: Reply with quote

Moved from Portage & Programming to Unsupported Software.

Just so Gentoo users are not being mislead.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
uxcn
n00b
n00b


Joined: 27 Nov 2015
Posts: 41
Location: Seattle, WA

PostPosted: Mon Dec 28, 2015 11:24 pm    Post subject: Reply with quote

Ant P. wrote:
Can you reproduce the problem on Gentoo?


It will take me a little while to build a gentoo vm, but my initial guess is yes. I just updated my portage configs on github in case anybody sees any obvious errors.
_________________
Some possibly useful scripts...
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7099

PostPosted: Mon Dec 28, 2015 11:45 pm    Post subject: Reply with quote

I'm surprise dol-sen don't know that :)

But portage totally ignore any env settings (in file, from command line it will) for a package when displaying --info
if you set CFLAGS="totally buggy" for vlc, emerge --info vlc will still output your CFLAGS set in your make.conf and not the "totally buggy" ones as your cflags, and it will output down the info part, the cflags vlc WAS BUILD with.
But when your run emerge vlc, this time, you'll endup with "C compiler cannot create" because emerge will ask vlc to be build with the "totally buggy" cflags.

It would had be more logic portage output the CFLAGS that will be use when building vlc as you specify that package with --info.
I'm fully aware of this weakness of --info, but after thinking about it, how would portage solve a "emerge --info vlc gcc" where gcc use CFLAGS="x" and vlc use a CFLAGS="z"?

Because it ignore them, i never think it would be a real problem, but yes that's one it seem for your case where your env file settings is using a different compiler and portage should use that compiler path for pkg... That's something handle when cross-building, but that's something that will be harder to implement when looking for a binary package that is build with a compiler that is not default one, but still not doing any cross-building.

if you asked me: yes, i would prefer a --info fully aware of all env settings of the package and producing an output EXACTLY like "emerge vlc" will run it instead of that "fake defautl" output, and even if for that, --info would be limit to one package only.
It's more valuable to not be able to do "emerge --info vlc gcc" but when doing "emerge --info vlc" you'll get really how the environment will appears when you build it.

So definitively a portage bug as this mistake prevent portage from finding the correct path for your binaries packages.
Back to top
View user's profile Send private message
quilosaq
Veteran
Veteran


Joined: 22 Dec 2009
Posts: 1358

PostPosted: Mon Dec 28, 2015 11:55 pm    Post subject: Reply with quote

Quote:
PKGDIR="/var/pkg/ivybridge/clang-3.7"
Do you have defined PKGDIR variable in your make.conf?
Code:
grep PKGDIR /idontknowwhere/make.conf
Back to top
View user's profile Send private message
uxcn
n00b
n00b


Joined: 27 Nov 2015
Posts: 41
Location: Seattle, WA

PostPosted: Tue Dec 29, 2015 12:15 am    Post subject: Reply with quote

quilosaq wrote:
Do you have defined PKGDIR variable in your make.conf?

Yes. My configs are on github if you can see any obvious error. FYI, there are a few layers of symlinks.
_________________
Some possibly useful scripts...
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2803
Location: Richmond, BC, Canada

PostPosted: Tue Dec 29, 2015 12:20 am    Post subject: Reply with quote

krinn wrote:
I'm surprise dol-sen don't know that :)


I only know the areas of code I've mostly worked on. Plus I've never done/had the need for anything like that, so don't have the first hand knowledge about it.

ETOOMANYPROJECTS ;)

All I can offer is the wiki page for it: https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Per-package_environment_variables

[EDIT] I have seen other forum threads or emails about switching compilers per package... Have you searched for them? They may have the answer you are looking for.
_________________
Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch...


Last edited by dol-sen on Tue Dec 29, 2015 12:54 am; edited 1 time in total
Back to top
View user's profile Send private message
uxcn
n00b
n00b


Joined: 27 Nov 2015
Posts: 41
Location: Seattle, WA

PostPosted: Tue Dec 29, 2015 12:31 am    Post subject: Reply with quote

krinn wrote:
I'm surprise dol-sen don't know that :)

But portage totally ignore any env settings (in file, from command line it will) for a package when displaying --info
if you set CFLAGS="totally buggy" for vlc, emerge --info vlc will still output your CFLAGS set in your make.conf and not the "totally buggy" ones as your cflags, and it will output down the info part, the cflags vlc WAS BUILD with.
But when your run emerge vlc, this time, you'll endup with "C compiler cannot create" because emerge will ask vlc to be build with the "totally buggy" cflags.



Ahh, that would explain the difference between --info and the build. The build does do the correct thing, sans storing binary package though, which is what's most important for me.

krinn wrote:

It would had be more logic portage output the CFLAGS that will be use when building vlc as you specify that package with --info.
I'm fully aware of this weakness of --info, but after thinking about it, how would portage solve a "emerge --info vlc gcc" where gcc use CFLAGS="x" and vlc use a CFLAGS="z"?


The intuitive thing for me would be looping over each package passed to --info, but I'm honestly not sure I totally understand the semantics for --info. I know I try to use it when submitting bug reports.

I'm still not sure why the binary package is stored in the incorrect PKGDIR though. It used to work correctly with the setup, but at some point it stopped working (only recently discovered issue). As soon as I have some time I'm going to setup a gentoo vm and see if I can re-create the issue.
_________________
Some possibly useful scripts...
Back to top
View user's profile Send private message
uxcn
n00b
n00b


Joined: 27 Nov 2015
Posts: 41
Location: Seattle, WA

PostPosted: Tue Dec 29, 2015 12:35 am    Post subject: Reply with quote

dol-sen wrote:
I have seen other forum threads or emails about switching compilers per package... Have you searched for them? They may have the answer you are looking for.

I actually tried digging through this to see if maybe I was doing something wrong, but based on what I read I couldn't see anything wrong.
_________________
Some possibly useful scripts...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software 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