caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Benedikt Meurer <benedikt.meurer@googlemail.com>
To: Keyan <ml@pulsschlag.net>
Cc: Xavier Leroy <Xavier.Leroy@inria.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] Bug in libunix.a + Patch
Date: Fri, 20 Jul 2012 20:49:54 +0200	[thread overview]
Message-ID: <DCCE22EC-757B-4AB4-8872-0556235AE4B2@gmail.com> (raw)
In-Reply-To: <2F636BDB-7F60-44C4-A9E4-B0D7E2A6BE45@pulsschlag.net>


On Jul 20, 2012, at 19:13 , Keyan wrote:

> Hi,
> 
> I will post it on the bug tracker too. My setting is:
> 
> Mac OS X 10.7.4
> gcc version: i686-apple-darwin11-llvm-gcc-4.2
> ocaml 3.12.1
> Xcode 4.3.3 (4E3002)
> 
> I don't develop in Xcode, but use makefiles instead. Homebrew was used to install ocaml.
> 
> The error only occurs when linking to a dynamic lib, not when I link against 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
 <crt_externs.h>, 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

      reply	other threads:[~2012-07-20 18:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 14:45 Keyan
2012-07-20 16:32 ` Xavier Leroy
2012-07-20 17:13   ` Keyan
2012-07-20 18:49     ` Benedikt Meurer [this message]

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=DCCE22EC-757B-4AB4-8872-0556235AE4B2@gmail.com \
    --to=benedikt.meurer@googlemail.com \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=ml@pulsschlag.net \
    /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).