Can anyone else get the C implementation of phpass built under Ubuntu?

Can anyone else get the C implementation of phpass built under Ubuntu?

MrDOSMrDOS Member
edited August 2012 in General

...because I can't. Ubuntu 12.04, and I'm just trying to make the C reference code included in phpass 0.3. Under Debian, I can apt-get install libssl-dev and then the make trundles along happily; however, on the Ubuntu system I've got to play with, the compile spins through happily but the linking falls on its face.

Comments

  • Can you post the error message you are getting?

  • MrDOSMrDOS Member
    edited August 2012
    $ make
    gcc -c -Wall -O2 -fomit-frame-pointer -funroll-loops crypt_private.c -DTEST -o crypt_private-test.o
    crypt_private.c: In function ‘crypt_private’:
    crypt_private.c:81:2: warning: pointer targets in passing argument 1 of ‘MD5_Final’ differ in signedness [-Wpointer-sign]
    /usr/include/openssl/md5.h:113:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’
    crypt_private.c:88:3: warning: pointer targets in passing argument 1 of ‘MD5_Final’ differ in signedness [-Wpointer-sign]
    /usr/include/openssl/md5.h:113:5: note: expected ‘unsigned char *’ but argument is of type ‘char *’
    gcc -s -lcrypto crypt_private-test.o -o crypt_private-test
    crypt_private-test.o: In function `crypt_private':
    crypt_private.c:(.text+0xe6): undefined reference to `MD5_Init'
    crypt_private.c:(.text+0xfa): undefined reference to `MD5_Update'
    ...
    crypt_private.c:(.text+0x34b): undefined reference to `MD5_Update'
    crypt_private.c:(.text+0x35b): undefined reference to `MD5_Update'
    crypt_private.c:(.text+0x367): undefined reference to `MD5_Final'
    collect2: ld returned 1 exit status
    make: *** [crypt_private-test] Error 1
    

    The warnings appear on other systems, and seem to be just warnings, but the “undefined reference” errors are specific to this system. Google doesn't say much, but what it does say (-lssl along with lcrypto) doesn't seem to change anything, and given that it builds just fine on another system, I think there's a problem with some library actually being missing – I just don't know which.

  • Did you download the "build-essentials" package?

    Catalyst Host - Pie Approved!
  • biplabbiplab Member
    edited August 2012

    Issue the following command to build -

    make LDFLAGS="-lssl"
  • @HalfEatenPie said: Did you download the "build-essentials" package?

    Yup, that's how I've got gcc/make in the first place.

    @biplab said: Issue the following command to build -

    -lssl doesn't seem to get me any further, unfortunately.

  • I mean technically you could have just downloaded gcc and make yourself without using build-essential.

    Catalyst Host - Pie Approved!
Sign In or Register to comment.