caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Sven Luther <sven.luther@wanadoo.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] static linking and ocaml 3.07 beta 1
Date: Thu, 9 Oct 2003 08:09:18 -0400	[thread overview]
Message-ID: <20031009120918.GX9670@alan-schm1p> (raw)
In-Reply-To: <20031008192529.GA10828@iliana>

[-- Attachment #1: Type: text/plain, Size: 4042 bytes --]

* Sven Luther (sven.luther@wanadoo.fr) wrote:
> On Wed, Aug 06, 2003 at 02:02:47PM +0200, Michal Moskal wrote:
> > On Mon, Aug 04, 2003 at 10:29:16AM -0400, Alan Schmitt wrote:
> > > I have had the following strange message when doing a static link:
> > > 
> > > ocamlopt unix.cmxa str.cmxa  -ccopt -static  sysconf.cmx  abort.cmx  debug.cmx  timeout.cmx  bufrw.cmx  ftp.cmx  config.cmx  utils.cmx  crypt.cmx  future.cmx  timed_events.cmx  dns.cmx  http.cmx  commands.cmx  event.cmx  maingrenouille.cmx -o camlgrenouille.static 
> > > /usr/local/lib/ocaml/libunix.a(getgr.o)(.text+0x10c): In function `unix_getgrgid':
> > > : Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
> > 
> > You might be better off linking statically everything *except* glibc.
> > Executables linked dynamically against given version of glibc will
> > mostly run with later versions (but not the other way around).
> > 
> 
> Mmm, how did you solve this one ? I also get this :
> 
> ocamlopt -I Objets  -w p -I +lablgtk2  -ccopt -static -o svenopt
> lablgtk.cmxa gtkInit.cmx unix.cmxa date.cmx ... interface.cmx main.cmx
> /usr/lib/ocaml/3.07/libunix.a(getgr.o)(.text+0x115): dans la fonction «
> unix_getgrgid »:
> : warning: Using 'getgrgid' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for linking
> /usr/lib/ocaml/3.07/libunix.a(getgr.o)(.text+0xdc): dans la fonction «
> unix_getgrnam »:
> : warning: Using 'getgrnam' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for linking
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtkfilesel.o)(.text+0x6d81):
> dans la fonction « get_pwdb »:
> : warning: Using 'getpwent' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for linking
> /usr/lib/ocaml/3.07/libunix.a(getpw.o)(.text+0x128): dans la fonction «
> unix_getpwnam »:
> : warning: Using 'getpwnam' in statically linked applications requires
> at runtime the shared libraries from the glibc version used for linking
> ...
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtkplug.o)(.text+0x14c5):
> dans la fonction « xembed_set_info »:
> : undefined reference to `XChangeProperty'
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x623):
> dans la fonction « gtk_socket_realize »:
> : undefined reference to `XGetWindowAttributes'
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x657):
> dans la fonction « gtk_socket_realize »:
> : undefined reference to `XSelectInput'
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x8b9):
> dans la fonction « gtk_socket_size_request »:
> : undefined reference to `XGetWMNormalHints'
> ...
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1db8):
> dans la fonction « pango_x_fontmap_atom_from_name »:
> : undefined reference to `XInternAtom'
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e20):
> dans la fonction « pango_x_fontmap_name_from_atom »:
> : undefined reference to `XGetAtomName'
> /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e35):
> dans la fonction « pango_x_fontmap_name_from_atom »:
> : undefined reference to `XFree'
> collect2: ld a retourné 1 code d'état d'exécution
> Error during linking
> make: *** [svenopt] Erreur 2

I think there are two things here: the first glibc warnings are just
warnings, and I have distributed binaries built with these warnings with
no problem. However you seem to be missing XFree86-static-devel (or
static-libs, I don't really know how it is under debian, for Mandrake
it's libxfree86-static-devel)

Alan Schmitt

-- 
The hacker: someone who figured things out and made something cool happen.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-10-09 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 14:29 Alan Schmitt
2003-08-06 12:02 ` Michal Moskal
2003-10-08 19:25   ` Sven Luther
2003-10-09 12:09     ` Alan Schmitt [this message]
2003-10-09 12:51       ` Sven Luther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031009120918.GX9670@alan-schm1p \
    --to=alan.schmitt@polytechnique.org \
    --cc=caml-list@inria.fr \
    --cc=sven.luther@wanadoo.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).