-1

I'm trying to figure out how to compile coreutils 8.20 (specifically sort) and get it to use my 64 bit libs instead of the 32 bit libs.

My 32 bit libraries are in: /lib

My 64 bit libraries are in: /lib/64

I set my LD_LIBRARY_PATH to /lib/64 but it still loads the libraries from /lib and I none of the command line options to the configure script seem to do what I need.

#>: ldd ./src/sort
    libgen.so.1 =>   /lib/libgen.so.1
    librt.so.1 =>    /lib/librt.so.1
    libc.so.1 =>     /lib/libc.so.1
    libaio.so.1 =>   /lib/libaio.so.1
    libmd.so.1 =>    /lib/libmd.so.1
    libm.so.2 =>     /lib/libm.so.2
    /platform/SUNW,Sun-Fire-V890/lib/libc_psr.so.1
    /platform/SUNW,Sun-Fire-V890/lib/libmd_psr.so.1
#>: echo $LD_LIBRARY_PATH
/lib/64

When I run ldd on a previous installation of sort (from coreutils 8.9) it is using the 64 bit libs:

#>: ldd ./sort
    librt.so.1 =>    /lib/64/librt.so.1
    libc.so.1 =>     /lib/64/libc.so.1
    libaio.so.1 =>   /lib/64/libaio.so.1
    libmd.so.1 =>    /lib/64/libmd.so.1
    libm.so.2 =>     /lib/64/libm.so.2
    /platform/SUNW,Sun-Fire-V890/lib/sparcv9/libc_psr.so.1
    /platform/SUNW,Sun-Fire-V890/lib/sparcv9/libmd_psr.so.1

System Info: SunOS 5.10 Generic_147440-26 sun4u sparc SUNW,Sun-Fire-V890

Any advice would be appreciated.

1 Answer 1

0

Apparently I needed to set the environment/makefile variables to "-m64"

./configure --prefix "<ouput_dir>" CXXFLAGS="-m64" CFLAGS="-m64" LDFLAGS="-m64"

I credit Sagar Srivastava for the answer in a post my previous searches didn't find: How to use "make" to use 64 bit libs because of ELFCLASS64 error

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.