Find the answer to your Linux question:
Results 1 to 4 of 4
I'm trying to install a Perl Module Apache2::Request on Suse 10.1. I've successfully installed it on other Versions 9.x etc. But when trying to install it I get the following ...
  1. #1
    Just Joined!
    Join Date
    Sep 2006
    Posts
    3

    ld returning an error when compiling .o's for Perl Module

    I'm trying to install a Perl Module Apache2::Request on Suse 10.1. I've successfully installed it on other Versions 9.x etc. But when trying to install it I get the following errors in bold. what is -lldap and how can I go about installing it?

    Thanks

    gcc -shared .libs/util.o .libs/version.o .libs/cookie.o .libs/param.o .libs/parser.o .libs/parser_urlencoded.o .libs/parser_header.o .libs/parser_multipart.o .libs/module.o .libs/module_custom.o .libs/module_cgi.o .libs/error.o /usr/lib/libapr-1.so /usr/lib/libaprutil-1.so -L/usr/lib -lldap -llber -ldb-4.3 /usr/lib/libexpat.so -lrt -lcrypt -lpthread -ldl -Wl,-soname -Wl,libapreq2.so.3 -o .libs/libapreq2.so.3.6.0
    /usr/lib/gcc/i586-suse-linux/4.1.0/../../../../i586-suse-linux/bin/ld: cannot find -lldap
    collect2: ld returned 1 exit status

  2. #2
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    The error message is telling you that it wants to link to a file 'libldap', which I presume contains some code related to LDAP access. It cannot find said file, either because it doesn't exist on your system, or because it is stored in a place not identified with a '-L' linker flag. Try finding libldap, and if found, either add the location to /etc/ld.so.conf & running ldconfig. If it isn't found, try installing libldap, using whatever package management system your Suse installation provides.
    --- rod.
    Stuff happens. Then stays happened.

  3. #3
    Just Joined!
    Join Date
    Sep 2006
    Posts
    3
    thanks, that makes sense. however it still doesn't seem to be working. My
    /etc/ld.so.conf files contained the following

    /usr/X11R6/lib/Xaw3d
    /usr/X11R6/lib
    /usr/i486-linux-libc5/lib=libc5
    /usr/i386-suse-linux/lib
    /usr/local/lib
    /opt/kde3/lib
    /opt/gnome/lib
    include /etc/ld.so.conf.d/*.conf

    so I updated it to include /usr/lib

    because my libldap files where located in /usr/lib as the following shows

    /usr/lib/libldap-2.2.so.7
    /usr/lib/libldap-2.2.so.7.0.20
    /usr/lib/libldap-2.3.so.0
    /usr/lib/libldap-2.3.so.0.2.7
    /usr/lib/libldap_r-2.2.so.7
    /usr/lib/libldap_r-2.2.so.7.0.20
    /usr/lib/libldap_r-2.3.so.0
    /usr/lib/libldap_r-2.3.so.0.2.7
    /usr/lib/libldapcpp.so.0
    /usr/lib/libldapcpp.so.0.0.4

    so after I edited the /etc/ld.so.conf file I ran ldconfig, the tried to re-install the module, still getting the same error. I ran make distclean and tried to compile it by hand. still same thing. Is there anything I could be missing? Thanks.

    also when i run make i notice the following lines in the output near the begging of the output long before it dies from the error

    checking for /usr/bin/apu-1-config... yes
    setting APR_INCLUDES to " -I/usr/include "
    adding "-I/usr/include/apr-1" to APR_INCLUDES
    setting APR_LTFLAGS to " /usr/lib/libapr-1.la"
    adding "/usr/lib/libaprutil-1.la" to APR_LTFLAGS
    setting APR_LIBS to " -lldap -llber -ldb-4.3 -lexpat"
    adding "-lrt" to APR_LIBS
    adding "-lcrypt" to APR_LIBS
    adding "-lpthread" to APR_LIBS
    adding "-ldl" to APR_LIBS
    setting APR_LDFLAGS to " -L/usr/lib -laprutil-1 "
    adding "-lapr-1" to APR_LDFLAGS
    adding "-fno-strict-aliasing" to CFLAGS
    setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
    libapreq2 Version: 2.6.0

  4. #4
    Linux Newbie theNbomr's Avatar
    Join Date
    May 2007
    Location
    BC Canada
    Posts
    150
    See if you can find a way to add '-L /usr/lib' to the linker flags. In Makefiles, this is quite often done with a LDFLAGS macro. Perhaps the configure script can be given an argument to set this.
    --- rod.
    Stuff happens. Then stays happened.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...