[opensuse] How to compile for i86 on a x64 machine?
Hello, I have entered 64 bit world with 11.1, and to my surprise, it seems to work pretty fine so far. Now I am curious how to compile for 32 bit machines from that 64 bit machine. Do I really need to use a virtual machine or a cross compiler or is there a more convenient way? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 01/06/2009 07:53 PM, Josef Wolf wrote:
Hello,
I have entered 64 bit world with 11.1, and to my surprise, it seems to work pretty fine so far.
Now I am curious how to compile for 32 bit machines from that 64 bit machine. Do I really need to use a virtual machine or a cross compiler or is there a more convenient way?
I guess it depends a bit on what you are building. For a spec file linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a source package, I would guess linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH. -- Joe Morris Registered Linux user 231871 running openSUSE 10.3 x86_64 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Joe Morris <Joe_Morris@ntm.org> [Jan 06. 2009 13:18]:
I have entered 64 bit world with 11.1, and to my surprise, it seems to work pretty fine so far.
Now I am curious how to compile for 32 bit machines from that 64 bit machine. Do I really need to use a virtual machine or a cross compiler or is there a more convenient way?
I guess it depends a bit on what you are building. For a spec file linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a source package, I would guess linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.
the '-m32' option to gcc makes gcc output 32-bit code as well. -- Mads Martin Joergensen, http://mmj.dk "Why make things difficult, when it is possible to make them cryptic and totally illogical, with just a little bit more effort?" -- A. P. J. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jan 06, 2009 at 01:54:29PM +0100, Mads Martin Joergensen wrote:
* Joe Morris <Joe_Morris@ntm.org> [Jan 06. 2009 13:18]:
I have entered 64 bit world with 11.1, and to my surprise, it seems to work pretty fine so far.
Now I am curious how to compile for 32 bit machines from that 64 bit machine. Do I really need to use a virtual machine or a cross compiler or is there a more convenient way?
I guess it depends a bit on what you are building.
Mostly, I am going to build my own stuff.
For a spec file linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a source package, I would guess linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.
Hmm, so $ linux32 make all would do the trick? But the make targets (and object files, etc) would be the same for both 32 bit and 64 bit? Guess that would result in a mess?
the '-m32' option to gcc makes gcc output 32-bit code as well.
With this, different make targets would be possible, so I guess this is the way to go? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Josef Wolf <jw@raven.inka.de> [Jan 06. 2009 14:40]:
linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a source package, I would guess linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.
Hmm, so
$ linux32 make all
would do the trick? But the make targets (and object files, etc) would be the same for both 32 bit and 64 bit? Guess that would result in a mess?
I'm not sure this works. Try it out.
the '-m32' option to gcc makes gcc output 32-bit code as well.
With this, different make targets would be possible, so I guess this is the way to go?
Yeah. You can always see it by doing $ file a.out On the output file to see if it's 64 or 32 bit. -- Mads Martin Joergensen, http://mmj.dk "Why make things difficult, when it is possible to make them cryptic and totally illogical, with just a little bit more effort?" -- A. P. J. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 06 of January 2009 13:17:28 Joe Morris wrote:
On 01/06/2009 07:53 PM, Josef Wolf wrote:
Hello,
I have entered 64 bit world with 11.1, and to my surprise, it seems to work pretty fine so far.
Now I am curious how to compile for 32 bit machines from that 64 bit machine. Do I really need to use a virtual machine or a cross compiler or is there a more convenient way?
I guess it depends a bit on what you are building. For a spec file linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a source package, I would guess linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.
But this also need a 32-bit BuildRequires installed, don't it? Usage of osc (osc build openSUSE_foo i586 spec), or /usr/bin/build (BUILD_DIST=foo-i586 build spec) is better in this case, because the BuildRequires will be installed in a build root, not in your system. But from my experience is the %ifarch always expanded to x86_64 in 32-bit chroot. Michal Vyskocil -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Jan 06, 2009 at 03:24:40PM +0100, Michal Vyskocil wrote:
Usage of osc (osc build openSUSE_foo i586 spec),
I am somewhat reluctant to use the build service. Probably I am wrong, but it seems to me like using the build service means to give up some freedom. Am I the only one with this feeling or is it just the result of mis-information. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 1/9/2009 at 5:17 PM, Josef Wolf <jw@raven.inka.de> wrote: On Tue, Jan 06, 2009 at 03:24:40PM +0100, Michal Vyskocil wrote:
Usage of osc (osc build openSUSE_foo i586 spec),
I am somewhat reluctant to use the build service. Probably I am wrong, but it seems to me like using the build service means to give up some freedom. Am I the only one with this feeling or is it just the result of mis-information.
What 'freedom' are you giving up? I think I don't understand your point here. Dominique -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, Jan 9, 2009 at 11:17, Josef Wolf <jw@raven.inka.de> wrote:
On Tue, Jan 06, 2009 at 03:24:40PM +0100, Michal Vyskocil wrote:
Usage of osc (osc build openSUSE_foo i586 spec),
I am somewhat reluctant to use the build service. Probably I am wrong, but it seems to me like using the build service means to give up some freedom. Am I the only one with this feeling or is it just the result of mis-information.
The buildservice is intended only for opensource software, so in that regards I believe you do loose some freedom (others might disagree) if your project is not already opensource. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 2009 January 09 18:45:00 Andrew Joakimsen wrote:
The buildservice is intended only for opensource software, so in that regards I believe you do loose some freedom (others might disagree) if your project is not already opensource.
It is true you lose the freedom to infringe on others' four freedoms.[1] However, it is commonly accepted that free persons in a free society do not have this freedom. For example, I do not have the freedom to infringe on others' freedom of life; I cannot murder. Another example, I do not have the freedom to infringe on others' freedom of liberty; I cannot imprison others. -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/ [1] Sort of. If you hold the copyright to the work in it's entirety, you can license it under (e.g.) the GPL and, for others that do not want to accept the GPL, another potentially proprietary license possibly at a cost.
On Fri, Jan 09, 2009 at 08:07:36PM -0600, Boyd Stephen Smith Jr. wrote:
On Friday 2009 January 09 18:45:00 Andrew Joakimsen wrote:
The buildservice is intended only for opensource software, so in that regards I believe you do loose some freedom (others might disagree) if your project is not already opensource.
It is true you lose the freedom to infringe on others' four freedoms.[1]
I did not mean it this way. I'll try to explain: When we totally rely on the build service, we might reach a point that we can not build without this service anymore, no matter whether we have the sources or not. So there's the risk that we would not be able to build anymore, should this service become unavailable at some time in the future. But it seems like I am the only one with such (paranoid?) thinking, so I am probably totally wrong. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Monday 2009 January 12 15:26:07 Josef Wolf wrote:
When we totally rely on the build service, we might reach a point that we can not build without this service anymore, no matter whether we have the sources or not. So there's the risk that we would not be able to build anymore, should this service become unavailable at some time in the future.
But it seems like I am the only one with such (paranoid?) thinking, so I am probably totally wrong.
No, I believe there is value in your thinking. I want to be able to build packages from source without access to the OBS, even if I can't think of a good reason I'd need to right now. -- Boyd Stephen Smith Jr. ,= ,-_-. =. bss@iguanasuicide.net ((_/)o o(\_)) ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' http://iguanasuicide.net/ \_/
On Mon, Jan 12, 2009 at 4:46 PM, Boyd Stephen Smith Jr. <bss@iguanasuicide.net> wrote:
On Monday 2009 January 12 15:26:07 Josef Wolf wrote:
When we totally rely on the build service, we might reach a point that we can not build without this service anymore, no matter whether we have the sources or not. So there's the risk that we would not be able to build anymore, should this service become unavailable at some time in the future.
But it seems like I am the only one with such (paranoid?) thinking, so I am probably totally wrong.
No, I believe there is value in your thinking. I want to be able to build packages from source without access to the OBS, even if I can't think of a good reason I'd need to right now.
In theory you can get the OBS source and setup your own OBS at your company. Or Redhat could, or OSDL could, etc. So for the major players it is not a big concern I don't think. And for the end-users who just need to compile something and get on with their life, the OBS is also a good idea. For the actual developers, they will always want their own toolchain to test/develop with. But once they are ready to start rolling packages for multiple distros, the OBS makes since for them too. Greg -- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday, 2009-01-12 at 18:00 -0500, Greg Freemyer wrote:
No, I believe there is value in your thinking. I want to be able to build packages from source without access to the OBS, even if I can't think of a good reason I'd need to right now.
In theory you can get the OBS source and setup your own OBS at your company. Or Redhat could, or OSDL could, etc.
So for the major players it is not a big concern I don't think. And for the end-users who just need to compile something and get on with their life, the OBS is also a good idea.
I don't understand this paragraph. Why would it be more interesting for, say, me (an end user) to build something for use on my computer only, on the OBS, instead of using the traditional configure, make, make install route locally? I ask because I don't know, not because I'd like to polemize. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAklr5CkACgkQtTMYHG2NR9WqVgCeNqLiYM3n6FL3PIAFuA7Lqk0X InIAni2K/DZ4mYth2yAokt74iT1t3UmV =pTBr -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
On Monday, 2009-01-12 at 18:00 -0500, Greg Freemyer wrote:
So for the major players it is not a big concern I don't think. And for the end-users who just need to compile something and get on with their life, the OBS is also a good idea.
I don't understand this paragraph. Why would it be more interesting for, say, me (an end user) to build something for use on my computer only, on the OBS, instead of using the traditional configure, make, make install route locally?
I ask because I don't know, not because I'd like to polemize.
It probably needs to be seen in the light of the OPs question - "how to compile for i386 on x86_64"? In that situation, I think the build service could well be an interesting alternative to setting everything up yourself. -- /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2009-01-13 at 09:23 +0100, Per Jessen wrote:
Carlos E. R. wrote:
On Monday, 2009-01-12 at 18:00 -0500, Greg Freemyer wrote:
So for the major players it is not a big concern I don't think. And for the end-users who just need to compile something and get on with their life, the OBS is also a good idea.
I don't understand this paragraph. Why would it be more interesting for, say, me (an end user) to build something for use on my computer only, on the OBS, instead of using the traditional configure, make, make install route locally?
I ask because I don't know, not because I'd like to polemize.
It probably needs to be seen in the light of the OPs question - "how to compile for i386 on x86_64"? In that situation, I think the build service could well be an interesting alternative to setting everything up yourself.
But... but it is a public service, you have to request an account or something, maybe justify what you want it for, maintain that package for others to download... I don't see it. I don't see how the OBS can be of use for a private user that is compiling something for his private use. Perhaps they have posted instructions on what a user has to do to use the OBS for his private compilations? And perhaps, if what I want to recompile is xine with decss support, it would be pulled down >:-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEARECAAYFAklsj58ACgkQtTMYHG2NR9VB+QCfYN2IEfbhlishdg5ExMoTbAbB uYYAn2dLmfhseqYUIT/6cVnH2jOuVa37 =qWD4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, 2009-01-13 at 13:57 +0100, Carlos E. R. wrote:
But... but it is a public service, you have to request an account or something, maybe justify what you want it for, maintain that package for others to download... I don't see it. I don't see how the OBS can be of use for a private user that is compiling something for his private use.
Perhaps they have posted instructions on what a user has to do to use the OBS for his private compilations?
Perhaps the idea is that it is not much more work to use the OBS to make your package. And, in doing so, you have benefited others who may also want the package.
And perhaps, if what I want to recompile is xine with decss support, it would be pulled down >:-)
Of course any public place will not allow potential copyright/patent infringement. But, in the grand scheme of things, such things are in the minority. Most packages are rather straight forward. Since the build service has the concept of a -devel rpm, it does make it easier to get the bits for your platform your package depends on that do not have copyright and such issues without having to compile all of them yourself. So, you could (1) use the packages in the build service to obtain a commonly used set of runtime and -devel RPMs that all on your platform can also access/use from the OBS. (2) compile on your system only your bits into your special RPM that lists the common things in the OBS as dependencies. (3) make only that special RPM available in some secret fashion - letting all users of it use the common parts from the OBS for the rest of the dependencies. Of course, that is a use of the OBS that does not benefit the OBS itself. But you could choose to help maintain the copyright/patent-free common parts on the OBS that your package depends on. Roger -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Jan 12, 2009 at 10:26:07PM +0100, Josef Wolf wrote:
When we totally rely on the build service, we might reach a point that we can not build without this service anymore, no matter whether we have the sources or not. So there's the risk that we would not be able to build anymore, should this service become unavailable at some time in the future.
As the build service uses the standard tools for package building (rpmbuild for rpms and the corresponding debian tool for debs), this situation should never happen, even if we, hypothetically, at some point in time go bonkers and shut down the build service. You don't need the build service to build a source package hosted in the build service, but you might need some additional files/tools over plain rpmbuild: - if the spec file uses build service specific %macros, you need the macro definitions, or you have to reimplement them (or change the spec file not to use them any more) - with plain rpmbuild nobody is going to setup a chroot environment for you and install all your BuildRequires. This means it's a lot more manual work to build a package without the build service (but, well, that's the whole point of tools like the build service: to make life easier) That's all I can think of now, but I'm sure I missed something. I don't know much about packaging innards on the debian sides but it's probably similar to rpm. But still: if you use the build service, you have to know how the packaging tools work, and if you know how they work, you should be able to build the packages by hand as well. In any case, and as was already pointed out, this is one of the reasons why it is so important that the build service is open source -- in the very worst case, if you rely on the build service for whatever reason and it goes away, you can take the sources and a starving computer science student or two and set up your own. If you are interested in the details of what is implemented on top of rpmbuild, you should really look at the sources, and ask on opensuse-buildservice@opensuse.org for everything that's not clear. cheers, Sonja -- Sonja Krause-Harder (skh@suse.de) SUSE Research & Development ----------------------------------------------------------------- SUSE Linux Products GmbH GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Mon, Jan 12, 2009 at 10:26:07PM +0100, Josef Wolf wrote:
I did not mean it this way. I'll try to explain:
When we totally rely on the build service, we might reach a point that we can not build without this service anymore, no matter whether we have the sources or not. So there's the risk that we would not be able to build anymore, should this service become unavailable at some time in the future.
The build service is just a way to automatically setup the build environment and trigger rebuilds. The real building is done via a standard 'rpmbuild' call. Cheers, Michael. -- Michael Schroeder mls@suse.de SUSE LINUX Products GmbH, GF Markus Rex, HRB 16746 AG Nuernberg main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);} -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Friday 09 January 2009 17:17:36 Josef Wolf wrote:
On Tue, Jan 06, 2009 at 03:24:40PM +0100, Michal Vyskocil wrote:
Usage of osc (osc build openSUSE_foo i586 spec),
I am somewhat reluctant to use the build service. Probably I am wrong, but it seems to me like using the build service means to give up some freedom. Am I the only one with this feeling or is it just the result of mis-information.
Well, I don't know how freedoms you should loose with BuildService, but that's not important. You can still run your own BS instance, or use an old plain build script to create chroot environment to build of packages, which is better that installing of 32bit packages on your machine directly. Regards Michal Vyskocil -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (13)
-
Andrew Joakimsen
-
Boyd Stephen Smith Jr.
-
Carlos E. R.
-
Dominique Leuenberger
-
Greg Freemyer
-
Joe Morris
-
Josef Wolf
-
Mads Martin Joergensen
-
Michael Schroeder
-
Michal Vyskocil
-
Per Jessen
-
Roger Oberholtzer
-
Sonja Krause-Harder