1 |
On Wednesday, September 09, 2015 3:37:36 PM Ajai Khattri wrote: |
2 |
> On Fri, 4 Sep 2015, Fernando Rodriguez wrote: |
3 |
> |
4 |
> > Post your emerge --info. |
5 |
> > Why do you have i686-pc-linux-gnu-gcc on a 64-bit machine? |
6 |
> |
7 |
> FYI, this is 32bit Gentoo running on a 64bit virtual machine (so it has a |
8 |
> 64bit kernel) because awhile ago I upgraded from a 32bit setup. Was hoping |
9 |
> I wouldn't have to reinstall the whole OS... |
10 |
> |
11 |
> Output from emerge --info: |
12 |
> |
13 |
> Portage 2.2.20.1 (python 2.7.9-final-0, default/linux/x86/13.0, gcc-4.6.3, |
14 |
> glibc-2.20-r2, 4.1.5-x86_64-linode61 x86_64) |
15 |
> ================================================================= |
16 |
> System uname: |
17 |
> Linux-4.1.5-x86_64-linode61-x86_64-Intel-R-_Xeon-R- |
18 |
_CPU_E5-2680_v3_@_2.50GHz-with-gentoo-2.2 |
19 |
> KiB Mem: 2047052 total, 24452 free |
20 |
> KiB Swap: 524284 total, 523404 free |
21 |
> Timestamp of repository gentoo: Mon, 17 Aug 2015 20:30:01 +0000 |
22 |
> sh bash 4.3_p33-r2 |
23 |
> ld GNU ld (Gentoo 2.24 p1.4) 2.24 |
24 |
> app-shells/bash: 4.3_p33-r2::gentoo |
25 |
> dev-lang/perl: 5.20.2::gentoo |
26 |
> dev-lang/python: 2.4.6::gentoo, 2.5.4-r4::gentoo, 2.6.9::gentoo, |
27 |
> 2.7.9-r1::gentoo, 3.1.4-r3::gentoo, 3.2.5-r6::gentoo, 3.3.5-r1::gentoo, |
28 |
> 3.4.1::gentoo |
29 |
> dev-util/cmake: 3.2.2::gentoo |
30 |
> dev-util/pkgconfig: 0.28-r2::gentoo |
31 |
> sys-apps/baselayout: 2.2::gentoo |
32 |
> sys-apps/openrc: 0.12.4::gentoo |
33 |
> sys-apps/sandbox: 2.6-r1::gentoo |
34 |
> sys-devel/autoconf: 2.13::<unknown repository>, 2.69::gentoo |
35 |
> sys-devel/automake: 1.4_p6::<unknown repository>, 1.5::<unknown |
36 |
> repository>, 1.6.3::<unknown repository>, 1.7.9-r1::<unknown repository>, |
37 |
> 1.8.5-r3::<unknown repository>, 1.9.6-r2::<unknown repository>, |
38 |
> 1.10.3::gentoo, 1.11.6::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, |
39 |
> 1.14.1::gentoo, 1.15::gentoo |
40 |
> sys-devel/binutils: 2.24-r3::gentoo |
41 |
> sys-devel/gcc: 4.1.2::<unknown repository>, 4.3.4::gentoo, |
42 |
> 4.4.5::gentoo, 4.5.4::gentoo, 4.6.3::gentoo, 4.7.3-r1::gentoo, |
43 |
> 4.8.4::gentoo |
44 |
> sys-devel/gcc-config: 1.7.3::gentoo |
45 |
> sys-devel/libtool: 2.4.6::gentoo |
46 |
> sys-devel/make: 4.1-r1::gentoo |
47 |
> sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers) |
48 |
> sys-libs/glibc: 2.20-r2::gentoo |
49 |
> Repositories: |
50 |
> |
51 |
> gentoo |
52 |
> location: /usr/portage |
53 |
> sync-type: rsync |
54 |
> sync-uri: rsync://rsync.gentoo.org/gentoo-portage |
55 |
> priority: -1000 |
56 |
> |
57 |
> x-portage |
58 |
> location: /usr/local/portage |
59 |
> masters: gentoo |
60 |
> priority: 0 |
61 |
> |
62 |
> ACCEPT_KEYWORDS="x86" |
63 |
> ACCEPT_LICENSE="* -@EULA" |
64 |
> CBUILD="i686-pc-linux-gnu" |
65 |
> CFLAGS="-O2 -mtune=i686 -pipe" |
66 |
> CHOST="i686-pc-linux-gnu" |
67 |
> CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" |
68 |
> CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d |
69 |
> /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release |
70 |
> /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ |
71 |
> /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ |
72 |
> /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ |
73 |
> /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ |
74 |
> /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ |
75 |
> /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ |
76 |
> /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" |
77 |
> CXXFLAGS="-O2 -mtune=i686 -pipe" |
78 |
> DISTDIR="/usr/portage/distfiles" |
79 |
> FCFLAGS="-O2 -march=i686 -pipe" |
80 |
> FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks |
81 |
> ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs |
82 |
> protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs |
83 |
> unmerge-orphans userfetch userpriv usersandbox usersync" |
84 |
> FFLAGS="-O2 -march=i686 -pipe" |
85 |
> GENTOO_MIRRORS="http://mirror.usu.edu/mirrors/gentoo/ |
86 |
> http://gentoo.llarian.net/ http://mirrors.rit.edu/gentoo/ |
87 |
> http://gentoo.netnitco.net" |
88 |
> LDFLAGS="-Wl,-O1 -Wl,--as-needed" |
89 |
> MAKEOPTS="-j3" |
90 |
> PKGDIR="/usr/portage/packages" |
91 |
> PORTAGE_CONFIGROOT="/" |
92 |
> PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times |
93 |
> --omit-dir-times --compress --force --whole-file --delete --stats |
94 |
> --human-readable --timeout=180 --exclude=/distfiles --exclude=/local |
95 |
> --exclude=/packages" |
96 |
> PORTAGE_TMPDIR="/var/tmp" |
97 |
> USE="apache2 bash-completion berkdb bzip2 cli cracklib crypt cxx dri gdbm |
98 |
> iconv ipv6 ithreads modules ncurses nls nptl nptlonly openmp pam pcre |
99 |
> readline seccomp session ssl tcpd threads unicode x86 zlib" ABI_X86="32" |
100 |
> ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci |
101 |
> emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 |
102 |
> intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" |
103 |
> APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd |
104 |
> authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile |
105 |
> authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd |
106 |
> deflate dir disk_cache env expires ext_filter file_cache filter headers |
107 |
> ident imagemap include info log_config logio mem_cache mime mime_magic |
108 |
> negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http |
109 |
> rewrite setenvif so speling status unique_id userdir usertrack |
110 |
> vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan |
111 |
> sheets stage tables krita karbon braindump author" CAMERAS="ptp2" |
112 |
> COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" |
113 |
> CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 |
114 |
> ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 |
115 |
> garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver |
116 |
> oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate |
117 |
> tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" |
118 |
> LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb |
119 |
> ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console |
120 |
> presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" |
121 |
> PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" |
122 |
> PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" |
123 |
> VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage |
124 |
> sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd |
125 |
> pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition |
126 |
> tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" |
127 |
> Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, |
128 |
> LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, |
129 |
> PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON |
130 |
> |
131 |
> |
132 |
> |
133 |
> -- |
134 |
> A |
135 |
> |
136 |
|
137 |
You may be able to enable the 64bit ABI just for go. I recently did the same |
138 |
to enable x32 abi on amd64 for experimenting (which BTW, according to CERN's |
139 |
evaluation can save up to 30% memory and 30% cpu usage over amd64 for some |
140 |
applications). This is how I did it: |
141 |
|
142 |
1. From an amd64 stage3 grab the following files and copy them to your system |
143 |
(of the libraries you may only need libc.so.6 but I copied them all to be |
144 |
safe): |
145 |
|
146 |
/lib64/libc.so* |
147 |
/lib64/libm.so* |
148 |
/lib64/libpthread.so* |
149 |
/lib64/libdl.so* |
150 |
/usr/include/gnu/stubs-64.h |
151 |
|
152 |
2. Add the following to /etc/portage/make.conf: |
153 |
|
154 |
MULTILIB_ABIS="amd64 x86" |
155 |
|
156 |
3. Add the following to /etc/portage/profile/use.mask: |
157 |
|
158 |
-abi_x86_64 |
159 |
|
160 |
4. Rebuild binutils, gcc and glibc (make sure this rebuilds the gcc version |
161 |
for the profile that you're using): |
162 |
|
163 |
# emerge -v sys-devel/binutils sys-devel/gcc sys-libs/glibc |
164 |
|
165 |
5. Add the following to /etc/portage/env/dev-lang/go and emerge go (if it |
166 |
fails to build uncomment the LDFLAGS like, it causes configure failures with |
167 |
some packages): |
168 |
|
169 |
CFLAGS="-m64" |
170 |
CXXFLAGS="-m64" |
171 |
#LDFLAGS="-m elf64_x86_64" |
172 |
|
173 |
This worked for me because the x86_64 gcc can compile x32 code. I believe i686 |
174 |
can do the same for amd64, it only needs to be rebuilt to get the helper |
175 |
libraries (libgcc and friends). Of course, if any other go ebuilds have |
176 |
dependencies on other libraries you will have to add the abi_x86_64 use flag |
177 |
manually to those libraries (autounmask and the dep solver won't figure it out) |
178 |
but you only need to do this for leaf packages that you want to build with an |
179 |
alternate ABI. I think you can run "ABI=amd64 emerge ..." to have portage |
180 |
solve it but haven't tried it. If you decide to try this let me know if it |
181 |
worked. |
182 |
|
183 |
-- |
184 |
Fernando Rodriguez |