You are not logged in.

#1 2009-10-09 21:26:41

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

makepkg queston

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

#2 2009-10-09 21:29:38

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: makepkg queston

you can compile i686 packages on x86_64 machine using a chroot environment.

http://wiki.archlinux.org/index.php/Arc … bit_system


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2009-10-09 22:29:27

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

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

#4 2009-10-09 22:58:22

grey
Member
From: Europe
Registered: 2007-08-23
Posts: 679

Re: makepkg queston

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

#5 2009-10-09 23:21:08

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

grey wrote:

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

#6 2009-10-10 00:17:02

quarkup
Member
From: Portugal
Registered: 2008-09-07
Posts: 497
Website

Re: makepkg queston

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)

big_smile


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

#7 2009-10-10 01:14:46

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

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

#8 2009-10-10 01:40:42

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,393
Website

Re: makepkg queston

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

#9 2009-10-10 01:56:08

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

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

Last edited by ssl6 (2009-10-10 02:02:52)


this is a signature

Offline

#10 2009-10-10 06:03:47

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,356

Re: makepkg queston

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

#11 2009-10-10 13:07:41

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: makepkg queston

ssl6 wrote:
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

#12 2009-10-10 14:08:33

uncholowapo
Member
From: US
Registered: 2009-03-29
Posts: 238

Re: makepkg queston

There is a multilib gcc in aur...

Offline

#13 2009-10-10 14:54:19

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

uncholowapo wrote:

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

#14 2009-10-15 08:40:38

rhune
Member
Registered: 2007-07-17
Posts: 19

Re: makepkg queston

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

#15 2009-10-15 12:51:18

MP2E
Member
Registered: 2009-09-05
Posts: 115

Re: makepkg queston

uncholowapo wrote:

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

#16 2009-10-16 14:55:50

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: makepkg queston

rhune wrote:

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

#17 2009-10-19 01:18:20

rhune
Member
Registered: 2007-07-17
Posts: 19

Re: makepkg queston

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

#18 2009-10-19 03:55:50

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: makepkg queston

rhune wrote:

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!

http://wiki.archlinux.org/index.php/Arc … bit_system

Offline

#19 2009-10-19 06:30:32

rhune
Member
Registered: 2007-07-17
Posts: 19

Re: makepkg queston

tried that, still uses the 64 bit libs for some reason.

Offline

#20 2009-10-19 15:24:48

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: makepkg queston

rhune 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

#21 2009-10-20 19:03:26

rhune
Member
Registered: 2007-07-17
Posts: 19

Re: makepkg queston

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

#22 2009-10-20 19:24:28

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: makepkg queston

Try "i386 schroot" instead of schroot.

Offline

#23 2009-10-20 20:27:17

rhune
Member
Registered: 2007-07-17
Posts: 19

Re: makepkg queston

im just chrooting into it. not using schroot at all. should i be?

Offline

#24 2009-10-20 23:08:34

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 858
Website

Re: makepkg queston

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

#25 2009-10-21 00:28:47

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,393
Website

Re: makepkg queston

Use "linux32 chroot" instead of just "chroot"

Offline

Board footer

Powered by FluxBB