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 C999E7ED47 for ; Fri, 20 Jul 2012 20:49:58 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of benedikt.meurer@googlemail.com) identity=pra; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="benedikt.meurer@googlemail.com"; x-sender="benedikt.meurer@googlemail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of benedikt.meurer@googlemail.com designates 209.85.214.54 as permitted sender) identity=mailfrom; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="benedikt.meurer@googlemail.com"; x-sender="benedikt.meurer@googlemail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-bk0-f54.google.com) identity=helo; client-ip=209.85.214.54; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="benedikt.meurer@googlemail.com"; x-sender="postmaster@mail-bk0-f54.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8BALunCVDRVdY2kGdsb2JhbABFuUQIIgEBAQEJCQ0HFAQjgiABAQEDARICLAEBNwEECwsLKRI0AQUBHAY1hW+BbAEDBgYEoBoJA4pmhC4BBYUmCkANiUgGi06GAGCVSI4tPoQAgV0 X-IronPort-AV: E=Sophos;i="4.77,625,1336341600"; d="scan'208";a="151293149" Received: from mail-bk0-f54.google.com ([209.85.214.54]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 20 Jul 2012 20:49:58 +0200 Received: by bkcje9 with SMTP id je9so5116912bkc.27 for ; Fri, 20 Jul 2012 11:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; bh=t22sYL1/y27hAXIeDZHAqkBKwOEs0ij/wzNhZpKXfRo=; b=VrX+2VhWacQ/dJhTqUp+/rKV/NPon9D/TMhCHh6OkT3ftkdAmgFueEbmC+pY8axu6D A4JyzrBhgWhuN3aOfRAbNp0HwcdiJJw/2RzfjdFO3p+Gtr4J+R+6a7L4nhQPc5fAV74h 0X7hUySqVVRoY9oLs10xSQdF9JcGkZEye843MFNlyQG9zS3QDxTDSFhEM39xdvNiSjVv OgDTtaZxugtfsC74sOEJyHGblgf/E4UJ0n+XoJ1mL3FBGsHSr9l6/Xpwl0OxL9DJtsew YdueKPNv8jeaFHYlI+bx7MD0AT97cFbH2N+4wRzB8muaVOJVIWL1eemzV0WAO/8EJXz1 ojtw== Received: by 10.205.33.136 with SMTP id so8mr3583572bkb.1.1342810197704; Fri, 20 Jul 2012 11:49:57 -0700 (PDT) Received: from tatooine.in.benediktmeurer.de (sign-4db6a474.pool.mediaWays.net. [77.182.164.116]) by mx.google.com with ESMTPS id n5sm3252360bkv.14.2012.07.20.11.49.56 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Jul 2012 11:49:57 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: Benedikt Meurer In-Reply-To: <2F636BDB-7F60-44C4-A9E4-B0D7E2A6BE45@pulsschlag.net> Date: Fri, 20 Jul 2012 20:49:54 +0200 Cc: Xavier Leroy , caml-list@inria.fr Content-Transfer-Encoding: quoted-printable Message-Id: References: <811EC13F-3683-4DDC-A780-00630A109559@pulsschlag.net> <5009880D.8000005@inria.fr> <2F636BDB-7F60-44C4-A9E4-B0D7E2A6BE45@pulsschlag.net> To: Keyan X-Mailer: Apple Mail (2.1278) Subject: Re: [Caml-list] Bug in libunix.a + Patch On Jul 20, 2012, at 19:13 , Keyan wrote: > Hi, >=20 > I will post it on the bug tracker too. My setting is: >=20 > Mac OS X 10.7.4 > gcc version: i686-apple-darwin11-llvm-gcc-4.2 > ocaml 3.12.1 > Xcode 4.3.3 (4E3002) >=20 > I don't develop in Xcode, but use makefiles instead. Homebrew was used to= install ocaml. >=20 > The error only occurs when linking to a dynamic lib, not when I link agai= nst an executable (main loop in c). Of course... as stated in environ(7): "Shared libraries and bundles don't have direct access to environ, which is only available to the loader ld(1) when a complete program is being linked. The environment routines can still be used, but if direct access to environ is needed, the _NSGetEnviron() routine, defined in , can be used to retrieve the address of environ at run- time." It has always been this way on OS X, so Keyan's patch is correct. > Best, > Keyan Benedikt=