Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2425) Civ Fehler unter Solaris
Home

[Freeciv-Dev] Re: (PR#2425) Civ Fehler unter Solaris

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxx, Lew Palm <lpalm@xxxxxxxxxxxxxxxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: (PR#2425) Civ Fehler unter Solaris
From: "Reinier Post via RT" <rt@xxxxxxxxxxxxxx>
Date: Wed, 27 Nov 2002 01:05:51 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Tue, Nov 26, 2002 at 10:49:15AM -0800, Raimar Falke via RT wrote:

> Ich schreibe an Dich, weil es sich vermutlich nicht um einen Bug
> handeln wird... Ich habe hier im Uni-Solaris-System freeciv (latest
> stable) kompiliert unter Angabe eines Unterverzeichnisses meines HOMEs
> als Zielverzeichnis, da ich keine root-Rechte habe. Ging auch alles
> wunderbar und fehlerfrei, doch wenn ich civclient (oder server)
> starten will sagt er:
> 
> ld.so.1: civclient: fatal: libiconv.so.2: open failed: No such file or 
> directory
> killed

I am just blathering here without actually testing, but my
guess is the following.

The normal cause of this problem is the fact that on Solaris libraries
must be linked with

  -L libdir -lname -R libdir -lname

It is the -R argument that tells the compiled binary to search for the
library in that location at runtime.

This can be corrected by using the $LD_RUN_PATH and/or $LD_LIBRARY_PATH
environment variables, but that is a bad idea.  (Never set these unless
someone else already broke some packages in this way.  I always unset
them explicitly before I compile anything.)
It's better to make sure the (right) -R is used at compile time.

A lot of software fails to insert the -R.  As a result, it can't find the
library at runtime.  A couple of packages installed on www.freeciv.org,
which runs Solaris, have this problem.  GTK+ also has this problem:
after installing it you manually have top insert the -R argument into
the glib-config and gtk-config scripts.

Of course the Freeciv ./configure phase should insert all the -Rs
automatically, and I thought it already did.  I compile Freeciv
on Solaris without this problem.

> Was ist die libiconv, wo bekomme ich die her - muesste deren Fehlen
> nicht beim kompilieren gemeldet werden?

libiconv is a character set handling library, and it is not required
by Freeciv directly, as far as I know; however, Freeciv requires
GNU gettext (unless --disable-nls is used), and GNU gettext can
optionally be compiled with libiconv.  So my guess is that you have
to insert a -Ri /path/to/libiconv-1.x/lib -liconv to $LDFLAGS.

-- 
Reinier



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