From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id CAFEE7ED47 for ; Fri, 20 Jul 2012 16:46:01 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ml@pulsschlag.net) identity=pra; client-ip=194.95.184.44; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="ml@pulsschlag.net"; x-sender="ml@pulsschlag.net"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of ml@pulsschlag.net) identity=mailfrom; client-ip=194.95.184.44; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="ml@pulsschlag.net"; x-sender="ml@pulsschlag.net"; x-conformance=sidf_compatible Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.mis.mpg.de) identity=helo; client-ip=194.95.184.44; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="ml@pulsschlag.net"; x-sender="postmaster@mailhost.mis.mpg.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvwEAE9uCVDCX7gs/2dsb2JhbABFuUCBB4NNIluIOAedMKFZjxKCPGADjXBmiAKOd4JhgV0 X-IronPort-AV: E=Sophos;i="4.77,623,1336341600"; d="txt'?scan'208";a="151274563" Received: from mailhost.mis.mpg.de ([194.95.184.44]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 20 Jul 2012 16:46:01 +0200 Received: from twww.mis.mpg.de (twww.mis.mpg.de [194.95.185.34]) by mailhost.mis.mpg.de (8.13.8/8.13.8) with ESMTP id q6KEjwIP028004; Fri, 20 Jul 2012 16:45:58 +0200 (MEST) Received: from phoenix.fritz.box (brln-4dbc2c3a.pool.mediaWays.net [77.188.44.58]) (authenticated bits=0) by twww.mis.mpg.de (8.14.4/8.14.4) with ESMTP id q6KEjxRL018126 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Fri, 20 Jul 2012 16:46:00 +0200 (MEST) From: Keyan Content-Type: multipart/mixed; boundary="Apple-Mail=_FF7D7904-0B28-425C-91C5-71696F5F4264" Date: Fri, 20 Jul 2012 16:45:53 +0200 To: caml-list@inria.fr Message-Id: <811EC13F-3683-4DDC-A780-00630A109559@pulsschlag.net> Mime-Version: 1.0 (Apple Message framework v1278) X-Mailer: Apple Mail (2.1278) X-MIS-Check-Sender: OK, user zahedi() has authenticated himself with PLAIN. Subject: [Caml-list] Bug in libunix.a + Patch --Apple-Mail=_FF7D7904-0B28-425C-91C5-71696F5F4264 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi, _envrion was not found, when linking libunix.a to a library on Mac OS X: Undefined symbols for architecture x86_64: "_environ", referenced from: _unix_execvpe in libunix.a(execvp.o) _unix_environment in libunix.a(envir.o) I added the following lines: #ifdef __APPLE__=20 #include =20 #define environ (*_NSGetEnviron())=20 #else=20 extern char **environ;=20 #endif=20 to the flies: otherlibs/unix/envir.c otherlibs/unix/execvp.c as they it was suggested here: http://trac.macports.org/browser/trunk/dports/lang/hugs98/files/patch-packa= ges-base-include-HsBase.h.diff?rev=3D81676 patches are attached to this email. best, Keyan --Apple-Mail=_FF7D7904-0B28-425C-91C5-71696F5F4264 Content-Disposition: attachment; filename=envir-patch.txt Content-Type: text/plain; name="envir-patch.txt" Content-Transfer-Encoding: 7bit 22a23,31 > > #ifdef __APPLE__ > #include > #define environ (*_NSGetEnviron()) > #else > extern char **environ; > #endif > > --Apple-Mail=_FF7D7904-0B28-425C-91C5-71696F5F4264 Content-Disposition: attachment; filename=execvp-patch.txt Content-Type: text/plain; name="execvp-patch.txt" Content-Transfer-Encoding: 7bit 24a25,34 > > #ifdef __APPLE__ > #include > #define environ (*_NSGetEnviron()) > #else > extern char **environ; > #endif > > > --Apple-Mail=_FF7D7904-0B28-425C-91C5-71696F5F4264--