liuis / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch for /Makefile failing PLATFORM=IOS with XCode 4.6 #177

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Fix failure to make for iOS due to the compilers not being in the directory 
under the iOS platforms for XCode 4.6
"
make: 
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
/usr/bin/c++: No such file or directory
make: *** [db/builder.o] Error 1
"

Original issue reported on code.google.com by dentaroo@gmail.com on 11 Jun 2013 at 6:08

Attachments:

GoogleCodeExporter commented 9 years ago
Can someone who also develops for iOS test this patch to ensure it works on 
their system? Bonus points if you're using a different version of xcode.

Original comment by dgrogan@chromium.org on 13 Jun 2013 at 4:45

GoogleCodeExporter commented 9 years ago
Verified that the patch fixes the build on Xcode 4.6.2 when running "make 
PLATFORM=IOS". Thanks!

Original comment by ashoema...@gmail.com on 13 Jun 2013 at 6:47

GoogleCodeExporter commented 9 years ago
Works for me, please get this merged. I would also propose to replace the 
hardcoded Xcode path by a call to `xcode-select --print-path`. See the attached 
pathfile. This fixes issues when you're using multiple versions of Xcode (e.g. 
with developer previews).

Original comment by luke.cle...@gmail.com on 24 Jun 2013 at 12:53

Attachments:

GoogleCodeExporter commented 9 years ago
Verified works with xcode 4.6.3

Original comment by aatk...@litl.com on 1 Jul 2013 at 6:59

GoogleCodeExporter commented 9 years ago
This patch just happens to work for you because your CXX points to the same 
compiler that lives in the default xctoolchain. If you install a different 
compiler in your PATH, this patch will stop working.

Attached is a proper patch uses the tools in the default xctoolchain and—as 
suggested by luke—reads the xcode root path from xcode-select.

$ make PLATFORM=IOS && lipo -info libleveldb.a
...
Architectures in the fat file: libleveldb.a are: armv6 armv7 i386

Original comment by ras...@notion.se on 27 Jul 2013 at 10:35

Attachments:

GoogleCodeExporter commented 9 years ago
I don't see how that is any better as it apparently still has assumptions about 
your XCode being in /Applications/Xcode.app?

I think a separate bug needs logging about fixing builds for both OS/X and iOS 
to work if you have an XCode 5 developer preview installed alongside, and are 
using Xcode-select

Original comment by dentaroo@gmail.com on 28 Jul 2013 at 5:30