Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking failing for me on FreeBSD 13 #11

Open
wglb opened this issue Jul 8, 2022 · 3 comments
Open

Linking failing for me on FreeBSD 13 #11

wglb opened this issue Jul 8, 2022 · 3 comments

Comments

@wglb
Copy link

wglb commented Jul 8, 2022

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?

@hanshuebner
Copy link
Member

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.

@wglb
Copy link
Author

wglb commented Jul 9, 2022

Magic!

Thanks much

@wglb
Copy link
Author

wglb commented Jul 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants