"Make" error: /usr/bin/lds cannot find -lxt
Long time computer user but new to linux. I am using Linux Mint 18.3.
I would like to use the TRS-80 emulator sdltrs. I downloaded the archive file for the sdltrs distribution and extracted the files. I then used the terminal to go to the correct source directory (in my case, dave/Downloads/sdltrs_1_1_0/src/linux. Then,as directed, I entered the make command in the terminal. It goes a long way toward building the executable file, but eventually exits with the error messages: /usr/bin/ld: cannot find -lxt collect2:error: ld returned 1 exit status Makefile:20: recipe for target 'sdltrs' failed make: *** [sdltrs] Error 1 I took a look at the ld folder. Turns out it is a symlink for x86_64-linux-gnu-ld which is a symlink for ld.bft which is a symlink for x86_64-linux-gnu-ld.bfd which is a Program (application/x-executable) At this point I do not know how to proceed. What do I have to do to get this makefile finish completely? Any help would be appreciated. |
Why don't you try
Code:
$ apt-cache search trs 80 and maybe this http://sdltrs.sourceforge.net/docs/index.html |
Thanks AwesomeMachine. I really don't want to build from source, but I really do want to install sdltrs and building it seems to be the only option. I already have xtrs installed (sdltrs is based on xtrs). I like your search tip
Code:
$ apt-cache search trs 80 I am aware of dependencies and I had installed Code:
sudo apt-get install libsdl1.2-dev Code:
sudo apt-get install build-essential linux-headers-$(uname -r) |
A recent episode of the Sunday Morning Linux Review discussed the TRS-80. They mentioned that part of the firmware is copyright and that legitimate valid emulators are therefore not available.
I personally know nothing one way or the other, but offer this because it may shed light on this issue. Aside: A long time ago, I knew a couple of training consultants who were also a couple who used a TRS-80 for their business. In the context of the times, they were quite happy with it, but they did tend to refer to it as a "Trash 80." |
The linker (ld) is looking for a library called 'xt'. That could be libXext.so, but I kind of doubt it. Try this
Code:
$ strace make After you find out, use the 'locate' command to find that file on the system. You might have to run 'updatedb' first. It might help if you could post a few more lines before the error in make. The bottom line is, ld can't find some library it needs for the compile. You could also try Code:
$ ld -lxt --verbose And that page I gave you tells where to get the ROM images for sdltrs. |
-lxt means libxt.so ( or libxt.a )
$ apt install libxt-dev ... provides /usr/lib/x86_64-linux-gnu/libXt.a /usr/lib/x86_64-linux-gnu/libXt.so https://packages.ubuntu.com/xenial/a...t-dev/filelist - |
Thanks to all who all who helped me. The issue is resolved and I really appreciate it.
knudfl put me on the right track by providing me with Code:
$ apt install libxt-dev That solution was to "modify the Makefile under src/linux. I changed the LIBS line to add a dependency on X11. LIBS = -lSDL -lXt -lX11" Once I did that, I was able to complete the makefile process and now have an executable sdltrs program. Great help guys, and spot on! |
same problem
I'm having the same problem with this binary. I've tried everything mentioned so far, including updating the make file.
I get this output when I run make: _______________________________ make gcc blit.o debug.o dis.o error.o load_cmd.o load_hex.o main.o trs_mkdisk.o trs_cassette.o trs_chars.o trs_disk.o trs_hard.o trs_imp_exp.o trs_interrupt.o trs_io.o trs_memory.o trs_printer.o trs_rom1.o trs_rom3.o trs_rom4p.o trs_sdl_gui.o trs_sdl_interface.o trs_sdl_keyboard.o trs_state_save.o trs_uart.o z80.o sdltrs_main.o PasteManager.o -o "sdltrs" -lSDL -lXt -lx11 /usr/bin/ld: cannot find -lx11 collect2: error: ld returned 1 exit status make: *** [Makefile:20: sdltrs] Error 1 ________________________________ and I can't find lx11 either. |
this is what is outputted with the unmodified make file:
______________________________________ make gcc blit.o debug.o dis.o error.o load_cmd.o load_hex.o main.o trs_mkdisk.o trs_cassette.o trs_chars.o trs_disk.o trs_hard.o trs_imp_exp.o trs_interrupt.o trs_io.o trs_memory.o trs_printer.o trs_rom1.o trs_rom3.o trs_rom4p.o trs_sdl_gui.o trs_sdl_interface.o trs_sdl_keyboard.o trs_state_save.o trs_uart.o z80.o sdltrs_main.o PasteManager.o -o "sdltrs" -lSDL -lXt /usr/bin/ld: PasteManager.o: undefined reference to symbol 'XConvertSelection' /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [Makefile:20: sdltrs] Error 1 ________________________________________ any help would be greatly appreciated! |
well, I found one problem. The "X" in X11 has to be capitalized. so that works. but I end up still without a compiled binary.
|
ok, learned something new. not sure why I didn't know this before. typing ./sdltrs makes it run. Now I just need to figure out how to install rom file and configure.
|
All times are GMT -5. The time now is 03:23 AM. |