You are not logged in.
i'm sure i saw the info im looking for somewhere before. i can't seem to find it. i looked at the wiki info on makepkg and makepkg.conf and some of the associated recommend links, and can't find what i'm looking for
but what i want to know is......i'm getting an EEE pc 900a next week for my bday. but i'm not sure what to expect from it in terms of compiling times. Now i know the atoms are i686, my desktop is running x64, but what i want to know, is if i make an alternate makepkg.conf with compiler flags for the eee, can i point makepkg to the alternate config and use it to compile the i686 packages for the EEE from my 64bit arch desktop?
this is a signature
Offline
you can compile i686 packages on x86_64 machine using a chroot environment.
Give what you have. To someone, it may be better than you dare to think.
Offline
so i need a chroot then to do it?
ok, so next question then, since i have a hard time grasping the chroot bit, im sure its simple, i just having found the right explanation to help me understand it. how do the atoms fare in terms of compiling? i'm pretty sure i'll need to compile one of the eee kernels from aur, i'm just looking at options here.
this is a signature
Offline
There is a gcc flag for what you want to do: -m32. Check http://gcc.gnu.org/onlinedocs/gcc-4.4.1 … 64-Options
I haven't tested it, but it's worth a try. So:
CFLAGS="-march=i686 -m32 -O2 -pipe"
CXXFLAGS="-march=i686 -m32 -O2 -pipe"
Though now that I think about it, maybe -march=i686 is enough.
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
There is a gcc flag for what you want to do: -m32. Check http://gcc.gnu.org/onlinedocs/gcc-4.4.1 … 64-Options
I haven't tested it, but it's worth a try. So:CFLAGS="-march=i686 -m32 -O2 -pipe" CXXFLAGS="-march=i686 -m32 -O2 -pipe"
Though now that I think about it, maybe -march=i686 is enough.
now that sounds like the time saver im looking for, i'll have to give that a try when i start my adventure. i may be doing things the hard way, but there's nothing wrong with exploring new things right
this is a signature
Offline
if you want details, read the "GCC" manual pages:
man gcc
check the "march flag"
you can also read the -mtune flag options (line 6239)
anyway, you can use the flags:
-march=native -mtune=native -Os -pipe
to get the generic "optimizer" flags.. AFAIK these may be very simple as of latest gcc's it will get your cpu info (just tell native and gcc will auto-select the system)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
i have the safe cflags wiki page bookmarked, so i know what to use for the EEE pc, my main concern is is whether there's a quick an easy way to compile the stuff for it on my desktop, since im running a quad core in my desktop, so obviously it will compile much faster than the atom in the EEE. but if its going to be too much of a headache for me to compile the 32bit packages i need for the EEE, on my 64bit desktop......i'll probly just opt to do it on the EEE and suffer the wait, not that i don't have 2 other systems to keep me busy anyway. but my new toy is a few days away, and the sooner i can make the most of it.......maybe i just have that itch you get when you know you have a new toy coming, but can't stand the wait
this is a signature
Offline
Only the chroot will work. Our gcc is not multilib so there is no -m32 flag. It is also not a cross compiler, so just changing march will not work. A chroot is the way to go.
Offline
Only the chroot will work. Our gcc is not multilib so there is no -m32 flag. It is also not a cross compiler, so just changing march will not work. A chroot is the way to go.
now you say, "our gcc"......does that mean if i were to recompile gcc with those options it could be? i took a quick look at the gcc pkgbuild, there's a disable multilib in there, if i took that out, is there anything else i need to do before trying to compile it so i can use the -m32 flag......and are there any adverse effects a newb like myself should worry about, in terms of general usage thereafter?
otherwise, i suppose i have time before i get the thing to setup a chroot, my bday is still a week away
Last edited by ssl6 (2009-10-10 02:02:52)
this is a signature
Offline
chroots are easy, its in the wiki how to set a fully working one up.
No idea on your other question....
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Allan wrote:Only the chroot will work. Our gcc is not multilib so there is no -m32 flag. It is also not a cross compiler, so just changing march will not work. A chroot is the way to go.
now you say, "our gcc"......does that mean if i were to recompile gcc with those options it could be? i took a quick look at the gcc pkgbuild, there's a disable multilib in there, if i took that out, is there anything else i need to do before trying to compile it so i can use the -m32 flag......and are there any adverse effects a newb like myself should worry about, in terms of general usage thereafter?
otherwise, i suppose i have time before i get the thing to setup a chroot, my bday is still a week away
You would need 32bit libs and so on too.
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
There is a multilib gcc in aur...
Offline
There is a multilib gcc in aur...
i was in the middle of posting that i found that earlier, i must of been sidetracked when my daughter started meowing at the cat. i was sure i posted it though, but i guess now. anyway, i did find it, i'm going to try it out, see how it goes, unfortunately i can't test anything i compile with it for another week
this is a signature
Offline
I am actually trying to do this same thing, but trying to recompile the whole system from source instead. I followed the directions in the wiki to make the chrooted environment successfully (i think). I'm now trying to compile the gcc-snapshot from the aur for -march=atom, and it keeps trying to compile it for x86_64 for some reason.
I've actually been trying to do this on my 64 bit system before i realized that i didnt have the 32 bit libs. Even so, most of the packages compiled just fine with gcc 4.5 and -march=atom, but I'm assuming they wont work after reading this heh. Havent actually checked yet though.
Offline
There is a multilib gcc in aur...
It's outdated, There's an updated PKGBUILD here :
http://bbs.archlinux.org/viewtopic.php?id=81305
-m32 works like a charm
17:23 < ConSiGno> yeah baby I release the source code with your mom every night
17:24 < ConSiGno> you could call them nightly builds if you know what I mean
Offline
I am actually trying to do this same thing, but trying to recompile the whole system from source instead. I followed the directions in the wiki to make the chrooted environment successfully (i think). I'm now trying to compile the gcc-snapshot from the aur for -march=atom, and it keeps trying to compile it for x86_64 for some reason.
I've actually been trying to do this on my 64 bit system before i realized that i didnt have the 32 bit libs. Even so, most of the packages compiled just fine with gcc 4.5 and -march=atom, but I'm assuming they wont work after reading this heh. Havent actually checked yet though.
i had the same problem with the kernel at least after messing around. it kept configuring itself for x86_64. the other packages themselves seemed to compile with the -m32 flag, and packages were names i686. even the kernel was named i686, but everytime i looked at the config, it was saying 64.....so i gave up.
would have been nice though, since i trimmed a kernel down for my desktop, and it took 3 minutes to compile. if i could do the same for the EEE, it would have been great. but with a kernel trimmed down that much, i don't imagine it would take too long on EEE anyway that it would really bother me
this is a signature
Offline
Ya I have no idea why its not compiling for 32 bit, I am just going to make a new 32 bit arch partition for compilation.
If anyone has any idea how to compile 32 bit programs in 64 bit (either without the multi-lib gcc or a multi-lib gcc-4.5), would be much appreciated. C'est la vie!
Offline
Ya I have no idea why its not compiling for 32 bit, I am just going to make a new 32 bit arch partition for compilation.
If anyone has any idea how to compile 32 bit programs in 64 bit (either without the multi-lib gcc or a multi-lib gcc-4.5), would be much appreciated. C'est la vie!
Offline
tried that, still uses the 64 bit libs for some reason.
Offline
tavianator wrote:tried that, still uses the 64 bit libs for some reason.
Hmm? That's not possible if you set it up right - there are no 64-bit binaries in the chroot.
Are you sure you're running makepkg from within the chroot, as in
$ schroot
I: [Arch32-97efdad5-1f50-40d7-97bd-edafe8d70890 chroot] Running login shell: '/bin/bash'
$ makepkg
Offline
Ya i really couldnt tell ya
It is definitely using the makepkg.conf from the 32 bit environment but Im getting this when i run makepkg on gcc-snapshot for example:
.....
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for x86_64-unknown-linux-gnu-ar... ar
checking for x86_64-unknown-linux-gnu-ranlib... ranlib
x86_64-unknown-linux-gnu-gcc... gcc
.....
checking for x86_64-unknown-linux-gnu-gcc... /home/a/gcc-snapshot/src/gcc-4.5-20091008/build/./gcc/xgcc -B/usr/x86_64-unknown-linux-gnu/lib -isystem /usr/x86_64-unknown-linux-gnu/include -isystem /usr/x86_64-unknown-linux-gnu/sys-include
checking for suffix of object files... configure: error: in '/home/a/gcc-snapshot/src/gcc-4.5-20091008/build/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
This compiled fine for 64 bit. I just copied some of the lines, theres a bunch more where its using x86_64.
edit: "a" is the user on my 32 bit environment
Last edited by rhune (2009-10-20 19:08:46)
Offline
Try "i386 schroot" instead of schroot.
Offline
im just chrooting into it. not using schroot at all. should i be?
Offline
Either way works I guess, but schroot lets you do it as a non-root user. The i386 command makes schroot/chroot think it's running in a 32-bit architecture, which I believe is necessary for gcc to compile correctly in a 32-bit chroot.
Offline
Offline