cl-gd icon indicating copy to clipboard operation
cl-gd copied to clipboard

Linking failing for me on FreeBSD 13

Open wglb opened this issue 3 years ago • 3 comments

I've used this library very successfully for many years under Linux.

Now, I am trying to move my program to FreeBSD, and when I attempt to compile cl-gd-glue.so, I receive the following error messages:

`make cc -I/usr/local/include -fPIC -c cl-gd-glue.c ld -shared -lgd -lz -lpng -ljpeg -lfreetype -lm -lc cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib ld: error: unable to find library -lz ld: error: unable to find library -lm ld: error: unable to find library -lc *** Error code 1

Stop. make: stopped in /usr/home/wgl/quicklisp/dists/quicklisp/software/cl-gd-20201220-git `

It sounds like there are some support libraries missing?

wglb avatar Jul 08 '22 20:07 wglb

Try changing the invocation of ld in the Makefile:5 to cc. I could run make successfully with that change on FreeBSD-12, where it failed with the same error originally.

hanshuebner avatar Jul 08 '22 20:07 hanshuebner

Magic!

Thanks much

wglb avatar Jul 09 '22 18:07 wglb

I had to rebuild my system and came across this again. This time, to make it work i used the ld command

ld -shared -lgd -ljpeg -lfreetype cl-gd-glue.o -o cl-gd-glue.so -L/usr/local/lib

Leaving off some of the -lz (etc) commands and all is working again.

The only suggestion I have is to update the documentation for FreeBSD users.

wglb avatar Jul 06 '24 06:07 wglb