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 742097 - iOS: AT_FDCWD not available before XCode 6.1
iOS: AT_FDCWD not available before XCode 6.1
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
1.4.4
Other Mac OS
: Normal normal
: 1.4.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-12-29 20:43 UTC by Antonis
Modified: 2015-01-09 09:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
XCode project that manifests those issues (214.20 KB, application/zip)
2014-12-29 20:43 UTC, Antonis
Details

Description Antonis 2014-12-29 20:43:40 UTC
Created attachment 293454 [details]
XCode project that manifests those issues

Creating a bug report after discussing it with Sebastian Dröge

Hello,

I installed the binaries found at:

http://gstreamer.freedesktop.org/data/pkg/ios/1.4.4/

Then I used the GStreamer Template 'GStreamer Single View Application' and tried to build in XCode without success. The problem is undefined symbols for fstatat, openat and fdopendir as can be seen in XCode's output below:

-------------------
Undefined symbols for architecture armv7s:
  "_fstatat", referenced from:      _g_local_file_measure_size_of_file in GStreamer(libgio-2_0_a_armv7s_-libgio_2_0_la-glocalfile.o)
  "_openat", referenced from:      _g_local_file_measure_size_of_file in GStreamer(libgio-2_0_a_armv7s_-libgio_2_0_la-glocalfile.o)
  "_fdopendir", referenced from:      _g_local_file_measure_size_of_file in GStreamer(libgio-2_0_a_armv7s_-libgio_2_0_la-glocalfile.o)
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
-------------------

Please note that I get the same issues both for device (iOS 7.1) and simulator (i386 and x86_64 architectures). Tried to spot which dynamic libs from the relevant SDK contain those functions/symbols in order to add them but I wasn't able to find any, so I tried to add glibc.dylib in XCode and various others but to no avail.

Any ideas what might be wrong?

Thanks a lot,
Antonis

P.S. After Sebastian's request I also tried example project @ http://cgit.freedesktop.org/~slomo/gst-sdk-tutorials/tree/gst-sdk/tutorials/xcode%20iOS but I got he same problem.
P.S.2 I also switched to my GNU/Linux box to see where those 3 undefined symbols reside (using nm) and most of them are defined in glibc.so, so I wonder why in iOS glibc.dylib doesn't have define/export those symbols...
Comment 1 Sebastian Dröge (slomo) 2014-12-30 09:06:44 UTC
There's a newer version available here btw: http://gstreamer.freedesktop.org/data/pkg/ios/1.4.5/

Which XCode version are you using?
Comment 2 Antonis 2014-12-30 09:09:46 UTC
(In reply to comment #1)
> There's a newer version available here btw:
> http://gstreamer.freedesktop.org/data/pkg/ios/1.4.5/
> 
> Which XCode version are you using?

I believe its XCode 5.1

Thanks
Comment 3 Sebastian Dröge (slomo) 2015-01-09 09:17:53 UTC
As discussed on the mailing list, the problem is that XCode 6.1 at least has these symbols so we use them. Older versions don't. But we need newer versions for the build because of features of newer iOS versions (which are only used conditionally).

One solution could be to explicitly disable usage of all the symbols in questions in all the software we include. Are the 3 symbols listed above the only ones?
Comment 4 Sebastian Dröge (slomo) 2015-01-09 09:20:09 UTC
Just making sure that AT_FDCWD is not #defined during the GLib build would be enough for those 3 at least... which would need a small patch to glib/gio/glocalfile.c.
Comment 5 Sebastian Dröge (slomo) 2015-01-09 09:40:56 UTC
commit 94e0e3c5fd8a0566d25003fb07b5ba12284cd496
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Jan 9 10:37:43 2015 +0100

    glib: Don't use AT_FDCWD on iOS for now
    
    AT_FDCWD is available since XCode 6.1 and cause linking failures
    when linking an application later with older XCode versions
    
    https://bugzilla.gnome.org/show_bug.cgi?id=742097