Bug 22616

Summary: libAppleWM (MAC OS only) attempts to build on all platforms
Product: xorg Reporter: Gaetan Nadon <memsize>
Component: Build/ModularAssignee: Gaetan Nadon <memsize>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: trivial    
Priority: low CC: jeremyhu
Version: gitKeywords: janitor
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
[PATCH] Attemps to build some librairies on the wrong o/s #22616 none

Description Gaetan Nadon 2009-07-04 07:40:37 UTC
While doing a full build (Linux) on xorg product using build.sh, the build failed due to missing include files in libAppleWM. This component states in the man page that it is for MAC OS only.

I intend to fix this problem by adding a condition in build.sh such that it only builds this lib when the target OS is "Darwin". A design is already in place for such purpose in build.sh.

I found a case statement in build.sh where "Darwin*" is used rather than Darwin. I have found several instances on the net where "Darwin" was used as the OS name, so I have chosen to use that.

diff --git a/build.sh b/build.sh
index b548187..6e7979e 100755
--- a/build.sh
+++ b/build.sh
@@ -249,7 +249,9 @@ build_lib() {
     fi
     build lib libX11
     build lib libXext
-    build lib libAppleWM
+    if [ "$HOST_OS" = "Darwin" ] ; then
+        build lib libAppleWM
+    fi
     build lib libWindowsWM
     build lib libdmx
     build lib libfontenc

There might be a better solution through software standards or at the architecture level, but my short goal is to fix build breakage.
Comment 1 Alan Coopersmith 2009-07-06 08:53:52 UTC
As long as you're in there, the WindowsWM on the next line is the equivalent
for CygWin, and doesn't need to be built on non-Windows platforms.
Comment 2 Gaetan Nadon 2009-07-15 17:46:32 UTC
Created attachment 27744 [details] [review]
[PATCH] Attemps to build some librairies on the wrong o/s #22616

This patch fixes both libraries. Any system name other than CYGWIN* applies?
Comment 3 Gaetan Nadon 2009-07-23 18:34:53 UTC
Fixed by Peter Hutterer: http://cgit.freedesktop.org/xorg/util/modular/commit/?id=2af0ac03f1d8af4a9e45192576567dda0ed73788
Tested on Linux on a newly built tree. No build break, no unwanted components.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.