Skip to content

Build fails under OpenBSD amd64/7.5-stable due to missing math library #3

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

Closed
morgant opened this issue Jan 7, 2025 · 2 comments
Closed

Comments

@morgant
Copy link
Contributor

morgant commented Jan 7, 2025

When attempting to build under OpenBSD amd64/7.5-stable using Makefile.bsd-wrapper linking fails due to missing math (m) library:

$ make -f Makefile.bsd-wrapper
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c spectrogram.c
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c fft.c
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c cms.c
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c aux.c
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c widget.c
cc -O2 -pipe -Wall -I/usr/local/include -I/usr/X11R6/include  -MD -MP  -c sio.c
cc -Wall  -o spectrogram spectrogram.o fft.o cms.o aux.o widget.o sio.o -L/usr/local/lib -L/usr/X11R6/lib -lfftw3 -lX11 -lsndio
ld: error: undefined symbol: cos
>>> referenced by fft.c
>>>               fft.o:(init_fft)

ld: error: undefined symbol: cabs
>>> referenced by fft.c
>>>               fft.o:(exec_fft)
>>> did you mean: fabs
>>> defined in: /usr/lib/libc.so.99.0
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error 1 in /home/linetrace/Projects/spectrogram (<bsd.prog.mk>:126 'spectrogram')
@morgant
Copy link
Contributor Author

morgant commented Jan 7, 2025

I've submitted PR #4 which resolves this and updates the README with instructions for using the Makefile.bsd-wrapper under OpenBSD.

@dim13
Copy link
Owner

dim13 commented Jan 7, 2025

Resolved with #4

@dim13 dim13 closed this as completed Jan 7, 2025
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