From: Keyan <ml@pulsschlag.net>
To: caml-list@inria.fr
Subject: [Caml-list] Bug in libunix.a + Patch
Date: Fri, 20 Jul 2012 16:45:53 +0200 [thread overview]
Message-ID: <811EC13F-3683-4DDC-A780-00630A109559@pulsschlag.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 688 bytes --]
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__
#include <crt_externs.h>
#define environ (*_NSGetEnviron())
#else
extern char **environ;
#endif
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-packages-base-include-HsBase.h.diff?rev=81676
patches are attached to this email.
best,
Keyan
[-- Attachment #2: envir-patch.txt --]
[-- Type: text/plain, Size: 153 bytes --]
22a23,31
>
> #ifdef __APPLE__
> #include <crt_externs.h>
> #define environ (*_NSGetEnviron())
> #else
> extern char **environ;
> #endif
>
>
[-- Attachment #3: execvp-patch.txt --]
[-- Type: text/plain, Size: 156 bytes --]
24a25,34
>
> #ifdef __APPLE__
> #include <crt_externs.h>
> #define environ (*_NSGetEnviron())
> #else
> extern char **environ;
> #endif
>
>
>
next reply other threads:[~2012-07-20 14:46 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 14:45 Keyan [this message]
2012-07-20 16:32 ` Xavier Leroy
2012-07-20 17:13 ` Keyan
2012-07-20 18:49 ` Benedikt Meurer
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=811EC13F-3683-4DDC-A780-00630A109559@pulsschlag.net \
--to=ml@pulsschlag.net \
--cc=caml-list@inria.fr \
/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