Complete.Org: Mailing Lists: Archives: freeciv-dev: November 1998:
Re: [Freeciv-Dev] Linker error?
Home

Re: [Freeciv-Dev] Linker error?

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: Re: [Freeciv-Dev] Linker error?
From: Reinier Post <rp@xxxxxxxxxx>
Date: Tue, 3 Nov 1998 19:21:08 +0100

> Drew Thompson wrote:
> > 
> > All,
> >    I'm trying to compile FreeCiv on a SparcStation...I'm getting
> > the following error:
> > ld: Undefined symbol
> >    _strerror
> > collect2: ld returned 2 exit status
> > 
> > While running configure, I notice:
> > 
> > checking for strerror... no
> > 
> > 1) Am I out of luck?

./configure doesn't really work for Solaris yet.
Sometimes someone sends in some patches to cope with some problems
that some of us on Solaris are experiencing.  I have installed automake
and browsed the docs especially for this purpose but I haven't been able
to solve it yet.

> > differently since it knows there's no strerror?
> 
> My guess is that _we're_ supposed to be doing something differently,
> such as the attached patch.  (But I'm making this up as I go along, 
> so anyone feel free to correct me.)

Well, I'm afraid you're treating this at the wrong end.  The problem is
definately in configure itself.

I use xmkmf on Solaris; with minor tweaking I can get a working compile.
For 1.7.1, my xmkmf recipe is this:

% xmkmf && make XPM_INCLUDE_DIR=/usr/local/include \
  SYS_LIBRARIES='-ldl -lintl' \
    LD_RUN_PATH=/usr/local/lib XPM_LIB_DIR='-ldl -lintl -L/usr/local/lib'

(Over here, xpm is installed in /usr/local.)

> (What your platform thinks its doing without strerror which I believe
> is part of the ANSI C standard library I don't known, though I guess
> it must be common enough for configure to check for it...)

% ls -l /usr/include/string*
-rw-r--r--   1 bin      bin         3059 May  3  1996 /usr/include/string.h
-rw-r--r--   1 bin      bin          749 May  3  1996 /usr/include/strings.h
% grep strerror /usr/include/string*
/usr/include/string.h:extern char *strerror(int);

strerror() is there all right, on this Solaris box at least.
BTW I'm having a different problem: when I tell ./configure where to find
its XPM, it can no longer find the X11 libraries:

% setenv LD_LIBRARY_PATH /usr/local/lib:/usr/openwin/lib
% ./configure
loading cache ./config.cache
[...]
checking for X... libraries /usr/openwin/lib, headers /usr/openwin/include
[...]
checking for XOpenDisplay in -lX11... no
configure: error: Need X11
% setenv LD_LIBRARY_PATH /usr/openwin/lib
$ ./configure
[now it won't fail on XOpenDisplay, but it will fail on XPM
  which is in /usr/local/lib]

> -- David

-- 
Reinier Post


[Prev in Thread] Current Thread [Next in Thread]