#32 install problem

open
Chris
unspecified (4)
5
2013-01-08
2013-01-03
Anonymous
No

Brand new red hat machine. Downloaded/installed cmake, c++, pam-devel and berkeley_db
Ran cmake in the directory pam-abl sources exist
running make returns the following:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libdb.so when searching for -ldb
/usr/bin/ld: skipping incompatible /usr/lib/libdb.so when searching for -ldb
/usr/bin/ld: cannot find -ldb

Discussion

  • Chris
    Chris
    2013-01-04

    I've seen cmake screw up on Red Hat boxes, and try to use garbage linker commands.
    You may need to run
    sed -i 's/llibpam/lpam/' CMakeFiles/pam_abl_*.dir/link.txt
    sed -i 's/llibdb/ldb/' CMakeFiles/pam_abl_*.dir/link.txt

    Also a word of warning. Let me know if you have a busy server. If you have more than a few login attempts per second, you might also need a DB_CONFIG, since the performance is surprisingly horrible and things lock up chewing the CPU. When I have a few spare moments, I intend to figure out whether this is just because of the old version of bdb that RedHat uses or something else, but until then, you can make it a little better by tuning it. Regardless, I need to make it a little more friendly for the huge number of servers running various versions of CentOS/Red Hat in data centers (mine included).

    If your server is relatively calm, there should be no problems at all.

    Let me know if you still have trouble after running the commands above.

     
  • Chris
    Chris
    2013-01-04

    • assigned_to: nobody --> deksai
    • status: open --> pending
     

  • Anonymous
    2013-01-08

    slight typo SB pam-abl fixed that but alas the same results.
    -- Found PAM: /usr/lib/libpam.so;/usr/lib/libpam_misc.so;/usr/lib/libpamc.so
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /usr/downloads/pam-abl
    /usr/downloads/pam-abl # make
    Linking C executable pam-abl
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libdb.so when searching for -ldb
    /usr/bin/ld: skipping incompatible /usr/lib/libdb.so when searching for -ldb
    /usr/bin/ld: cannot find -ldb
    collect2: ld returned 1 exit status
    make[2]: *** [pam-abl] Error 1
    make[1]: *** [CMakeFiles/pam-abl_bin.dir/all] Error 2
    make: *** [all] Error 2

    To confirm I made the changes properly (I did a cut/paste) pam-abl_bin.dir link.txt is:
    /usr/bin/cc -O3 -DNDEBUG CMakeFiles/pam-abl_bin.dir/config.c.o CMakeFiles/pam-abl_bin.dir/dbfun.c.o CMakeFiles/pam-abl_bin.dir/l
    og.c.o CMakeFiles/pam-abl_bin.dir/pam_abl.c.o CMakeFiles/pam-abl_bin.dir/rule.c.o CMakeFiles/pam-abl_bin.dir/typefun.c.o CMakeFiles/
    pam-abl_bin.dir/tools.c.o -o pam-abl -rdynamic -ldb

     

  • Anonymous
    2013-01-08

    • status: pending --> open
     

  • Anonymous
    2013-01-08

    I went looking for any other occurrences of libdb.so and found these.
    /lib64/libdb-4.7.so
    /lib64/libpam.so.0.82.2

    So I went back to /usr/lib and changed the symbolic link to point to these files and now everything works.
    This might be something you need to add to your cmake (if thats possible), or put it into your list of possible solutions to peoples problems. Thanks