[MacPorts] #47494: root6: Undefined symbol "_environ" on Mac OS X 10.7
MacPorts
noreply at macports.org
Mon Apr 20 03:27:36 PDT 2015
#47494: root6: Undefined symbol "_environ" on Mac OS X 10.7
----------------------+---------------------
Reporter: mojca@… | Owner: mojca@…
Type: defect | Status: closed
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: fixed | Keywords: lion
Port: root6 |
----------------------+---------------------
Comment (by mojca@…):
Jeremy, we now found the source of the problem (old LLVM version) and
worked around the problem for now, with r135179.
Replying to [comment:5 jeremyhu@…]:
> The ` || TARGET_OS_IPHONE` should be removed in general.
Can you please elaborate? Who should remove it and from where? Do you mean
from our local MacPorts patch where I used `#if !defined(__APPLE__) ||
TARGET_OS_IPHONE`?
I can change
{{{
#if !defined(__APPLE__) || defined(TARGET_OS_IPHONE)
}}}
into
{{{
#if !defined(__APPLE__)
}}}
or even into
{{{
#if 0
}}}
given that we don't need to support iOS.
But this code is from LLVM: http://llvm.org/svn/llvm-
project/llvm/trunk/lib/Support/Unix/Program.inc
This is how it has been rewritten upstream (probably not that long ago):
{{{
#if defined(__APPLE__)
#include <TargetConditionals.h>
#endif
#if defined(__APPLE__) && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
#define USE_NSGETENVIRON 1
#else
#define USE_NSGETENVIRON 0
#endif
#if !USE_NSGETENVIRON
extern char **environ;
#else
#include <crt_externs.h> // _NSGetEnviron
#endif
#endif
}}}
Is that what you would expect or are there any problems left with that
approach?
(I hope that ROOT developers will soon sync with the "latest" version of
LLVM, so that the problem will no longer exist and we will no longer need
to patch anything.)
--
Ticket URL: <https://trac.macports.org/ticket/47494#comment:6>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list