Issue 124422

Summary: Build no more possible with Xcode 5.1
Product: Build Tools Reporter: Thorsten Wagner <thorsten.wagner.4>
Component: dmakeAssignee: hdu <hdu>
Status: CLOSED FIXED QA Contact:
Severity: Major    
Priority: P2 CC: hdu, issues, jsc, rainerbielefeld_ooo_qa, thorsten.wagner.4
Version: 4.1.0-devFlags: jsc: 4.1.1_release_blocker+
Target Milestone: 4.1.1   
Hardware: Mac   
OS: Mac OS X, all   
Issue Type: DEFECT Latest Confirmation in: 4.1.0-beta
Developer Difficulty: ---
Issue Depends on: 124908    
Issue Blocks:    
Attachments:
Description Flags
Error Log
none
Patch
none
Thorsten's patch modified to also work with XCode4 hdu: review? (thorsten.wagner.4)

Description Thorsten Wagner 2014-03-13 22:30:34 UTC
Created attachment 82857 [details]
Error Log

Building OpenOffice from trunk on Mac OS X works without problems using Xcode 5.0.2 on OS X 10.9.2.

Apple has released Xcode 5.1 now. The build breaks with several compiler errors attached to this bug report. The first one is

"In file included from /Users/twagner/Development/OpenOffice/trunk/main/solver/410/unxmaccx.pro/inc/stl/hash_map:27:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/unordered_map:724:5: error: static_assert failed "Invalid allocator::value_type"

The problem disappears after restoring Xcode 5.0.2.

This behaviour has been produced with the current revison 1576748 from trunk.
Comment 1 Oliver-Rainer Wittmann 2014-03-14 10:06:13 UTC
This might be interesting for Herbert and Juergen
Comment 2 jsc 2014-03-14 10:53:53 UTC
we currently depend on an older baseline but we are are planning to shift to a newer env and newer version of XCode asap. My first tests building on 10.9.2 works on 10.9.x only but not older systems like 10.7.x or 10.8.x.

We will take care of this asap but probably after 4.1 is released. I have not yet upgraded to 5.1.
Comment 3 Rainer Bielefeld 2014-03-25 05:35:39 UTC
This one does not look like a regression?
Comment 4 hdu@apache.org 2014-03-25 08:23:47 UTC
No, it is not a regression: Xcode 5.1 came out just two weeks ago. We'll support it for the next release but for now we don't want to take any risk in the current release phase that could be introduced by switching to an all new compiler,
Comment 5 Thorsten Wagner 2014-05-04 15:00:24 UTC
As a workaround it should be possible to use two different releases of Xcode, Xcode 5.0.2 and the current Xcode release.

I found a dependency within "set_soenv.in" which prevents using two different releases of Xcode side by side. It is a hard coded implementation of directory "/Applications" for the include path. This causes a break of the build although the command line tools of Xcode 5.0.2 are selected. The current Xcode release should be in directory "/Applications", a second Xcode release, e.g. Xcode 5.0.2, should be located elsewhere.

I supplied a small patch as attachment to this ticket. The patch replaces the hardcoded reference to "/Applications/Xcode.app" by the result "xcode-select -p". Building works fine now.

@ Herbert: I would be grateful for doublechecking the patch and for including it into trunk if it works as expected.
Comment 6 Thorsten Wagner 2014-05-04 15:00:59 UTC
Created attachment 83326 [details]
Patch
Comment 7 hdu@apache.org 2014-05-06 11:36:32 UTC
Thanks for the patch, Thorsten!
XCode4 doesn't support the -p option though, but the -print-path option probably works. I wasn't able to update the systems available to me yet so I can't check whether simply changing it thus is OK for XCode5.x. Can you check if they work with the -print-path option too?
Comment 8 Thorsten Wagner 2014-05-06 19:02:53 UTC
Xcode 5 has the following options:

Options:
  -h, --help                  print this help message and exit
  -p, --print-path            print the path of the active developer directory
  -s <path>, --switch <path>  set the path for the active developer directory
  -v, --version               print the xcode-select version
  -r, --reset                 reset to the default command line tools path

The print path option has two minus signs "--print-path". Does this works for Xcode 4 too?
Comment 9 hdu@apache.org 2014-05-07 07:42:53 UTC
Created attachment 83349 [details]
Thorsten's patch modified to also work with XCode4

Even though XCode4's xcode-select says:

Usage: xcode-select -print-path
   or: xcode-select -switch <xcode_folder_path>
   or: xcode-select -version
Arguments:
   -print-path                     Prints the path of the current Xcode folder
   -switch <xcode_folder_path>     Sets the path for the current Xcode folder
   -version                        Prints xcode-select version information

at least XCode4.6 also understands the --print-path option. I adapted the original patch accordingly. Thorsten, can you confirm that it still works with XCode5.x?
Comment 10 Thorsten Wagner 2014-05-07 20:09:47 UTC
Herbert, confirming for Xcode 5.
Comment 11 SVN Robot 2014-05-08 08:45:06 UTC
"hdu" committed SVN revision 1593205 into trunk:
#i124422# adjust include path for libc++ headers to the selected XCode folder
Comment 12 hdu@apache.org 2014-05-08 08:48:12 UTC
Fixed with the commit above. Thanks for the patch and for checking the change.
Comment 13 Thorsten Wagner 2014-05-14 21:12:02 UTC
Herbert, thank you for including the patch into trunk. Compling works fine with Xcode 5.0.2 installed side by side with Xcode 5.1 now.

Using Xcode 5.0.2 is only a workaround, because the compartibility problems with Xcode 5.1 still exist within the code and have to be fixed. I reopend the ticket to keep this in mind.
Comment 14 SVN Robot 2014-05-15 11:14:26 UTC
"hdu" committed SVN revision 1594862 into trunk:
#i124422# fix comparisons between pointers and bools or integers
Comment 15 SVN Robot 2014-05-15 11:14:26 UTC
"hdu" committed SVN revision 1594864 into trunk:
#i124422# fix implicit conversions to pointer from bool/int32
Comment 16 SVN Robot 2014-05-15 11:35:45 UTC
"hdu" committed SVN revision 1594871 into trunk:
#i124422# fix default arguments in friend declarations
Comment 17 Thorsten Wagner 2014-05-15 22:35:54 UTC
Build works without errors using Xcode 5.1 now.
Comment 18 Thorsten Wagner 2014-05-15 22:37:46 UTC
All compilation errors have been fixed.
Comment 19 jsc 2014-06-12 14:49:35 UTC
grant showstopper flag for AOO 4.1.1

changes are necessary to build the branch on 10.9.x and Xcode 5.1
Comment 20 SVN Robot 2014-06-12 14:56:19 UTC
"jsc" committed SVN revision 1602192 into branches/AOO410:
#124422# merge changes from trunk to be able to build on macos 10.9.3 and Xco...