Solved

compiling 32 bit in 64 bit os

Posted on 2014-02-12
4
736 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 38

Expert Comment

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

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 77

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Install Predefined Certificate on Ubunto 4 48
Linux server had an unexpected freeze. How to find out cause (sys logs)? 13 47
awk file 6 79
winscp 000webhost.com 6 74
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.

830 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