Solved

compiling 32 bit in 64 bit os

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

776 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