LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   64 bit compile/install (https://www.linuxquestions.org/questions/linux-software-2/64-bit-compile-install-563046/)

GregLee 06-19-2007 04:30 PM

64 bit compile/install
 
How do you compile/install on a 64 bit system? On Fedora Core 6 for x86_64, the following has seemed to work ok for me, in a couple of cases:
Code:

rm libtool
./configure \
  --prefix=/usr \
  --libdir=/usr/lib64
make
su
make install

The point to removing libtool is to get configure to generate a new one, since the one that came with the source distributions I was dealing with looked in /usr/lib (where 32-bit libraries are) sometimes instead of /usr/lib64 (where 64-bit libraries are).

Is there a HOWTO around I should be looking at? I'm just feeling my way here.

weibullguy 06-20-2007 09:01 AM

You can find build instructions for many packages here. There are 32-bit and 64-bit build instructions. There are about 700 packages represented.

There is essentially no difference in the commands used to build 32- and 64-bit pacakges. The CFLAGS and/or CXXFLAGS will be different; you need to pass -m32 for 32-bit and -m64 for 64-bit. The PKG_CONFIG_PATH environment variable should be set to use the location of the 32-bit or 64-bit metadata files (*.pc files). If you don't, pkgconfig will look in */lib/pkgconfig and find 32-bit libraries. These will obviously not work for a 64-bit build.

For example, the configure script might be executed as follows for a 32- or 64-bit build respectively:
Code:

-- for the 32-bit build --

CC="gcc -m32 -O2 -pipe -march=athlon64 -mtune=athlon64" \
PKG_CONFIG_PATH="/usr/lib/pkgconfig:/opt/gnome/lib" \
./configure --prefix=/usr

-- or for the 64-bit build --

CC="gcc -m64 -O2 -pipe -march=athlon64 -mtune=athlon64" \
PKG_CONFIG_PATH="/usr/lib64/pkgconfig:/opt/gnome/lib64" \
./configure --prefix=/usr --libdir=/usr/lib64


GregLee 06-20-2007 11:10 AM

Thanks for the very useful suggestions. I had more or less given up on the CBLFS site, since it seems to assume I'd build my system up in their rather idiosyncratic way.

weibullguy 06-20-2007 12:22 PM

Quote:

Originally Posted by GregLee
Thanks for the very useful suggestions.

No problem.
Quote:

Originally Posted by GregLee
I had more or less given up on the CBLFS site, since it seems to assume I'd build my system up in their rather idiosyncratic way.

I guess if standards compliant, SysVint system is idiosyncratic...obviously the CBLFS instructions assume you are building on a CLFS base. The multilib-wrapper program used in CLFS is somewhat unique, but I've successfully used the instructions (modified if needed) on Gentoo, *buntu, and Slamd64 boxes.


All times are GMT -5. The time now is 02:53 AM.