Solved

compiling 32 bit in 64 bit os

Posted on 2014-02-12
4
751 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 38

Expert Comment

by:Gerwin Jansen, EE MVE
ID: 39853974
What have you tried already and what errors did you get?
0
 
LVL 78

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 78

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINUX Field Separators 7 78
Unix Help with:  mailx -s 17 65
check the file dates in unix 14 76
How ldap located a Domain controller? 22 76
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 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