Archived

This forum has been archived. Please start a new discussion on GitHub.

Install, Redhat 9.0: /usr/bin/ld: cannot find -lbz2

Hi!

I am trying to install ICE on RedHat 9.0. I am running make as root.

I have set the LD_ASSUME_KERNEL variable to 2.4.1 (by the way, how do I set this in the .bashrc file? And in whose .bashrc do I have to set it, root's? I remeber it worked with the user's .bashrc in RedHat 7.3, by means of "su -", but it doesn't seem to work in RedHat 9.0)

I have the libbz2 libraries here:

[root@localhost Ice-1.1.0]# locate libbz2
/usr/lib/libbz2.so.1.0.2
/usr/lib/libbz2.so.1
/usr/lib/libbz2.la
/usr/lib/libbz2.so
[root@localhost Ice-1.1.0]#

The INSTALL.LINUX file says I do not have to make any change for bz2 in the config/Make.rules file if the libraries are located in a system known place, like /usr/lib (which is the case for me).

Still the make process fails with /usr/bin/ld: cannot find -lbz2:

make[2]: Entering directory `/home/catalin/hfag/sysInstall/Ice-1.1.0/src/Ice'
rm -f ../../lib/libIce.so.1.1.0
c++ -shared -g -ftemplate-depth-128 -fPIC -Wall -D_REENTRANT -L../../lib -o ../
../lib/libIce.so.1.1.0 -Wl,-h,libIce.so.11 Initialize.o Application.o Exception.o

<skip>

StringUtil.o FactoryTableDef.o FactoryTable.o -lbz2 -ldl
/usr/bin/ld: cannot find -lbz2
collect2: ld returned 1 exit status
make[2]: *** [../../lib/libIce.so.1.1.0] Error 1
make[2]: Leaving directory `/home/catalin/hfag/sysInstall/Ice-1.1.0/src/Ice'
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/catalin/hfag/sysInstall/Ice-1.1.0/src'
make: *** [all] Error 1
[root@localhost Ice-1.1.0]#

Can anyone please tell me how to get the install pass this point?

Thanks a lot!

Catalin

Comments

  • marc
    marc Florida
    You must install the bzip2-devel RPM. Here is what I have on my RH9 system:

    florida:~$ rpm -qa | grep bzip
    bzip2-libs-1.0.2-8
    bzip2-devel-1.0.2-8
    bzip2-1.0.2-8

    You can set LD_ASSUME_KERNEL in .bashrc by simply adding a line like this in this file:

    export LD_ASSUME_KERNEL=2.4.1

    You must set this in the .bashrc of the user who executes Ice programs.
  • Thanks!

    I had bzip2-devel-1.0.2-5 so I upgraded to devel-1.0.2-8. It compiles further now.

    I am having difficulties with the xerces package though. I built and installed it from source with rpmbuild -ta xerces-c-src2_2_0.tar.gz, but I get

    /usr/bin/ld: warning: libxerces-c.so.22, needed by ../../lib/libIceXML.so, not found (try using -rpath or -rpath-link)

    followed by a lot of errors before make quits.

    I thought rmpbuild would install everything so that binaries and libraries became available. (There is an install section in the xerces-c.spec file.)

    What puzzels me is that setting

    XERCESC_HOME ?= /usr/src/redhat/BUILD/xerces-c-src2_2_0

    in the config/Make.rules doesn't help either, even though the library is in

    /usr/src/redhat/BUILD/xerces-c-src2_2_0/lib/libxerces-c.so.22

    Do I have to set some environment variables in order to make this library visible?

    Thanks again,
    Catalin
  • xerces installed - moving on

    Hi!

    I just want to let everybody know that I have found the solution to my previous post. It turns out that a command like

    rpmbuild -ta xerces-c-src2_2_0.tar.gz

    will build a binary rpm in a directory like /usr/src/redhat/RPMS/i386. The rpm must then be installed.

    For the problem at hand I cd'ed into the above mentioned directory and installed the xerces rpm with the "rpm -Uvh xerces-c-2.2.0-2.i386.rpm" command. I am now compiling further.

    Catalin