After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 723632 - NSGetEnviron() in use by glib's genviron for iOS / arm
NSGetEnviron() in use by glib's genviron for iOS / arm
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: packages
2.x
Other Mac OS
: Normal major
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-02-04 21:07 UTC by Mike McNamara
Modified: 2014-02-04 21:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mike McNamara 2014-02-04 21:07:21 UTC
I've run nm on the GStreamer framework (1.2.x) and it appears to include the use of NSGetEnviron():

GStreamer(libglib-2_0_a_armv7_-libglib_2_0_la-genviron.o) (for
architecture armv7):
U __NSGetEnviron

for the arm architecture in glib's genviron.  This is true of the prebuilt libraries and building via cerbero.  Unfortunately this call will cause a private API use rejection upon submitting an iOS app to Apple.  NSGetEnviron() is an OS X thing that's not supported on iOS to the best of my knowledge (at least officially).

The issue appears to lie in cerbero/sources/ios_universal/armv7/glib-2.38.0/glib/genviron.c:

#ifdef HAVE__NSGETENVIRON
#define environ (*_NSGetEnviron())
#else
/* According to the Single Unix Specification, environ is not
* in any system header, although unistd.h often declares it.
*/
extern char **environ;
#endif

I don't know whether HAVE__NSGETENVIRON should be defined differently somewhere for iOS arm builds or the file should be patched such that it calls a dummy function?
Comment 1 Sebastian Dröge (slomo) 2014-02-04 21:23:56 UTC
This should fix it, it's not 100% clear to me if accessing the environ array is allowed on iOS or not though :/


commit 868421616a9eb79ca1aea29250300ffcbed8ad51
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Feb 4 22:14:24 2014 +0100

    ios: Don't use _NSGetEnviron(), it is private API on iOS
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723632