From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA27453; Thu, 9 Oct 2003 14:51:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA29608 for ; Thu, 9 Oct 2003 14:51:03 +0200 (MET DST) Received: from mwinf0302.wanadoo.fr (smtp3.wanadoo.fr [193.252.22.28]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h99Cp3107113 for ; Thu, 9 Oct 2003 14:51:03 +0200 (MET DST) Received: from iliana (AStrasbourg-206-1-31-44.w81-51.abo.wanadoo.fr [81.51.206.44]) by mwinf0302.wanadoo.fr (SMTP Server) with ESMTP id A29EAC000FF3; Thu, 9 Oct 2003 14:51:02 +0200 (CEST) Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 1A7aG0-0006JT-00; Thu, 09 Oct 2003 14:51:04 +0200 Date: Thu, 9 Oct 2003 14:51:03 +0200 To: Sven Luther , caml-list@inria.fr Subject: Re: [Caml-list] static linking and ocaml 3.07 beta 1 Message-ID: <20031009125102.GA21677@iliana> References: <20030804142916.GV3049@alan-schm1p> <20030806120247.GB2333@roke.freak> <20031008192529.GA10828@iliana> <20031009120918.GX9670@alan-schm1p> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20031009120918.GX9670@alan-schm1p> User-Agent: Mutt/1.5.4i From: Sven Luther X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 3.07:01 sven:01 luther:01 sven:01 luther:01 0400,:01 michal:01 moskal:01 0400,:01 ocamlopt:01 -static:01 sysconf:01 cmx:01 abort:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, Oct 09, 2003 at 08:09:18AM -0400, Alan Schmitt wrote: > * 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) 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