Comments (8)
/Developer/SDKs should be a symlink to the place where Xcode finds the SDKs, and where XcodeLegacy installs these. Was there no /Developer/SDKs symlink on your system? I don't know if mine was created by Xcode or if I did it my self (5 years ago):
$ ls -l /Developer/SDKs
lrwxr-xr-x 1 root wheel 83 4 avr 2012 /Developer/SDKs -> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Can you please give me the output of the above command on your system?
If that link doesn't exist on your system, create it with
sudo mkdir /Developer
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs /Developer/SDKs
cc
is the system's compiler, and should remain linked to clang, the default compiler for your system.
It is not advisable to use cc or clang to compile for 10.4. You should explicitly modify the compiler name in your build system and use either gcc-4.0 or gcc-4.2, because there maybe problems with more recent versions of gcc in the SDK.
from xcodelegacy.
Here's the info you requested - sorry for the length.
I want to start with this item:
It is not advisable to use cc or clang to compile for 10.4. You should explicitly modify the compiler name in your build system and use either gcc-4.0 or gcc-4.2, because there maybe problems with more recent versions of gcc in the SDK.
I'm building a submodule to my project for backwards compatibility. Ldglite. 135a318 is the specific commit around this issue.
cc
(clang) was used to compile the original makefiles (see makefile.macx) and, if I recall I had a link issue using gcc-4.0
and gcc-4.2
with 10.4 (or SDK 10.7 and 10.9 for that matter), I can't remember but I'll try again later to validate. Perhaps the link issue was because the code uses Carbon?
Anyway, you're quite right about issues with cc and 10.4u (see error output at the bottom). I was successful to compile using cc on 10.7 and later however but I still can't get the -arch ppc target to work at that SDK.
==========
/Developer/SDKs should be a symlink to the place where Xcode finds the SDKs, and where XcodeLegacy installs these. Was there no /Developer/SDKs symlink on your system? I don't know if mine was created by Xcode or if I did it my self (5 years ago):
I'm using a virgin Sierra build (10.12) on VMWare. There was no symlink or SDKs
directory in /Developer
Can you please give me the output of the above command on your system?
Trevors-Mac:xcodelegacy-master trevorsandy$ ./XcodeLegacy.sh -osx104 buildpackages
*** Info: found Xcode >= 4.3
Checksumming Driver Descriptor Map (DDM : 0)…
Driver Descriptor Map (DDM : 0): verified CRC32 $39967158
Checksumming (Apple_Free : 1)…
(Apple_Free : 1): verified CRC32 $00000000
Checksumming Apple (Apple_partition_map : 2)…
Apple (Apple_partition_map : 2): verified CRC32 $343E1E47
Checksumming Macintosh (Apple_Driver_ATAPI : 3)…
Macintosh (Apple_Driver_ATAPI : 3): verified CRC32 $F1E8BA9E
Checksumming (Apple_Free : 4)…
(Apple_Free : 4): verified CRC32 $00000000
Checksumming disk image (Apple_HFS : 5)…
.................................................................................................................................................................................................
disk image (Apple_HFS : 5): verified CRC32 $7713A7E9
Checksumming (Apple_Free : 6)…
(Apple_Free : 6): verified CRC32 $00000000
verified CRC32 $60727D28
/dev/disk1 Apple_partition_scheme
/dev/disk1s1 Apple_partition_map
/dev/disk1s2 Apple_Driver_ATAPI
/dev/disk1s3 Apple_HFS /Users/trevorsandy/Downloads/xcodelegacy-master/mount.3cS/Xcode and iOS SDK
patching file hashtable
*** Created Xcode104SDK.tar.gz in directory /Users/trevorsandy/Downloads/xcodelegacy-master
"disk1" unmounted.
"disk1" ejected.
Trevors-Mac:xcodelegacy-master trevorsandy$ sudo ./XcodeLegacy.sh -osx104 install
Password:
*** Info: found Xcode >= 4.3
*** installed Xcode104SDK.tar.gz
*** modified MacOSX Info.plist
Trevors-Mac:xcodelegacy-master trevorsandy$
===========
The SDK was installed ok:
MacOSX10.4u.sdk - Mac OS X 10.4 (macosx10.4)
SDKVersion: 10.4
Path: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.4u.sdk
PlatformVersion: 1.1
PlatformPath: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform
ProductBuildVersion: 8S2167
ProductCopyright: 1983-2007 Apple Inc.
ProductName: Mac OS X
ProductUserVisibleVersion: 10.4.11
ProductVersion: 10.4.11
===========
Error Generated:
Trevors-Mac:ldglite trevorsandy$ make -f makefile.macx
cc -g -I./osx -DUNIX -DMACOS_X -DUSING_CARBON -DUSE_OPENGL -DUSE_L3_PARSER -DUSE_BMP8 -DNEED_MIN_MAX -I./macx/include -DUSE_PNG -I./macx/png/include -DTILE_RENDER_OPTION -DCGL_OFFSCREEN_OPTION -DTEST_MUI_GUI -I./mui/src -DUSE_GLUT_MENUS -I./macx/glut/include -Ildrawini -DNOT_WARPING -DVISIBLE_SPIN_CURSOR -DSAVE_DEPTH_ALL -DSAVE_COLOR_ALL -DMACOS_X_TEST2 -DHAVE_STRDUP -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -c -o ldliteVR_main.o ldliteVR_main.c
clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.4u.sdk'
ldliteVR_main.c:19:10: fatal error: 'stdio.h' file not found
#include "stdio.h"
^
1 error generated.
make: *** [ldliteVR_main.o] Error
===========
When using 10.4u, I got the error below which I understand is due to additional mach checks started in 10.11. This is using an extracted instance of the 10.4 build by XcodeLegacy.
SDK10.4u error:
if [ -d mui/src/mui ] ; then cd mui/src/mui ; /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile.macx libmui.a ; fi
cc -I../../src -I../../../macx/glut/include -arch i386 -mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -force_cpusubtype_ALL gizmo.o glutmui.o displaylist.o uicolor.o miscui.o mui.o vslider.o textlist.o button.o pulldown.o hslider.o -o mui -framework OpenGL -framework GLUT -framework Carbon -lobjc -lstdc++ -lm
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9
ld: in '/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks//Accelerate.framework/Versions/A/Accelerate', malformed mach-o, symbol table not in __LINKEDIT
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libmui.a] Error 1
make: *** [libmui.a] Error 2
=============
cc is the system's compiler, and should remain linked to clang, the default compiler for your system.
I agree. My point was not to point cc to something else, but to have the SDK (-isysroot) recognized when using it. I imagine the linking you suggested will resolve the reported behaviour.
Cheers,
from xcodelegacy.
The command I wanted to see the output of is:
$ ls -l /Developer/SDKs
lrwxr-xr-x 1 root wheel 83 4 avr 2012 /Developer/SDKs -> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
If that link doesn't exist on your system, simply create it with
sudo mkdir /Developer
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs /Developer/SDKs
from xcodelegacy.
and you should really use gcc-4.2/g++-4.2 when compiling for 10.4. The Xcode clang is not capable of producing ppc code anyway.
from xcodelegacy.
Your solution worked very well - many thanks.
Is there a separate debugger for ppc that should be installed with its respective SDK(s) ? I'm trying to build a ppc toolchain kit for Qt. (QtCreator). I'm not allowed to select a ppc debugger (ldb or lldb) because the installed debuggers are reported to have an incompatible ABI.
If you want this question on its own issue, let me know. Thanks.
from xcodelegacy.
from xcodelegacy.
I know this is not the best place to ask this, but how would one configure a project to compile such that architecture defines sdk used, then merged into a universal binary:
ppc -> 10.4 sdk
ppc64 -> 10.5 sdk
i386 -> 10.6 sdk
x86_64 -> 10.9 sdk
from xcodelegacy.
build each binary for each arch separately, then merge them using lipo. The problem is that the info.plist should specify a minimum osx version. in your case, that would be 10.4, but the i386 binary would be 10.6.
What I would do is provide two binaries: ppc/i386 for 10.4 and x86_64/i386 for 10.6. That covers every system until 10.12
all ppc64 can run ppc, so you don't really need this.
from xcodelegacy.
Related Issues (20)
- Extract 10.12 SDK from Xcode 8.3.3 (to do before release of macOS 10.13/Xcode 9) HOT 13
- Latest 2.1 missing uninstall for 10.12 SDK
- Feedback HOT 2
- Bad Info.plist created for Xcode 10.0 HOT 8
- Compiler + Xcode 10.1 Error HOT 4
- Option to provide the app path HOT 2
- libLTO detect under Xcode 9
- "No value to remove at key path MinimumSDKVersion"
- "ld: warning: bad symbol action" HOT 2
- Unable to extract 10.12SDK from Xcode8.3.3.xip HOT 3
- Can't compile after running xcode legacy (XCode 10 or 11) HOT 1
- Instructions no longer work on macOS 11.1: "mkdir: /Developer: Read-only file system" HOT 4
- Is it possible to add a Xcode 3.2 from 10.6 PPC? HOT 1
- PPC architecture and old SDKs are unavailable in Xcode 12.4 GUI HOT 2
- as and ld Intel-only in ppc and ppc64 libexec? HOT 2
- setting `MACOSX_DEPLOYMENT_TARGET` does it require the sdk?
- Found XCode >= 4.3 ... Error could not find Xcode >= 4.3 in /Applications, cannot install HOT 1
- Useful tips for ppc and i386 in XCode12 and others
- MacOSX10.5.sdk libgcc_s.10.5.dylib fix breaks linking PowerPC64 executables. HOT 1
- Can't find Xcode.app but it is in the folder
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xcodelegacy.