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

Build failure on Kubuntu 20.04 #36

Open
Kirtai opened this issue Sep 4, 2020 · 2 comments · May be fixed by #38
Open

Build failure on Kubuntu 20.04 #36

Kirtai opened this issue Sep 4, 2020 · 2 comments · May be fixed by #38

Comments

@Kirtai
Copy link

Kirtai commented Sep 4, 2020

I get the following error when trying to build on Kubuntu 20.04

gcc -std=gnu99 -Wall -Wextra -ggdb -g -O2 -DXBEEP -D_REENTRANT -I/usr/include/SDL2 -DSDL2 -Wno-packed-bitfield-compat -Og -DSYSCONFDIR=/usr/local/etc -lm  -o lam 3com.o lambda_cpu.o mem.o sdu.o smd.o tapemaster.o kernel.o nubus.o sdu_hw.o syms.o vcmem.o  -lSDL2 -lyaml
/usr/bin/ld: kernel.o: undefined reference to symbol 'sin@@GLIBC_2.2.5'
/usr/bin/ld: /lib/x86_64-linux-gnu/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
@mnp
Copy link

mnp commented Sep 5, 2020

Yeah I see that too on 20.04. Try this workaround. Copy that "gcc..." link line, then cd src and try the link by hand but add an extra -lm onto the end. It seems order matters.

@Kirtai
Copy link
Author

Kirtai commented Sep 5, 2020

Yes, that worked, thank you. Very strange.

Some experimentation shows that the -lm has to be after the file that uses the symbol, kernel.o in this case. I wonder if it's a gcc bug of some sort, the order shouldn't matter like that.

@mnp mnp linked a pull request Sep 6, 2020 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants