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

ld error: multiple definition of ... #34

Closed
marcosretrobits opened this issue May 26, 2022 · 6 comments
Closed

ld error: multiple definition of ... #34

marcosretrobits opened this issue May 26, 2022 · 6 comments

Comments

@marcosretrobits
Copy link

Hi, thank you for your amazing work!
I am trying to build on WSL / Debian 10 but got the following error:

cc forceplt.o -lc -m32 -ggdb3 -O0 -fno-stack-protector -lc -m32 -ggdb3 -O0 -fno-stack-protector -B. -Wl,-b,coff-i386 -no-pie 123.o dl_init.o main.o wrappers.o patch.o filemap.o graphics.o draw.o -Wl,--whole-archive,ttydraw/ttydraw.a,--no-whole-archive -o 123 -lncurses -ltinfo
./ld: forceplt.o: in function __require_ref': (.text+0x470): warning: the use of tmpnam' is dangerous, better use mkstemp' ./ld: (.text+0x466): warning: the use of tempnam' is dangerous, better use mkstemp' ./ld: 123.o:atoi.c:(.text+0xd9f9c): multiple definition of getmsg'
./ld: 123.o:putchar.c:(.text+0xdc0a4): multiple definition of putmsg' ./ld: 123.o:setjmp.s:(.text+0xdd990): multiple definition of stime'
collect2: error: ld returned 1 exit status
make: *** [Makefile:44: 123] Error 1

Thanks!

@sblendorio
Copy link

Did you launch make clean before make ?

@marcosretrobits
Copy link
Author

yes, I did

@marcosretrobits
Copy link
Author

At my first build attempt, I actually didn't rename ld-new to ld; then I did but the ld error occurred even after a make clean. I will try to clone the repo to a clean location and try again.

@taviso
Copy link
Owner

taviso commented May 26, 2022

I think it should work on WSL2 (not WSL1), but if this is Debian stable the toolchain is very old and there might be lots of issues getting it working. I think even the gzip shipped in stable is too old and has broken pack support, so I'm not sure if you'll even be able to unpack the disk images!

I think it will definitely work under Debian bookworm (i.e. testing) under WSL2, and Ubuntu under WSL2.

@taviso
Copy link
Owner

taviso commented May 26, 2022

Oh - I think it should be possible to build it on another machine, then run the binary on Debian stable.

@marcosretrobits
Copy link
Author

Thank you very much!
I successfully built it with current Ubuntu version available under WSL2.

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

3 participants