LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2018, 08:22 PM   #1
dlfallen
LQ Newbie
 
Registered: Feb 2018
Posts: 10

Rep: Reputation: Disabled
"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.
 
Old 02-12-2018, 09:14 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Why don't you try
Code:
$ apt-cache search trs 80
and install one the emulators that comes up. Otherwise, if you really want to build from source, you have to read which dependencies are required for sdltrs, and install them using apt. At the very least you probably need libsdl. See this http://forums.debian.net/viewtopic.php?f=16&t=67657

and maybe this http://sdltrs.sourceforge.net/docs/index.html
 
Old 02-12-2018, 10:29 PM   #3
dlfallen
LQ Newbie
 
Registered: Feb 2018
Posts: 10

Original Poster
Rep: Reputation: Disabled
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
which I will add to my bag of tricks.

I am aware of dependencies and I had installed
Code:
sudo apt-get install libsdl1.2-dev
prior to attempting the build. I looked at the link you provided to the Debian User Forums and based on what I saw their ran
Code:
sudo apt-get install build-essential linux-headers-$(uname -r)
I still generate the original error message when I attempt the build.
 
Old 02-12-2018, 10:46 PM   #4
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,272
Blog Entries: 28

Rep: Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124Reputation: 6124
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."
 
Old 02-13-2018, 09:55 PM   #5
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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
for the make command command. When the trace stops, see if you can find which file ld is looking for.

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
to find the name of the files. In the makefile there is a variable called 'LDFLAGS'. After you find the library, edit the makefile to read "LDFLAGS=-L/path/to/library/location/".

And that page I gave you tells where to get the ROM images for sdltrs.
 
Old 02-14-2018, 06:28 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
-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

-
 
Old 02-14-2018, 02:16 PM   #7
dlfallen
LQ Newbie
 
Registered: Feb 2018
Posts: 10

Original Poster
Rep: Reputation: Disabled
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 got rid of the pesky "cannot find -lxt" error. Instead, I got "undefined reference to symbol 'XConvertSelection'". Fortunately, I was aware of the solution to that problem on https://rmcore.com/trs-80-emulator-ubuntu-14-04/
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!
 
1 members found this post helpful.
Old 08-04-2020, 12:15 AM   #8
hello _world
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 08-04-2020, 12:18 AM   #9
hello _world
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Rep: Reputation: Disabled
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!
 
Old 08-04-2020, 10:08 PM   #10
hello _world
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Rep: Reputation: Disabled
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.
 
Old 08-04-2020, 10:26 PM   #11
hello _world
LQ Newbie
 
Registered: Aug 2020
Posts: 4

Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] I got "/usr/bin/ld: cannot find -lXaw" error!! msbstar Linux - Newbie 2 10-11-2012 02:10 PM
[SOLVED] Error When Performing "make all" : /usr/bin/ld: -f may not be used without -shared limh Linux - Software 6 08-28-2009 08:39 PM
Error When performing Make: "/usr/bin/ld: cannot find -lpanel" paulmwiu Linux - General 6 08-28-2009 12:28 PM
make issue "/usr/bin/ld: cannot find -ldc1394_control" obaidmushtaq Linux - Software 10 03-21-2009 05:14 AM
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration