On Wednesday, September 09, 2015 7:04:11 PM Fernando Rodriguez wrote: > On Wednesday, September 09, 2015 3:37:36 PM Ajai Khattri wrote: > > On Fri, 4 Sep 2015, Fernando Rodriguez wrote: > > > > > Post your emerge --info. > > > Why do you have i686-pc-linux-gnu-gcc on a 64-bit machine? > > > > FYI, this is 32bit Gentoo running on a 64bit virtual machine (so it has a > > 64bit kernel) because awhile ago I upgraded from a 32bit setup. Was hoping > > I wouldn't have to reinstall the whole OS... > > > > Output from emerge --info: > > > > Portage 2.2.20.1 (python 2.7.9-final-0, default/linux/x86/13.0, gcc-4.6.3, > > glibc-2.20-r2, 4.1.5-x86_64-linode61 x86_64) > > ================================================================= > > System uname: > > Linux-4.1.5-x86_64-linode61-x86_64-Intel-R-_Xeon-R- > _CPU_E5-2680_v3_@_2.50GHz-with-gentoo-2.2 > > KiB Mem: 2047052 total, 24452 free > > KiB Swap: 524284 total, 523404 free > > Timestamp of repository gentoo: Mon, 17 Aug 2015 20:30:01 +0000 > > sh bash 4.3_p33-r2 > > ld GNU ld (Gentoo 2.24 p1.4) 2.24 > > app-shells/bash: 4.3_p33-r2::gentoo > > dev-lang/perl: 5.20.2::gentoo > > dev-lang/python: 2.4.6::gentoo, 2.5.4-r4::gentoo, 2.6.9::gentoo, > > 2.7.9-r1::gentoo, 3.1.4-r3::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, > > 3.4.1::gentoo > > dev-util/cmake: 3.2.2::gentoo > > dev-util/pkgconfig: 0.28-r2::gentoo > > sys-apps/baselayout: 2.2::gentoo > > sys-apps/openrc: 0.12.4::gentoo > > sys-apps/sandbox: 2.6-r1::gentoo > > sys-devel/autoconf: 2.13::<unknown repository>, 2.69::gentoo > > sys-devel/automake: 1.4_p6::<unknown repository>, 1.5::<unknown > > repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, > > 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, > > 1.10.3::gentoo, 1.11.6::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, > > 1.14.1::gentoo, 1.15::gentoo > > sys-devel/binutils: 2.24-r3::gentoo > > sys-devel/gcc: 4.1.2::<unknown repository>, 4.3.4::gentoo, > > 4.4.5::gentoo, 4.5.4::gentoo, 4.6.3::gentoo, 4.7.3-r1::gentoo, > > 4.8.4::gentoo > > sys-devel/gcc-config: 1.7.3::gentoo > > sys-devel/libtool: 2.4.6::gentoo > > sys-devel/make: 4.1-r1::gentoo > > sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) > > sys-libs/glibc: 2.20-r2::gentoo > > Repositories: > > > > gentoo > > location: /usr/portage > > sync-type: rsync > > sync-uri: rsync://rsync.gentoo.org/gentoo-portage > > priority: -1000 > > > > x-portage > > location: /usr/local/portage > > masters: gentoo > > priority: 0 > > > > ACCEPT_KEYWORDS="x86" > > ACCEPT_LICENSE="* -@EULA" > > CBUILD="i686-pc-linux-gnu" > > CFLAGS="-O2 -mtune=i686 -pipe" > > CHOST="i686-pc-linux-gnu" > > 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.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ > > /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ > > /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ > > /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ > > /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ > > /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ > > /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" > > CXXFLAGS="-O2 -mtune=i686 -pipe" > > DISTDIR="/usr/portage/distfiles" > > FCFLAGS="-O2 -march=i686 -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" > > FFLAGS="-O2 -march=i686 -pipe" > > GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ > > http://gentoo.llarian.net/ http://mirrors.rit.edu/gentoo/ > > http://gentoo.netnitco.net" > > LDFLAGS="-Wl,-O1 -Wl,--as-needed" > > 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" > > PORTAGE_TMPDIR="/var/tmp" > > USE="apache2 bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm > > iconv ipv6 ithreads modules ncurses nls nptl nptlonly openmp pam pcre > > readline seccomp session ssl tcpd threads unicode x86 zlib" ABI_X86="32" > > ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci > > emu10k1 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_anon authn_dbd > > authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile > > authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd > > deflate dir disk_cache env expires ext_filter file_cache filter headers > > ident imagemap include info log_config logio mem_cache mime mime_magic > > negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http > > rewrite setenvif so speling status unique_id userdir usertrack > > vhost_alias" APACHE2_MPMS="worker" 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" INPUT_DEVICES="keyboard mouse evdev" 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="python2_7" > > PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" > > VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage > > sis tdfx trident vesa via vmware 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" > > Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, > > LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, > > PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON > > > > > > > > -- > > A > > > > You may be able to enable the 64bit ABI just for go. I recently did the same > to enable x32 abi on amd64 for experimenting (which BTW, according to CERN's > evaluation can save up to 30% memory and 30% cpu usage over amd64 for some > applications). This is how I did it: > > 1. From an amd64 stage3 grab the following files and copy them to your system > (of the libraries you may only need libc.so.6 but I copied them all to be > safe): > > /lib64/libc.so* > /lib64/libm.so* > /lib64/libpthread.so* > /lib64/libdl.so* > /usr/include/gnu/stubs-64.h > > 2. Add the following to /etc/portage/make.conf: > > MULTILIB_ABIS="amd64 x86"
I don't know if order matters here, but make it "x86 amd64" just in case, Mine is "amd64 x86 x32". > 3. Add the following to /etc/portage/profile/use.mask: > > -abi_x86_64 > > 4. Rebuild binutils, gcc and glibc (make sure this rebuilds the gcc version > for the profile that you're using): > > # emerge -v sys-devel/binutils sys-devel/gcc sys-libs/glibc > > 5. Add the following to /etc/portage/env/dev-lang/go and emerge go (if it > fails to build uncomment the LDFLAGS like, it causes configure failures with > some packages): > > CFLAGS="-m64" > CXXFLAGS="-m64" > #LDFLAGS="-m elf64_x86_64" > > This worked for me because the x86_64 gcc can compile x32 code. I believe i686 > can do the same for amd64, it only needs to be rebuilt to get the helper > libraries (libgcc and friends). Of course, if any other go ebuilds have > dependencies on other libraries you will have to add the abi_x86_64 use flag > manually to those libraries (autounmask and the dep solver won't figure it out) > but you only need to do this for leaf packages that you want to build with an > alternate ABI. I think you can run "ABI=amd64 emerge ..." to have portage > solve it but haven't tried it. If you decide to try this let me know if it > worked. > > -- Fernando Rodriguez