Re: Compile 32bit or 64bit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 16, 2011 at 1:51 AM, Mahdi Foladgar <foladgar@xxxxxxxxx> wrote:
> Hi
> I have two computer installed FC16 on them. On the First FC16x86-64
> installed and on the other FC16-i386 installed.
> Can I compile some program on one and run on the other?
> I want to compile my program on 64 bit os and run on 32bit os or vice versa.

Programs compiled 32-bit will run just fine on 64-bit operating
systems, so long as you have all the necessary 32-bit libraries.
However, 64-bit binaries will not work on 32-bit systems.  You can
also compile 32-bit applications on 64-bit systems and vice versa, but
you need a cross compiler setup which can be a PITA.

Personally, I also like to keep as much managed by RPM as possible.
So, if I want a custom version of a package provided by Fedora, I just
modify it's RPM specfile, and for projects that don't exist I create
my own RPMs.  When you use RPM, you can build 32-bit and 64-bit
versions regardless of the architecture of the system you happen to be
using at the time very easily, using mock.  Compiling a 32-bit RPM on
a 64-bit system is as easy as:
% mock -r fedora-16-i386 --rebuild super-cool-app-0.1.fc16.src.rpm

For more information on creating your own RPMs, see:
http://fedoraproject.org/wiki/How_to_create_an_RPM_package

For more information on mock, see:
http://fedoraproject.org/wiki/Projects/Mock

-T.C.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux