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 674172 - glib-2.32.1 misdetects GNUstep as Cocoa
glib-2.32.1 misdetects GNUstep as Cocoa
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.32.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-04-16 03:13 UTC by Alexandre Rostovtsev
Modified: 2012-04-20 19:55 UTC
See Also:
GNOME target: ---
GNOME version: 3.3/3.4


Attachments
proposed patch (780 bytes, patch)
2012-04-16 03:16 UTC, Alexandre Rostovtsev
none Details | Review

Description Alexandre Rostovtsev 2012-04-16 03:13:57 UTC
(as reported downstream at https://bugs.gentoo.org/show_bug.cgi?id=411981 and https://bugs.gentoo.org/show_bug.cgi?id=412011)

glib-2.32.1's configure assumes that the presence of the Foundation/Foundation.h header means that the system is OSX with Cocoa, and adds "-framework Foundation" to LDFLAGS. However, gnustep-base also installs the same header, and "-framework Foundation" in LDFLAGS leads to linking failure on Linux.

One simple solution is to check for the presence of GNUstep-specific macros, such as GNUSTEP_BASE_VERSION, that presumably are not defined in Cocoa's Foundation.h.
Comment 1 Alexandre Rostovtsev 2012-04-16 03:16:56 UTC
Created attachment 212114 [details] [review]
proposed patch
Comment 2 fakey 2012-04-16 20:44:05 UTC
I wonder what the consequences are for Macs that also have GNUstep installed.

Maybe we could try a check for Cocoa.h instead of Foundation.h? It would more accurately reflect what we're trying to test for as well... I'll try both tonight.
Comment 3 fakey 2012-04-18 04:10:26 UTC
I changed the header check to Cocoa.h, but still reviewed and applied the patch, because Cocoa.h is also present in GNUstep.
Comment 4 Alexandre Rostovtsev 2012-04-20 06:12:31 UTC
(In reply to comment #3)
> I changed the header check to Cocoa.h, but still reviewed and applied the
> patch, because Cocoa.h is also present in GNUstep.

Thanks, marking bug as fixed then.
Comment 5 Alexandre Rostovtsev 2012-04-20 19:38:31 UTC
Could you please also apply the patch to glib-2-32 branch?
Comment 6 fakey 2012-04-20 19:55:04 UTC
Applied, thanks.