Solved

compiling 32 bit in 64 bit os

Posted on 2014-02-12
4
700 Views
Last Modified: 2014-02-26
I am trying to compile a perl source file with 32 bit option .
I have  rhel5.8 64 bit but my apps require 32 bit perl and postgres. Can some one help me how to build 32 bit instead of 64 bit.
0
Comment
Question by:ittechlab
  • 2
4 Comments
 
LVL 37

Expert Comment

by:Gerwin Jansen
ID: 39853974
What have you tried already and what errors did you get?
0
 
LVL 76

Expert Comment

by:arnold
ID: 39854007
To compile in 32bit, you need to have all other requisite libraries in 32bit available.

It is not clear

are you running a perl Makefile.pl?

I am not sure how your apps require perl or postgresql to be 32 bit.

postresql is a data respository as long as you can run a command you can get the data out as long as it is running.  The data within does not change because it is a 32 bit or a 64bit system.
similar with perl.  your perl code will run on either system.

You may have to compile your custom module on the 32 and 64 bit system to install.
0
 

Author Comment

by:ittechlab
ID: 39854065
application team asked to build 32 bit for both.

I do have the source code and i tried to run the following.

./configure --prefix=/pgarc/pgsql --with-perl
gmake  
gmake check
gmake install

before this i need to do the same for perl.  not sure how to run ./configure for 32 bit
0
 
LVL 76

Accepted Solution

by:
arnold earned 500 total points
ID: 39854082
tehre is nothing in your configuration options that tells it to build for an alternate platform than the one it is running on.
look at ./configure --help

Compiling 32bit on 64bit system search.

use
--target=
--build=
CFLAGS="-m32"
CXXFLAGS="-m32"
LDFLAGS="-m32"
target and build should match the target/build from the system on which you want it to run.

Are you creating an RPM package that will be deployed??

Note that after the compilation, the app may fail to run because of missing components/packages on the 32 bit system.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now