Menu

#11 libcrypt-2.5.7 oddities

Production/Stable
open
9
2012-09-14
2004-01-06
No

I am using an old SPARCstation 10 (Solaris 2.5.1) as a
web server and am trying to compile the latest stable
release of libmcrypt with gcc 3.0.4 and Sun's own linker.

Previous releases (libmcrypt 2.5.3) worked fine, but this
one (2.5.7) crashes out in the ciphertest linking stage:

gcc -g -O2 -o .libs/ciphertest
cipher_test.o ../lib/.libs/libmcrypt.so -R/usr/local/lib

makes ld spit several pages of unreferenced symbols
from the libmcrypt library. Now I returned to the ../lib
directory, issued "make clean" and rebuilt the library
using the same algorithm and mode object files. This
time, I got a much smaller library, but the ciphertest
compiled. However, it fails everything when executed.

Since I used the same compiler "last time", and can't
imagine any system changes has occurred since then,
either it is bit rot or something in the build process has
been changed. I have tried to rebuild the library from
scratch, both with fresh sources and already processed.

As I understand only one major security issue has been
addressed since August 2002, maybe I can stick to the
older version of the library for now? If there is some
useful output from configure or make one needs to
determine if an error occurs, I can be reached on e-mail
or something.

Anders Carlsson, anders.carlsson@mds.mdh.se
(I don't spamblock, as I get enough of spam anyway)

Discussion

  • Chris

    Chris - 2004-01-12

    Logged In: YES
    user_id=949162

    I experience the same error on Solaris 9
    gcc 3.3.2
    libmcrypt 2.5.7

    error:
    wake_LTX__mcrypt_decrypt ../lib/.libs/libmcrypt.so
    ld: fatal: Symbol referencing errors. No output written
    to .libs/ciphertest
    collect2: ld returned 1 exit status
    Error code 1
    make: Fatal error: Command failed for target ciphertest' Current working directory /export/home/chriss/upd/libmcrypt- 2.5.7/src *** Error code 1 make: Fatal error: Command failed for targetall-recursive'
    Current working directory /export/home/chriss/upd/libmcrypt-
    2.5.7
    Error code 1
    make: Fatal error: Command failed for target `all'

     
  • Scott Ripley

    Scott Ripley - 2004-01-15

    Logged In: YES
    user_id=433437

    I am also getting the same error with Sol9, GCC 3.2.2, and
    all the requisite GNU utils.

     
  • James P. Dugal

    James P. Dugal - 2004-06-07

    Logged In: YES
    user_id=609168

    Under Solaris 2.8, using Sun's cc (Forte 6.2) I have no
    problems.
    I ran configure with these environment vars:
    CC=cc CFLAGS="-xO2 -xlibmil -xarch=v8plusa"
    and with just the --prefix option.

     
  • Nobody/Anonymous

    Logged In: NO

    Same case here under Solaris 9 and gcc 3.3.2.
    ./configure ; make
    stops on ld errors (multiple pages).
    another shot on
    ./configure ; make
    and the compilations succeeds! But
    make check
    fails miserably and the compiled library does not indeed
    contain any cryptographic algorithm.

    The solution is hidden in the details.
    Try to set /usr/xpg4/bin before /bin in your path.
    Apparently, 2.5.7 contains in the Changelog some information
    for "mcrypt_symb.c" created only when needed using sed; an
    older post somewhere in the lists suggested that (obviously)
    /bin/sed is kind of broken in Solaris (or does not work as
    expected).

    To verify the correctness of my hypothesis ... Removed all
    sources of libmcrypt-2.5.7 (dir and .tar.gz), re-downloaded
    the files, changed my path as /usr/xpg4/bin to be before
    /bin and everything worked just fine, including
    ./configure ; make
    make checks

    I think it should be referenced somewhere or else the
    ./configure script should do a much better work as to verify
    that detected sed works as expected.

     
  • Artemios G. Voyiatzis

    Logged In: YES
    user_id=725426

    Same case here under Solaris 9 and gcc 3.3.2.
    ./configure ; make
    stops on ld errors (multiple pages).
    another shot on
    ./configure ; make
    and the compilations succeeds! But
    make check
    fails miserably and the compiled library does not indeed
    contain any cryptographic algorithm.

    The solution is hidden in the details.
    Try to set /usr/xpg4/bin before /bin in your path.
    Apparently, 2.5.7 contains in the Changelog some information
    for "mcrypt_symb.c" created only when needed using sed; an
    older post somewhere in the lists suggested that (obviously)
    /bin/sed is kind of broken in Solaris (or does not work as
    expected).

    To verify the correctness of my hypothesis ... Removed all
    sources of libmcrypt-2.5.7 (dir and .tar.gz), re-downloaded
    the files, changed my path as /usr/xpg4/bin to be before
    /bin and everything worked just fine, including
    ./configure ; make
    make checks

    I think it should be referenced somewhere or else the
    ./configure script should do a much better work as to verify
    that detected sed works as expected.

     
  • Jonathan Day

    Jonathan Day - 2005-06-14

    Logged In: YES
    user_id=1466

    This is under investigation and, yes, there is significant
    bit-rot in the build system. I am working on replacing the
    entire build engine, as the current one has so may problems.

     
  • Nobody/Anonymous

    Logged In: NO

    cd /var/tmp
    rm -rf libmcrypt-2.5.7
    gunzip -c /ul/src/crypto/libmcrypt-2.5.7.tar.gz | tar -xvf -
    cd libmcrypt-2.5.7
    ./configure --prefix=/usr/local
    gmake
    cd lib
    gmake clean
    gmake
    cd ..
    gmake
    gmake install
    
     

Log in to post a comment.