0

/usr/ports/security/bcrypt

when I'm trying to install it I get this:

cc -O2 -pipe -fno-strict-aliasing  -c main.c
cc -O2 -pipe -fno-strict-aliasing  -c blowfish.c
cc -O2 -pipe -fno-strict-aliasing  -c rwfile.c
cc -O2 -pipe -fno-strict-aliasing  -c keys.c
cc -O2 -pipe -fno-strict-aliasing  -c wrapbf.c
cc -O2 -pipe -fno-strict-aliasing  -c endian.c
cc -O2 -pipe -fno-strict-aliasing  -c wrapzl.c
cc -O2 -pipe -fno-strict-aliasing  -o bcrypt main.o blowfish.o rwfile.o keys.o wrapbf.o endian.o wrapzl.o
wrapzl.o(.text+0x55): In function `douncompress':
: undefined reference to `uncompress'
wrapzl.o(.text+0x149): In function `docompress':
: undefined reference to `compress'
*** Error code 1
1 error
*** Error code 1

In makefile there is:

LDFLAGS+=       -lz

How to trace this error and solve problem?

Edit:
@arved, that is Makefile:

DEFAULTS = Makefile includes.h blowfish.h functions.h config.h
CC?= gcc
CFLAGS?= -O2 -Wall
COMPILE = ${CC} ${CFLAGS}
OBJS = main.o blowfish.o rwfile.o keys.o wrapbf.o endian.o wrapzl.o
LDFLAGS?= -L/usr/local/lib -lz
PREFIX?= /usr/local
Sergey
  • 714
  • 2
  • 6
  • 21
  • 1
    Side note: You may want to use OpenSSL's `bf` encryption instead of `bcrypt` as it's a much more widely supported format. – Chris S Nov 21 '11 at 16:53

1 Answers1

1

Works for me.

Can you post /usr/ports/security/bcrypt/work/bcrypt-1.1/Makefile ?

There should be a line like: LDFLAGS?= -L/usr/local/lib -lz in it.

If you don't have it, it is a hint that your "sed" might be broken.

arved
  • 453
  • 2
  • 14
  • Makefile seems ok (see edit), anyway I used pkg_add and that did it. – Sergey Nov 22 '11 at 07:56
  • 1
    if someone wants to debug this further, next step would be to test if your libz has the required functions, or to add more debug output by running "make -dl" – arved Nov 25 '11 at 05:12