taviso / 123elf

A native port of Lotus 1-2-3 to Linux.
1.17k stars 59 forks source link

ld error: multiple definition of ... #34

Closed marcosretrobits closed 2 years ago

marcosretrobits commented 2 years ago

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 oftmpnam' is dangerous, better use mkstemp' ./ld: (.text+0x466): warning: the use oftempnam' is dangerous, better use mkstemp' ./ld: 123.o:atoi.c:(.text+0xd9f9c): multiple definition ofgetmsg' ./ld: 123.o:putchar.c:(.text+0xdc0a4): multiple definition of putmsg' ./ld: 123.o:setjmp.s:(.text+0xdd990): multiple definition ofstime' collect2: error: ld returned 1 exit status make: *** [Makefile:44: 123] Error 1

Thanks!

sblendorio commented 2 years ago

Did you launch make clean before make ?

marcosretrobits commented 2 years ago

yes, I did

marcosretrobits commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

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

marcosretrobits commented 2 years ago

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