Problem compiling from source

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

I'm trying to compile from source on a Fedora core 3 system. I'm pretty
sure I configured everything correctly but I get this error:


/usr/bin/ld: cannot find -ltermlib
collect2: ld returned 1 exit status
make[1]: *** [Sysunix] Error 1
make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src'
make: *** [nethack] Error 2

Any Idea what I did wrong?

--
Mark Healey
marknews(at)healeyonline(dot)com
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey <die@spammer.die> wrote:
> I'm trying to compile from source on a Fedora core 3 system. I'm pretty
> sure I configured everything correctly but I get this error:
>
>
> /usr/bin/ld: cannot find -ltermlib
> collect2: ld returned 1 exit status
> make[1]: *** [Sysunix] Error 1
> make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src'
> make: *** [nethack] Error 2
>
> Any Idea what I did wrong?

Edit src/Makefile and replace WINTTYLIB from termlib to ncurses.

--
Pasi Kallinen
paxed@alt.org
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey wrote:
> I'm trying to compile from source on a Fedora core 3 system. I'm pretty
> sure I configured everything correctly but I get this error:
>
>
> /usr/bin/ld: cannot find -ltermlib
> collect2: ld returned 1 exit status
> make[1]: *** [Sysunix] Error 1
> make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src'
> make: *** [nethack] Error 2
>
> Any Idea what I did wrong?

Well, you told the compiler to use termlib (or didn't tell him not to
use termlib), although termlib isn't available on your PC. Did you
follow the instructions "README.linux" file?

--
If geiger counter does not click,
the coffee, she is just not thick
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey wrote:

> I'm trying to compile from source on a Fedora core 3 system.

Dop archeologists eating an apple get another funny message on that
system than on ordinary *nixes?

--
Boudewijn Waijers (kroisos at home.nl).

The garden of happiness is surrounded by a wall so low only children
can look over it. - "the Orphanage of Hits", former Dutch radio show.
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Mon, 28 Mar 2005 21:38:17 +0200
"Boudewijn Waijers" <kroisos@REMOVETHISWORD.home.nl> wrote:

> Mark Healey wrote:
>
> > I'm trying to compile from source on a Fedora core 3 system.
>
> Dop archeologists eating an apple get another funny message on that
> system than on ordinary *nixes?
>

Your hat glows red 🙂

HPH
--
+------------------------------------+
| Hans-Peter Huth hans-ph@web.de |
|gpg fingerprint: 5BE6 E3C1 3257 89EA|
| F228 9856 CD11 41C2 4F14 D542|
+------------------------------------+
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Mon, 28 Mar 2005 20:58:23 +0200, Sebastian Hungerecker wrote:

> Mark Healey wrote:
>> I'm trying to compile from source on a Fedora core 3 system. I'm pretty
>> sure I configured everything correctly but I get this error:
>>
>>
>> /usr/bin/ld: cannot find -ltermlib
>> collect2: ld returned 1 exit status
>> make[1]: *** [Sysunix] Error 1
>> make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src'
>> make: *** [nethack] Error 2
>>
>> Any Idea what I did wrong?
>
> Well, you told the compiler to use termlib (or didn't tell him not to
> use termlib), although termlib isn't available on your PC. Did you
> follow the instructions "README.linux" file?

Y'know what. When I opened the file I saw a bunch of stuff about the
binary distribution and didn't read further.

Any I read on and followed the instructions, sort of. They're not
entirely correct. The changes should be made before doing the
"sh setup.sh" step.

Anyway it still doesn't work. I now get:

/usr/lib/libncurses.a -lXaw -lXmu -lXext -lXt -lXpm -lX11
/usr/bin/ld: cannot find -lXaw
collect2: ld returned 1 exit status
make[1]: *** [Sysunix] Error 1
make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src'
make: *** [nethack] Error 2

If I comment out the "#define X11_GRAPHICS" It compiles but I can't run it
windowed.

Pasi Kallines suggested changing WINTTYLIB to ncurses but that didn't fix
it.

--
Mark Healey
marknews(at)healeyonline(dot)com
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey wrote:
> Anyway it still doesn't work. I now get:
>
> /usr/lib/libncurses.a -lXaw -lXmu -lXext -lXt -lXpm -lX11
> /usr/bin/ld: cannot find -lXaw

That means he doesn't find the Xaw library, which is required for the
X11 interface of nethack. Do you have the X11 development packages
installed?


> If I comment out the "#define X11_GRAPHICS" It compiles but I can't run it
> windowed.

Well, if you don't compile X11 support in, you won't get the X11
interface.


> Pasi Kallines suggested changing WINTTYLIB to ncurses but that didn't fix
> it.

The ttylib only affects the tty interface not the X11 interface.

--
If geiger counter does not click,
the coffee, she is just not thick
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Tue, 29 Mar 2005 10:18:38 +0200, Sebastian Hungerecker wrote:

> Mark Healey wrote:
>> Anyway it still doesn't work. I now get:
>>
>> /usr/lib/libncurses.a -lXaw -lXmu -lXext -lXt -lXpm -lX11
>> /usr/bin/ld: cannot find -lXaw
>
> That means he doesn't find the Xaw library, which is required for the
> X11 interface of nethack. Do you have the X11 development packages
> installed?

Yes. Could it be some xorg vs the old X11 thing?

--
Mark Healey
marknews(at)healeyonline(dot)com
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey wrote:
> On Tue, 29 Mar 2005 10:18:38 +0200, Sebastian Hungerecker wrote:
>
>
>>Mark Healey wrote:
>>
>>>Anyway it still doesn't work. I now get:
>>>
>>>/usr/lib/libncurses.a -lXaw -lXmu -lXext -lXt -lXpm -lX11
>>>/usr/bin/ld: cannot find -lXaw
>>
>>That means he doesn't find the Xaw library, which is required for the
>>X11 interface of nethack. Do you have the X11 development packages
>>installed?
>
>
> Yes. Could it be some xorg vs the old X11 thing?
>

I really don't know, but you should try a:

locate Xaw

on the command line and see what you get.

also check to see if:

/usr/X11R6/lib
/usr/X11R6/include

are in your /etc/ld.so.conf

If Fedora has that

If they aren't and Xaw is on your system, add them to /etc/ld.so.conf
and run:

/sbin/ldconfig

And then try a recompile and see what happens.

I'm relatively new to Linux though.


CronoCloud (Ron Rogers)
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 30 Mar 2005 05:55:39 +0000, Ron Rogers Jr. wrote:

> Mark Healey wrote:
>> On Tue, 29 Mar 2005 10:18:38 +0200, Sebastian Hungerecker wrote:
>>
>>
>>>Mark Healey wrote:
>>>
>>>>Anyway it still doesn't work. I now get:
>>>>
>>>>/usr/lib/libncurses.a -lXaw -lXmu -lXext -lXt -lXpm -lX11
>>>>/usr/bin/ld: cannot find -lXaw
>>>
>>>That means he doesn't find the Xaw library, which is required for the
>>>X11 interface of nethack. Do you have the X11 development packages
>>>installed?
>>
>>
>> Yes. Could it be some xorg vs the old X11 thing?
>>
>
> I really don't know, but you should try a:
>
> locate Xaw
>
> on the command line and see what you get.

It is there under /usr/X11R6/include/X11/

> also check to see if:
>
> /usr/X11R6/lib
> /usr/X11R6/include
>
>
> are in your /etc/ld.so.conf

"/usr/X11Rc/include" wasn't

> If Fedora has that
>
> If they aren't and Xaw is on your system, add them to /etc/ld.so.conf
> and run:
>
> /sbin/ldconfig

Did that.

> And then try a recompile and see what happens.

Here it is:

[A bunch of non error messages snipped]

/usr/bin/ld: cannot find -lXaw
collect2: ld returned 1 exit status
make[1]: *** [Sysunix] Error 1
make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src' make:
*** [nethack] Error 2


--
Mark Healey
marknews(at)healeyonline(dot)com
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Wed, 30 Mar 2005 23:45:29 GMT
Mark Healey <die@spammer.die> wrote:

> /usr/bin/ld: cannot find -lXaw
> collect2: ld returned 1 exit status
> make[1]: *** [Sysunix] Error 1
> make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src' make:
> *** [nethack] Error 2

It is still not finding it, do a

locate -r libXaw*

and make sure the directory that contains the results are in the
/etc/ld.so.conf file and spelled correctly. Then "sbin/ldconfig"
like before and then cross your fingers and try. Hope this helps.
Good luck.
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Thu, 31 Mar 2005 00:27:51 +0000, bebing wrote:

> On Wed, 30 Mar 2005 23:45:29 GMT
> Mark Healey <die@spammer.die> wrote:
>
>> /usr/bin/ld: cannot find -lXaw
>> collect2: ld returned 1 exit status
>> make[1]: *** [Sysunix] Error 1
>> make[1]: Leaving directory `/home/mark/Tarballs/nethack-3.4.3/src' make:
>> *** [nethack] Error 2
>
> It is still not finding it, do a
>
> locate -r libXaw*

Here it is:

[root@buttercup mark]# locate -r libXaw*
/usr/X11R6/lib/libXaw3d.so
/usr/X11R6/lib/libXaw.so.7.0
/usr/X11R6/lib/libXaw.so
/usr/X11R6/lib/libXaw3d.so.7.0
/usr/X11R6/lib/libXaw.so.6
/usr/X11R6/lib/libXaw3d.so.7
/usr/X11R6/lib/libXaw.so.6.1
/usr/X11R6/lib/libXaw.so.7
/usr/X11R6/lib/libXaw3d.a
/usr/X11R6/lib/libXau.a

and here is /etc/ld.so.conf"

[root@buttercup mark]# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/X11R6/lib
/usr/X11R6/include
/usr/lib/mysql

and make sure the directory that contains the results are in the
/etc/ld.so.conf file and spelled correctly. Then "sbin/ldconfig"
like before and then cross your fingers and try. Hope this helps.

Unfortunately it didn't. I got the same results as before.


--
Mark Healey
marknews(at)healeyonline(dot)com
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey wrote:

> On Thu, 31 Mar 2005 00:27:51 +0000, bebing wrote:
>
>> On Wed, 30 Mar 2005 23:45:29 GMT
>> Mark Healey <die@spammer.die> wrote:
>>
>>> /usr/bin/ld: cannot find -lXaw collect2: ld returned 1 exit status
>>> make[1]: *** [Sysunix] Error 1 make[1]: Leaving directory
>>> `/home/mark/Tarballs/nethack-3.4.3/src' make:
>>> *** [nethack] Error 2
>>
>> It is still not finding it, do a
>>
>> locate -r libXaw*
>
> Here it is:
>
> [root@buttercup mark]# locate -r libXaw*
> /usr/X11R6/lib/libXaw3d.so
> /usr/X11R6/lib/libXaw.so.7.0
> /usr/X11R6/lib/libXaw.so

Did you make sure to follow step 6 from README.linux? In particular, note
the lines starting with "LFLAGS". (Note: this problem has nothing to do
with ldconfig -- that's a runtime rather than compile time issue).

6. Makefile.src: define modern, non-BSD Linux and linux options throughout
CC = gcc
LFLAGS = -L/usr/X11R6/lib
WINSRC = $(WINTTYSRC) $(WINX11SRC)
WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
WINTTYLIB = /usr/lib/libncurses.a
WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
WINLIB = $(WINTTYLIB) $(WINX11LIB)

Makefile.utl: define modern, non-BSD Linux and linux options throughout
Use bison/flex instead of yacc/lex
CC = gcc
LFLAGS = -L/usr/X11R6/lib
YACC = bison -y
LEX = flex



--
Benjamin Lewis

A small, but vocal, contingent even argues that tin is superior, but they
are held by most to be the lunatic fringe of Foil Deflector Beanie science.
 
Archived from groups: rec.games.roguelike.nethack (More info?)

On Thu, 31 Mar 2005 06:48:15 GMT
Mark Healey <die@spammer.die> wrote:

> [root@buttercup mark]# cat /etc/ld.so.conf
> include ld.so.conf.d/*.conf
> /usr/X11R6/lib
> /usr/X11R6/include
> /usr/lib/mysql

Hmm, I don't include any other files in mine, so that's
unfamiliar territory for me. I would investigate and
see what .conf files its pulling in from /etc/ld.so.conf.d.
Check for any errors there, maybe try deleting that
include line and go through the steps and if it doesn't
work put it back. :) Good luck, sorry I can't be more
helpful.
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Benjamin Lewis wrote:
> Mark Healey wrote:
>
>
>>On Thu, 31 Mar 2005 00:27:51 +0000, bebing wrote:
>>
>>
>>>On Wed, 30 Mar 2005 23:45:29 GMT
>>>Mark Healey <die@spammer.die> wrote:
>>>
>>>
>>>>/usr/bin/ld: cannot find -lXaw collect2: ld returned 1 exit status
>>>>make[1]: *** [Sysunix] Error 1 make[1]: Leaving directory
>>>>`/home/mark/Tarballs/nethack-3.4.3/src' make:
>>>>*** [nethack] Error 2
>>>
>>>It is still not finding it, do a
>>>
>>>locate -r libXaw*
>>
>>Here it is:
>>
>>[root@buttercup mark]# locate -r libXaw*
>>/usr/X11R6/lib/libXaw3d.so
>>/usr/X11R6/lib/libXaw.so.7.0
>>/usr/X11R6/lib/libXaw.so
>
>
> Did you make sure to follow step 6 from README.linux? In particular, note
> the lines starting with "LFLAGS". (Note: this problem has nothing to do
> with ldconfig -- that's a runtime rather than compile time issue).
>
> 6. Makefile.src: define modern, non-BSD Linux and linux options throughout
> CC = gcc
> LFLAGS = -L/usr/X11R6/lib
> WINSRC = $(WINTTYSRC) $(WINX11SRC)
> WINOBJ = $(WINTTYOBJ) $(WINX11OBJ)
> WINTTYLIB = /usr/lib/libncurses.a
> WINX11LIB = -lXaw -lXmu -lXext -lXt -lXpm -lX11
> WINLIB = $(WINTTYLIB) $(WINX11LIB)
>
> Makefile.utl: define modern, non-BSD Linux and linux options throughout
> Use bison/flex instead of yacc/lex
> CC = gcc
> LFLAGS = -L/usr/X11R6/lib
> YACC = bison -y
> LEX = flex
>
>
>

I just remembered that I got errors similar to the original posters when
I first tried to compile Nethack on the PS2. I had not disabled the
debugging LFLAGS. I don't know why the debugging options aren't disabled
by default, but they aren't and since it comes after it will make LFLAGS=


CronoCloud (Ron Rogers)
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Mark Healey <die@spammer.die> wrote in
news😛an.2005.03.31.06.50.52.106145@spammer.die:

>
>
I am curious as to why /usr/X11R6/include is in that file, should that not be
only in /etc/profile?
 

TRENDING THREADS