Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th May 2008, 12:42 PM
hakonrk Offline
Registered User
 
Join Date: Jun 2005
Posts: 20
32-bit chroot build environment

I have a question about creating a 32-bit chroot build environment on an x86-64 system. I know that mock is usually the best solution for this, but mock is only for SRPMs. I have some programs that work better (or will only work) in 32-bit mode that I can't compile via SRPMs for various reasons (usually that I want the latest CVS/SVN snapshot).

I thought it would be easy to create my own build environment using rpm --root /path/to/buildenv -ivh <list-of-i386-packages>. True, I was able to get a working development environment this way, but everything I run in this environment still detects that the kernel runs in 64-bit mode. For example, uname -m still returns x86_64 and configure claims the system type is x86_64-unknown-linux-gnu.

Is it possible to fool the programs running in the buildenv completely so that they'll behave exactly as if running on a native i386 system?
Reply With Quote
  #2  
Old 17th May 2008, 01:48 PM
leigh123linux's Avatar
leigh123linux Offline
Retired Administrator
 
Join Date: Oct 2006
Posts: 21,509
Quote:
Originally Posted by hakonrk
I have a question about creating a 32-bit chroot build environment on an x86-64 system. I know that mock is usually the best solution for this, but mock is only for SRPMs. I have some programs that work better (or will only work) in 32-bit mode that I can't compile via SRPMs for various reasons (usually that I want the latest CVS/SVN snapshot).

I thought it would be easy to create my own build environment using rpm --root /path/to/buildenv -ivh <list-of-i386-packages>. True, I was able to get a working development environment this way, but everything I run in this environment still detects that the kernel runs in 64-bit mode. For example, uname -m still returns x86_64 and configure claims the system type is x86_64-unknown-linux-gnu.

Is it possible to fool the programs running in the buildenv completely so that they'll behave exactly as if running on a native i386 system?


Try rebuilding the SRPM ( edit the spec file and replace the source code with the new svn / cvs source code )


Code:
su
yum install rpmdevtools

Then as non root

Code:
rpmdev-setuptree
This will set up a normal build environment in /home/*/rpmbuild
Then install the SRPM as non root.
Code:
rpm -i package.src.rpm
Then edit the spec and change the source code package , then build the spec file in a normal 64 bit environment to see if it builds OK .

Code:
rpmbuild -ba  /home/*/rpmbuild/SPECS/package.spec
The above command will produce rpm & srpm packages if successful , then you can build this altered srpm in mock .
__________________
My Hardware
- CPU: AMD Phenom II X6 Hex Core 1055T 95W Edition @3.5Ghz
- Motherboard: Gigabyte GA-880GM-UD2H
- Cooler: Corsair H50 CPU Cooler
- RAM: Corsair Dominator 8GB (4x2GB) DDR3 1600MHz
- Graphics: Gigabyte GeForce GTS 450 OC 1024MB GDDR5

Last edited by leigh123linux; 17th May 2008 at 01:51 PM.
Reply With Quote
  #3  
Old 19th May 2008, 07:39 PM
hakonrk Offline
Registered User
 
Join Date: Jun 2005
Posts: 20
Thanks again, leigh. Not the answer I was hoping for as I've already got some nice build scripts I wanted to use, but since no-one else had any other suggestions, I guess I have to roll up my sleeves and start customizing spec files...
Reply With Quote
Reply

Tags
32bit, build, chroot, environment

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Chroot-Cross-OS development environment with mock sarvi Programming & Packaging 0 16th June 2008 10:38 PM
[FC4] creating a 32 bit chroot in a 64 bit environment? Knudson Using Fedora 2 30th December 2005 02:31 PM


Current GMT-time: 01:51 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat