<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/3792447d06a23adc7c7923b6498b30c2"
  from="Sven Luther &lt;sven.luther@w...&gt;"
  author="Sven Luther"
  date="2003-10-09T12:51:04"
  subject="Re: [Caml-list] static linking and ocaml 3.07 beta 1"
  prev="2003/10/7e91616dcacffc47b139c28c440aa9e3"
  next="2003/10/555f4c173d76cc18967dc03bf58df9b0"
  prev-in-thread="2003/10/8bba2718358038c87fed56bf09c9c7aa"
  prev-thread="2003/08/2a423691c7c963a4df46036c465e5ab8"
  next-thread="2003/08/65c768bf448ad998a566fc191a3a8bca"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] static linking and ocaml 3.07 beta 1">
<msg 
  url="2003/08/69845269df373ef1ad4c229cfcc8f49a"
  from="Alan Schmitt &lt;alan.schmitt@p...&gt;"
  author="Alan Schmitt"
  date="2003-08-04T14:31:13"
  subject="[Caml-list] static linking and ocaml 3.07 beta 1">
<msg 
  url="2003/08/130908035cbc01e1f80c834d696ccba3"
  from="Michal Moskal &lt;malekith@p...&gt;"
  author="Michal Moskal"
  date="2003-08-06T12:03:14"
  subject="Re: [Caml-list] static linking and ocaml 3.07 beta 1">
<msg 
  url="2003/10/e0230805f657be23a6ddcabf6e9064b3"
  from="Sven Luther &lt;sven.luther@w...&gt;"
  author="Sven Luther"
  date="2003-10-08T19:25:32"
  subject="Re: [Caml-list] static linking and ocaml 3.07 beta 1">
<msg 
  url="2003/10/8bba2718358038c87fed56bf09c9c7aa"
  from="Alan Schmitt &lt;alan.schmitt@p...&gt;"
  author="Alan Schmitt"
  date="2003-10-09T12:11:25"
  subject="Re: [Caml-list] static linking and ocaml 3.07 beta 1">
<msg 
  url="2003/10/3792447d06a23adc7c7923b6498b30c2"
  from="Sven Luther &lt;sven.luther@w...&gt;"
  author="Sven Luther"
  date="2003-10-09T12:51:04"
  subject="Re: [Caml-list] static linking and ocaml 3.07 beta 1">
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
On Thu, Oct 09, 2003 at 08:09:18AM -0400, Alan Schmitt wrote:
&gt; * Sven Luther (sven.luther@wanadoo.fr) wrote:
&gt; &gt; On Wed, Aug 06, 2003 at 02:02:47PM +0200, Michal Moskal wrote:
&gt; &gt; &gt; On Mon, Aug 04, 2003 at 10:29:16AM -0400, Alan Schmitt wrote:
&gt; &gt; &gt; &gt; I have had the following strange message when doing a static link:
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; 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 
&gt; &gt; &gt; &gt; /usr/local/lib/ocaml/libunix.a(getgr.o)(.text+0x10c): In function `unix_getgrgid':
&gt; &gt; &gt; &gt; : Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
&gt; &gt; &gt; 
&gt; &gt; &gt; You might be better off linking statically everything *except* glibc.
&gt; &gt; &gt; Executables linked dynamically against given version of glibc will
&gt; &gt; &gt; mostly run with later versions (but not the other way around).
&gt; &gt; &gt; 
&gt; &gt; 
&gt; &gt; Mmm, how did you solve this one ? I also get this :
&gt; &gt; 
&gt; &gt; ocamlopt -I Objets  -w p -I +lablgtk2  -ccopt -static -o svenopt
&gt; &gt; lablgtk.cmxa gtkInit.cmx unix.cmxa date.cmx ... interface.cmx main.cmx
&gt; &gt; /usr/lib/ocaml/3.07/libunix.a(getgr.o)(.text+0x115): dans la fonction «
&gt; &gt; unix_getgrgid »:
&gt; &gt; : warning: Using 'getgrgid' in statically linked applications requires
&gt; &gt; at runtime the shared libraries from the glibc version used for linking
&gt; &gt; /usr/lib/ocaml/3.07/libunix.a(getgr.o)(.text+0xdc): dans la fonction «
&gt; &gt; unix_getgrnam »:
&gt; &gt; : warning: Using 'getgrnam' in statically linked applications requires
&gt; &gt; at runtime the shared libraries from the glibc version used for linking
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtkfilesel.o)(.text+0x6d81):
&gt; &gt; dans la fonction « get_pwdb »:
&gt; &gt; : warning: Using 'getpwent' in statically linked applications requires
&gt; &gt; at runtime the shared libraries from the glibc version used for linking
&gt; &gt; /usr/lib/ocaml/3.07/libunix.a(getpw.o)(.text+0x128): dans la fonction «
&gt; &gt; unix_getpwnam »:
&gt; &gt; : warning: Using 'getpwnam' in statically linked applications requires
&gt; &gt; at runtime the shared libraries from the glibc version used for linking
&gt; &gt; ...
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtkplug.o)(.text+0x14c5):
&gt; &gt; dans la fonction « xembed_set_info »:
&gt; &gt; : undefined reference to `XChangeProperty'
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x623):
&gt; &gt; dans la fonction « gtk_socket_realize »:
&gt; &gt; : undefined reference to `XGetWindowAttributes'
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x657):
&gt; &gt; dans la fonction « gtk_socket_realize »:
&gt; &gt; : undefined reference to `XSelectInput'
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libgtk-x11-2.0.a(gtksocket.o)(.text+0x8b9):
&gt; &gt; dans la fonction « gtk_socket_size_request »:
&gt; &gt; : undefined reference to `XGetWMNormalHints'
&gt; &gt; ...
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1db8):
&gt; &gt; dans la fonction « pango_x_fontmap_atom_from_name »:
&gt; &gt; : undefined reference to `XInternAtom'
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e20):
&gt; &gt; dans la fonction « pango_x_fontmap_name_from_atom »:
&gt; &gt; : undefined reference to `XGetAtomName'
&gt; &gt; /usr/lib/gcc-lib/i486-linux/3.3.2/../../../libpangox-1.0.a(pangox-fontmap.o)(.text+0x1e35):
&gt; &gt; dans la fonction « pango_x_fontmap_name_from_atom »:
&gt; &gt; : undefined reference to `XFree'
&gt; &gt; collect2: ld a retourné 1 code d'état d'exécution
&gt; &gt; Error during linking
&gt; &gt; make: *** [svenopt] Erreur 2
&gt; 
&gt; I think there are two things here: the first glibc warnings are just
&gt; warnings, and I have distributed binaries built with these warnings with
&gt; no problem. However you seem to be missing XFree86-static-devel (or
&gt; static-libs, I don't really know how it is under debian, for Mandrake
&gt; it's libxfree86-static-devel)

Mmm, i have : 

  xlibs-static-pic_4.3.0-0pre1v3_i386.deb

Maybe this will do it, i will try.

Friendly,

Sven Luther

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

