devernay / xcodelegacy Goto Github PK
View Code? Open in Web Editor NEWLegacy components for XCode 4-12 (deprecated compilers and Mac OS X SDKs)
Home Page: https://github.com/devernay/xcodelegacy
Legacy components for XCode 4-12 (deprecated compilers and Mac OS X SDKs)
Home Page: https://github.com/devernay/xcodelegacy
Can anyone help?
*** Installing GCC 4.0
installer: Package name is xcode_3.2.6_gcc4.0
installer: Installing at base path /
installer: The install failed (Le programme d’installation a rencontré une erreur qui a provoqué l’échec de l’installation. Contactez l’éditeur du logiciel pour obtenir de l’aide.)
*** Installing GCC 4.2
installer: Package name is xcode_3.2.6_gcc4.2
installer: Installing at base path /
installer: The install failed (Le programme d’installation a rencontré une erreur qui a provoqué l’échec de l’installation. Contactez l’éditeur du logiciel pour obtenir de l’aide.)
*** Installing LLVM GCC 4.2
installer: Package name is xcode_3.2.6_llvm-gcc4.2
installer: Installing at base path /
installer: The install failed (Le programme d’installation a rencontré une erreur qui a provoqué l’échec de l’installation. Contactez l’éditeur du logiciel pour obtenir de l’aide.)
Could not compiler the ppc target with these components.
Steps:
Result:
Ld DerivedData/test/Build/Products/Debug/test.app/Contents/MacOS/test normal ppc
cd /Users/xxx/Desktop/test
export MACOSX_DEPLOYMENT_TARGET=10.5
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.0 -arch ppc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk -L/Users/xxx/Desktop/test/DerivedData/test/Build/Products/Debug -F/Users/xxx/Desktop/test/DerivedData/test/Build/Products/Debug -filelist /Users/xxx/Desktop/test/DerivedData/test/Build/Intermediates/test.build/Debug/test.build/Objects-normal/ppc/test.LinkFileList -Xlinker -rpath -Xlinker @executable_path/../Frameworks -mmacosx-version-min=10.5 -Xlinker -no_deduplicate -fobjc-link-runtime -framework Cocoa -Xlinker -dependency_info -Xlinker /Users/xxx/Desktop/test/DerivedData/test/Build/Intermediates/test.build/Debug/test.build/Objects-normal/ppc/test_dependency_info.dat -o /Users/xxx/Desktop/test/DerivedData/test/Build/Products/Debug/test.app/Contents/MacOS/test
Running ld for ppc ...
ld: unknown option: -no_deduplicate
collect2: ld returned 1 exit status
Command /Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.0 failed with exit code 1
The Leopard SDK libgcc_s.10.5.dylib missing symbols bugfix replaces the Leopard SDK build of this library with the copy from the Snow Leopard SDK, which does not support PowerPC64. This prevents any PowerPC64 executable that needs this library from successfully linking.
If reasonable, it'd be nice to have the fix extract the PowerPC64 library from the old libgcc_s.10.5.dylib and insert it into the new one:
pushd /tmp/XC3-10.5/SDKs/MacOSX10.5.sdk/usr/lib/
cp libgcc_s.10.5.dylib libgcc_s.10.5.dylib.bak
lipo libgcc_s.10.5.dylib.bak -extract ppc64 -output _ppc64.dylib
lipo -create $SDKROOT/usr/lib/libgcc_s.10.5.dylib _ppc64.dylib -output libgcc_s.10.5.dylib
rm _ppc64.dylib
popd
Alternatively, a command line option to opt-out might be better than having to manually diagnose and revert it :(.
Xcode 8.3.3 is distributed as a xip archive.
I managed to extract something from it by:
xar -xvf Xcode8.3.3.xip
pbzx Content 2>/dev/null | tar xf - ./Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
There seems to be errors during the extraction. Are these fatal?
That also means XcodeLegacy.sh has to rely on the pbzx tool (if not available, the script could give the recipe to compile and install it in /usr/local/bin - it does not seem to be available from MacPorts or homebrew)
As noted in #24 (comment) we cannot distribute the SDKs. They are available here but this infringes the Xcode licence. Maybe we could just let the user download the SDK from that source?
see also:
https://stackoverflow.com/questions/40414645/how-to-extract-xip-archive-using-command-line
Newest XcodeLegacy.sh generates a few errors when doing 'buildpackages' on the same source media as worked with earlier versions of the script. Errors are as follows:
*** Created Xcode3gcc42.tar.gz in directory /Users/scott/XcodeUpdates
*** Created Xcode3llvmgcc42.tar.gz in directory /Users/scott/XcodeUpdates
patching file hashtable
Hunk #2 FAILED at 1042.
Hunk #3 succeeded at 1217 with fuzz 1.
1 out of 3 hunks FAILED -- saving rejects to file hashtable.rej
*** Created Xcode104SDK.tar.gz in directory /Users/scott/XcodeUpdates
patching file hashtable
Hunk #2 FAILED at 1042.
Hunk #3 succeeded at 1217 with fuzz 1.
1 out of 3 hunks FAILED -- saving rejects to file hashtable.rej
*** Created Xcode105SDK.tar.gz in directory /Users/scott/XcodeUpdates
*** Created Xcode106SDK.tar.gz in directory /Users/scott/XcodeUpdates
"disk2" unmounted.
"disk2" ejected.
Running 'install' afterwards does not generate any errors, but I'm not sure what problems may be hiding under the surface.
jukkaj-0A4M:xcodelegacy jukkaj$ sudo ./XcodeLegacy.sh -osx1013 install
Password:
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
*** installed Xcode1013SDK.tar.gz
*** modified MacOSX Info.plist
*** Warning: /Developer/SDKs should be a symlink to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
Check that /Developer exists, and fix /Developer/SDKs with:
$ sudo ln -sf '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs' /Developer/SDKs
jukkaj-0A4M:xcodelegacy jukkaj$ ls /Developer
ls: /Developer: No such file or directory
jukkaj-0A4M:xcodelegacy jukkaj$ mkdir /Developer
mkdir: /Developer: Read-only file system
jukkaj-0A4M:xcodelegacy jukkaj$ sudo mkdir /Developer
mkdir: /Developer: Read-only file system
jukkaj-0A4M:xcodelegacy jukkaj$
Using OSX 10.9.5 and starting with Xcode 6.2:
Ld build/App.build/Debug/App.build/Objects-normal/i386/App normal i386
cd /Users/arekkusu/App
export MACOSX_DEPLOYMENT_TARGET=10.4
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -L/Users/arekkusu/App/build/Debug -F/Users/arekkusu/App/build/Debug -filelist /Users/arekkusu/App/build/App.build/Debug/App.build/Objects-normal/i386/App.LinkFileList -mmacosx-version-min=10.4 -fobjc-link-runtime -framework Cocoa -framework OpenGL -Xlinker -dependency_info -Xlinker /Users/arekkusu/App/build/App.build/Debug/App.build/Objects-normal/i386/App_dependency_info.dat -o /Users/arekkusu/App/build/App.build/Debug/App.build/Objects-normal/i386/App
ld: warning: bad symbol action: $ld$install_name$os10.4$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices in dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks//CoreGraphics.framework/CoreGraphics
ld: warning: bad symbol action: $ld$install_name$os10.4$/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices in dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks//ImageIO.framework/ImageIO
ld: warning: bad symbol action: $ld$install_name$os10.4$/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices in dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks//CFNetwork.framework/CFNetwork
when working with cmake based projects i see some references while doing searches to set the below cmake/env var
MACOSX_DEPLOYMENT_TARGET
i've recently started setting that var (cmake) with -DMACOSX_DEPLOYMENT_TARGET="10.9"
per this
i'm setting this var because i am publishing releases for older versions of macos and setting that var allows me to run my app bundles ie. MyProject.app
on big sur, catalina, and mojave.
my question do i need to download the 10.9 SDK and set that up, or is the current version of xcode installed on big sur able to use that var with cmake without having to download install the older sdk?
thanks for making this github repo BTW 🙏
I get the issue below. Even when running a simple command line test after using xcodelegacy install (which seems to install fine).
Showing Recent Messages
: unknown error while handling message: unableToInitializeCore(errors: ["/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.0.xcplugin/Contents/Resources/GCC Generic.xcspec: warning: spec ':com.apple.compilers.gcc' already registered from /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/Default Compiler.xcspec", "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.0.xcplugin/Contents/Resources/GCC 4.0.xcspec: error: unknown spec 'Class': 'PBXCompilerSpecificationGcc3_3'", "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.2.xcplugin/Contents/Resources/GCC 4.2.xcspec: error: unknown spec 'Class': 'PBXCompilerSpecificationGcc3_3'"])
Any ideas?
Xcode3gcc40.tar.gz
Xcode3gcc42.tar.gz
Xcode3llvmgcc42.tar.gz
At line 1186 replace
if [ "$osx1011" = 1 ]; then
i=10.11
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
fi
with
if [ "$osx1011" = 1 ]; then
i=10.11
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
fi
if [ "$osx1012" = 1 ]; then
i=10.12
[ -f "$SDKDIR/SDKs/MacOSX${i}.sdk/legacy" ] && rm -rf "$SDKDIR/SDKs/MacOSX${i}.sdk"
fi
...appears to work correctly.
Hi,
first of all, thanks a lot for this script!
I'm trying to use GCC 4.0 to target Mac OS 10.4 and have the following error:
ld: error: can't exec '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/ld' (errno=Permission denied)
collect2: ld returned 71 exit status
When running your script, there was a related error:
./XcodeLegacy.sh: line 180: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld: Permission denied
chmod: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld: No such file or directory
installed Xcode3ld.tar.gz
In the end, the directory /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
does exist, but only contains a ppc
and a ppc64
directory. I guess there should also be a i386
directory there?
The download links you provided only work with the (paid) Apple Developer account. There are alternative links to Apple's download site which really require only signing in with an Apple ID. Most of them can be taken from http://stackoverflow.com/a/10335943 . There are a few missing - for installing on older versions of OS X - but those can be found too with a little effort.
The script extracted and installed components into Xcode 12.4 on Catalina (apparently successfully), however they do not appear as available options in Project settings in Xcode GUI.
Hi Everyone,
this is not an "issue" but just useful info which may hopefully end up in improvements to the script, but in the mean time, here it is in text form:
Xcode 12 blocks compilation of i386, even if you have a working compiler imported that supports i386.
Through painful trial and error, I traced which file you need to change in order to make it work:
GCC 4.2 i386 creates linker problems
Once you get i386 working with xcode12, you'll have problems linking, with weird output.
The solution is to use the i386 assembler from xcode 3.2.6 and replace the one in xcode12 that XcodeLegacy.sh has put in
GCC 4.2 compiles ppc but resulting binary lists as ppc7400
"ppc" is G3 compatible while "ppc7400" is G4.
After a while I figured out that the compiler provides proper binaries but the final linker messes it up!
The reason is that gcc4.2 links with crt3.o which only has ppc7400 in it. So to solve it, just take crc3.o from gcc4.0 (which is ppc) and merge it into a fat binary with gcc4.2'sn crt3.o. After that you get proper ppc binaries that I confirm work properly on actual G3 devices.
commands:
Linker crashes with 'Bus Error 10'
g++-4.2 is called by xcode 12 to link the final binary, and it gives wrong parameters (-target instead of -arch) and some params and environment variables are missing compared to what xcode 3.2.6 does when installed on osx 10.6.8.
So I made a python script that you replace g++-4.2 with to intercept and transform linker calls and forward them to the old binary. File attached
Instructions:
Libtool merges ppc and ppc7400 when creating a fat binary
If you need to compile a binary that has G3 and G4 code separate, then you'll find that libtool messes this up, with many warnings. Basically it removes ppc7400 and just leaves in ppc. To solve this, you'll need to replace libtool file in xcode12's gcc toolchain with a script that uses "lipo" instead of libtool when this situation is detected. I'm attaching a python script I wrote.
That's it from me, let me know if you run into any further trouble and I'll try to help out, I spent 2 days on this, but in the end I have a working xcode12 that I use to compile for powerpc, i386 and x86_64, targeting osx 10.4 and it works like a charm! Thanks xcodelegacy! Hope my contribution will have value to someone else :)
Attachments:
hacked_libtool.zip
hacked_linker_g++-4.2.zip
This patch work with Xcode 9 with target 10.6
--- a/XcodeLegacy.sh
+++ b/XcodeLegacy.sh
@@ -876,6 +876,9 @@ if [ "\$USE_OLD_LD" -eq '1' ]; then
elif [ "\$var" = '-object_path_lto' ]; then
OBJECT_PATH_LTO_FOUND=1
continue
+ elif [ "\$var" = '-lto_library' ]; then
+ OBJECT_PATH_LTO_FOUND=1
+ continue
elif [ "\$var" = '-no_deduplicate' ]; then
continue
elif [ "\$var" = '-export_dynamic' ]; then
Hello,
I'm using a fresh Maverics Vagrant box provided here.
I use the script from the Git repository (last commit Sep 7, 2015).
Install works:
./XcodeLegacy.sh buildpackages
sudo ./XcodeLegacy.sh install
But when I try to invoke gcc
, I get the error:
gcc: error: can't exec '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/gcc' (errno=Permission denied)
It seems that it's too late:
$ pkgutil --verbose --check-signature ./Xcode8.3.3.xip
Package "Xcode8.3.3.xip":
Status: signed by a certificate that has since expired
Certificate Chain:
1. Software Update
SHA1 fingerprint: 1E 34 E3 91 C6 44 37 DD 24 BE 57 B1 66 7B 2F DA 09 76 E1 FD
-----------------------------------------------------------------------------
2. Apple Software Update Certification Authority
SHA1 fingerprint: FA 02 79 0F CE 9D 93 00 89 C8 C2 51 0B BC 50 B4 85 8E 6F BF
-----------------------------------------------------------------------------
3. Apple Root CA
SHA1 fingerprint: 61 1E 5B 66 2C 59 3A 08 FF 58 D1 4A E2 24 52 D1 98 DF 6C 60
I'm stuck... Any idea to workaround?
On line 332, the star at rm -rf "$GCCDIR/usr/bin/*4.0"
is interpreted literally, since it's inside quotes. To have it expand properly, it should be unquoted: rm -rf "$GCCDIR/usr/bin/"*4.0
For some reason some script functions do not appear to take effect? trying to compile tiger with gcc 4.2 complains it is not supported.
Whoops, looks like I missed the extra files on the repository but, still...
Additionally for some reason i am getting sdk not found in xcode when $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk
is specified.
Latest Snow Leopard SDK appears to be shipped in Xcode 4.3.3 for Lion (and perhaps this applies to snow leopard version too, i assume)
PS: for some reason it's unable to link because some files do not appear to exist on the linking directory!?
PS: May I email or chat you?
The linked project has the SDK-s already extracted so your script could use them instead of downloading the entire old Xcode-s.
Would it be possible to add support for e.g. embedding the clang compiler toolchain from e.g. Xcode 5.1.1 and have it as an option within e.g. Xcode 7.x? Alternatively, is there a good resource out there to dig into in order to be able to do this and potentially submit a PR to this repo with an eventual implemented solution?
Using OSX 10.9.5 and starting with Xcode 6.2:
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
*** installed XcodePluginGCC40.tar.gz
(...)
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/powerpc-apple-darwin10-gcc-4.2.1 exists
* creating link /usr/bin/powerpc-apple-darwin10-gcc-4.2.1
* creating link /Applications/Xcode.app/Contents/Developer/usr/bin/powerpc-apple-darwin10-gcc-4.2.1
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist-original: Could not modify plist, error: No value to remove at key path MinimumSDKVersion
*** modified MacOSX Info.plist
and the resulting install is broken (it contains Info.plist-original, but no Info.plist)
...the XcodeLegacy.sh comment says "# Xcode >= 7.3 disables support..." but the logic modifying Info.plist isn't protected for installing into Xcode >= 7.3 ... :(
After installing using latest XcodeLegacy onto Xcode 8.3.2, trying to compile an Ada program using either command-line 'gprbuild' or GUI gps (GNAT Programming Studio), get the following:
Error: cannot find as for x86_64 in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../../../as/x86_64
gprbuild: *** compilation phase failed
If I use XcodeLegacy to uninstall packages and revert back to stock Xcode, the Ada project compiles.
Not sure this is an issue with XcodeLegacy, but I can't find any related messages regarding GNAT either.
Hi,
Seems to me that certain things are having problems. Not sure exactly what is up but I struggled to compile freetype-2.6 for ppc. First configure bailed with this message. After editing the right configure so it wouldn't bail, I was able to run make for a bit until it stumbled again over this error.
Not much out there yet about this error but it seems some weird error related to El Capitan...
I have manually added to my computer the Xcode1010SDK folder in the same directory where the legacy script lives. I also added in same directory the .gz folder
I get the following issue notice the gz.gz
sudo ./XcodeLegacy.sh -osx1010 install
*** Info: found Xcode >= 4.3
gzip: can't stat: Xcode1010SDK.tar.gz (Xcode1010SDK.tar.gz.gz): No such file or directory
*** installed Xcode1010SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/legacy: No such file or directory
*** Not modifying MacOSX Info.plist (found original at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist-original, uninstall first to force install)
Developer
folder is linked to /
by synthetic.conf
Copied the 4.2 Developer from SL to the /Developer
folder:
Applications % ls -la
total 168
drwxrwxr-x 12 mbp151 staff 384 May 22 18:48 .
drwxr-xr-x 16 mbp151 wheel 512 May 22 18:48 ..
-rw-r--r--@ 1 mbp151 staff 6148 May 22 18:42 .DS_Store
drwxrwxr-x 5 mbp151 staff 160 May 15 15:09 Audio
drwxrwxr-x 3 mbp151 staff 96 May 22 12:51 Dashcode.app
drwxrwxr-x 10 mbp151 staff 320 May 22 12:50 Graphics Tools
drwxrwxr-x 3 mbp151 staff 96 May 22 12:51 Instruments.app
drwxrwxr-x 5 mbp151 staff 160 May 22 18:42 Performance Tools
drwxrwxr-x 3 mbp151 staff 96 May 22 12:51 Quartz Composer.app
drwxrwxr-x 20 mbp151 staff 640 May 22 18:42 Utilities
drwxrwxr-x 3 mbp151 staff 96 May 22 12:51 Xcode.app
-rwxr-xr-x@ 1 mbp151 wheel 74340 May 22 13:24 XcodeLegacy.sh
mbp151@MBP151s-MacBook-Pro Applications % sudo ./XcodeLegacy.sh -osx106 install
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
*** Error: could not find Xcode 4.2 in /Developer/Applications nor Xcode >= 4.3 in /Applications, cannot install
mbp151@MBP151s-MacBook-Pro Applications % pwd
/Developer/Applications
Location: /Users/Shared/Developer/Applications/Xcode.app
Bundle ID: com.apple.dt.Xcode
Alternate Names: Xcode.app
Size: 4.64MB
Version: 4.2
Released: 05/22/24
Purchased:
Last Used:
Category: Developer Tools
Copyright: Copyright © 1999–2011 Apple Inc. All rights reserved.
Architecture: Intel, i386
Downloaded the 3.2.6 Xcode from Apple.:
sudo ./XcodeLegacy.sh -osx106 buildpackages
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
expected CRC32 $60727D28
/dev/disk5 Apple_partition_scheme
/dev/disk5s1 Apple_partition_map
/dev/disk5s2 Apple_Driver_ATAPI
/dev/disk5s3 Apple_HFS /Users/mbp151/Downloads/mount.GPf/Xcode and iOS SDK
cp: hashtable-gcc-4.0.4: No such file or directory
*** Created Xcode106SDK.tar.gz in directory /Users/mbp151/Downloads
"disk5" ejected.
Your shell script works great! However, I found a few issues regarding Xcode 5.0.2 and ppc/ppc64 support (I have no idea if these issues are present in Xcode 5.0.0 and 5.0.1).
When attempting to build a project for ppc/ppc64, Xcode 5.0.2 cannot find the correct as
command. Also, the ld
binary within Xcode.app refuses to link ppc/ppc64 architectures.
I have forked your repo and committed some changes to resolve these issues. Please take a look and merge them in, if you find them acceptable! I did not go so far as to check the version of Xcode before performing the necessary operations to fix the problem for 5.0.2 (all the machines I am personally concerned about are running 5.0.2), so you might want to add a couple checks for <5 and >=5 if you choose to apply my patch.
Thanks!
Hi there,
I am in a case where I need to have both Xcode 7 and 8 installed on the same machine, but the XcodeLegacy script installs in Xcode.app by default. Mine are called Xcode7.app and Xcode8.app, and I need to automate that installation so it's not easy to rename them.
Would it be possible to have an extra argument with the app to target instead of using the default one? e.g.
sudo ./XcodeLegacy.sh -osx1012 install --path /Applications/Xcode7.app
Regards,
Maxime
Has anyone looked at supporting Xcode 7 yet? With Xcode 6.4 not being supported on OS X 10.11 El Cap the lack of XcodeLegacy will be a serious impediment to my using El Cap.
Also, I want to say thanks for this. Great work.
sudo ./XcodeLegacy-new.sh -osx1010 install
*** Info: found Xcode >= 4.3 in /Applications/Xcode.app
*** Error: could not find Xcode 4.2 in /Developer/Applications nor Xcode >= 4.3 in /Applications, cannot install
Not sure why this is failing.
I'm on 12.4, Xcode 13.4.1, and it is installed at /Applications/Xcode.app
Have just tried against 6.1.1, and am seeing lots of:
Running ld for i386 ...
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-original: fork: Resource temporarily unavailable
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-original: line 37: Running: command not found
....
clang: error: unable to execute command: No such file or directory
clang: error: linker command failed due to signal (use -v to see invocation)
Granted, may have nothing to do with the xcodelegacy installs, but thought we should run it by you!
Similar to the deduplicate there seems to be flags introduced by default that the ppc linker doesn't understand.
Running ld for ppc ...ld: unknown option: -object_path_lto
collect2: ld returned 1 exit status
If you manually edit the link command and eliminate this option and the lto one that follows it, it does successfully link.
Really love your script, and thank you for the work! I think you may want a privs check on the buildpackages step as well. Extraction of man pages, etc. is expecting to create dirs...
hi devernay,
when I run 'sudo sh XcodeLegacy.sh install', several errors happened.
I want to use 10.7 SDK, what should I do? plz help me
here is the information:
Last login: Sun Jan 18 21:33:23 on ttys000
gnimucs-mini:~ Zero$ cd downloads/xcodelegacy-master/
gnimucs-mini:xcodelegacy-master Zero$ ls
README.md xcode_3.2.6_and_ios_sdk_4.3.dmg
XcodeLegacy.sh
gnimucs-mini:xcodelegacy-master Zero$ sudo sh XcodeLegacy.sh install
Password:
Info: found Xcode >= 4.3
gzip: can't stat: XcodePluginGCC40.tar.gz (XcodePluginGCC40.tar.gz.gz): No such file or directory
installed XcodePluginGCC40.tar.gz
gzip: can't stat: XcodePluginGCC42.tar.gz (XcodePluginGCC42.tar.gz.gz): No such file or directory
installed XcodePluginGCC42.tar.gz
gzip: can't stat: XcodePluginLLVMGCC42.tar.gz (XcodePluginLLVMGCC42.tar.gz.gz): No such file or directory
installed XcodePluginLLVMGCC42.tar.gz
gzip: can't stat: XcodePPCas.tar.gz (XcodePPCas.tar.gz.gz): No such file or directory
installed XcodePPCas.tar.gz
gzip: can't stat: Xcode3ld.tar.gz (Xcode3ld.tar.gz.gz): No such file or directory
cp: directory /Applications/Xcode.app/Contents/Developer/usr/libexec/gcc/darwin/ppc does not exist
cp: directory /Applications/Xcode.app/Contents/Developer/usr/libexec/gcc/darwin/ppc64 does not exist
installed Xcode3ld.tar.gz
gzip: can't stat: Xcode104SDK.tar.gz (Xcode104SDK.tar.gz.gz): No such file or directory
installed Xcode104SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.4u.sdk/legacy: No such file or directory
gzip: can't stat: Xcode105SDK.tar.gz (Xcode105SDK.tar.gz.gz): No such file or directory
installed Xcode105SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk/legacy: No such file or directory
gzip: can't stat: Xcode106SDK.tar.gz (Xcode106SDK.tar.gz.gz): No such file or directory
installed Xcode106SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/legacy: No such file or directory
gzip: can't stat: Xcode107SDK.tar.gz (Xcode107SDK.tar.gz.gz): No such file or directory
installed Xcode107SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/legacy: No such file or directory
gzip: can't stat: Xcode108SDK.tar.gz (Xcode108SDK.tar.gz.gz): No such file or directory
installed Xcode108SDK.tar.gz
touch: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/legacy: No such file or directory
Installing GCC 4.0
installer: Error the package path specified was invalid: 'xcode_3.2.6_gcc4.0.pkg'.
Installing GCC 4.2
installer: Error the package path specified was invalid: 'xcode_3.2.6_gcc4.2.pkg'.
Installing LLVM GCC 4.2
installer: Error the package path specified was invalid: 'xcode_3.2.6_llvm-gcc4.2.pkg'.
When I install the older compilers for Xcode 10.1 on High Sierra I get the following error at (any) compile:
: could not create session: requestError(description: "unknown error
: while handling message: unableToInitializeCore(errors:
: ["/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/
: Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC
: 4.0.xcplugin/Contents/Resources/GCC Generic.xcspec: warning: spec
: \':com.apple.compilers.gcc\' already registered from
: /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents
: /SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM
: 1.0.xcplugin/Contents/Resources/Default Compiler.xcspec",
: "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/
: Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC
: 4.2.xcplugin/Contents/Resources/GCC 4.2.xcspec: error: unknown spec
: \'Class\': \'PBXCompilerSpecificationGcc3_3\'",
: "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/
: Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC
: 4.0.xcplugin/Contents/Resources/GCC 4.0.xcspec: error: unknown spec
: \'Class\': \'PBXCompilerSpecificationGcc3_3\'"])")
Is there a reason why no symlinks are created for cc ?
When building c code package, the message - clang: warning: no such sysroot directory: '/Developer/SDKs/MacOSX10.4u.sdk' is presented.
Of course if I extract MacOSX104.tar.gz and place the contents in /Developer/SDKs/... no message is presented. However, as this sort of 'manual move' is not in your instruction, I'm not sure if doing it advisable ?
Cheers,
Downloading everything is very slow, especially if one does not need all of the SDK-s.
/Applications/Xcode.app/Contents/Developer/usr/bin/c++-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/cpp-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/gcov-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-cpp-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.0
/Applications/Xcode.app/Contents/Developer/usr/bin/c++-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/cpp-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/g++-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/gcov-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-cpp-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-g++-4.2
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2
These soft link are linked to /usr/bin but the compilers are put to folder /usr/local/bin, so caused the issue "No such file or directory"
Please check line 320 in the script
There exists a developer version of 10.6 for PowerPC, and it has working Xcode 3.2. I am interested to compile some software for it like Rstudio and Stan, however I have only managed to get R 4.1.1 built on it (with multiple tweaks to bypass dependency on gcc11), and there it stuck, some components still need gcc11.
I have come across the post that advises XcodeLegacy to build a cross-compiler on Intel Mac to be used for building software for PowerPC: http://maniacsvault.net/articles/powerpccross
Now, the issue is that no commonly available releases of Xcode support 10.6 PPC. The needed version is bundled with 10A96 and 10A109 builds, which can be downloaded here: https://macintoshgarden.org/apps/mac-os-x-snow-leopard-powerpc-the-early-106-developer-builds
More info on 10.6 PPC here: https://forums.macrumors.com/threads/snow-leopard-on-unsupported-ppc-machines.2232031/
Will it be possible to add this option to the script in order to extract needed components from this specific Xcode and install in Xcode 12?
I am sorry if I get this wrong, but as and ld files that are installed into /Applications/Xcode.app/Contents/Developer/usr/libexec/gcc/darwin/ppc and /Applications/Xcode.app/Contents/Developer/usr/libexec/gcc/darwin/ppc64 both contain only x86_64 and i386 architectures. Shouldn't they be for ppc and ppc64 instead?
I have used the script in its default form (complete install) on MacOS Catalina with Xcode 12.4.
After upgrading to Xcode 7.3 and copying the 10.6 SDK into Xcode.app, xcodebuild
gave me the following error when building a 10.6 SDK-based project:
[MT] DVTSDK: Skipped SDK /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk; its version (10.6) is below required minimum (10.11) for the macosx platform.
Xcode 7.3's /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist
now contains a MinimumSDKVersion
key which is set to 10.11
. After removing this key/value from the Info.plist, building with the 10.6 SDK works as it did before.
I haven't tested XcodeLegacy, but I imagine it will need to make this change for Xcode 7.3+.
Installing LLVM GCC 4.2
installer: Package name is xcode_3.2.6_llvm-gcc4.2
installer: Installing at base path /
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
Hi
I'm using the 10.11.2 with Xcode 7, now I need the old compiler toolchain. In the 10.9 I could use the script to install the package correctly, but now even I manually input installer -pkg xcode_3.2.6_gcc4.0.pkg -target /, it still reported the error. Thanks a lot !
Xcodelegacy.sh installed the 10.11 SDK in the right place within my Xcode.app folder.
However, when I chang the Base SDK from macosx10.12 to macosx10.11, when I dismiss the popup
the Base SDK setting is "macosx10.11 (SDK not found)"
I speculate that I need the 10.11 SDK because the 10.12 is not correctly building my kernel extension. kextutil on 10.11 complains that my kext is missing a function symbol.
The install program produces a sed error but modifies the plist.
Sure enough when I try make a project:
could not create session: requestError(description: "unknown error while handling message: unableToInitializeCore(errors: ["/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform: error: unable to load platform: \'Info.plist\' was malformed: Couldn\'t parse property list because the input data was in an invalid format", "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.0.xcplugin/Contents/Resources/GCC Generic.xcspec: warning: spec \':com.apple.compilers.gcc\' already registered from /Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/Clang LLVM 1.0.xcplugin/Contents/Resources/Default Compiler.xcspec", "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.0.xcplugin/Contents/Resources/GCC 4.0.xcspec: error: unknown spec \'Class\': \'PBXCompilerSpecificationGcc3_3\'", "/Applications/Xcode.app/Contents/PlugIns/Xcode3Core.ideplugin/Contents/SharedSupport/Developer/Library/Xcode/Plug-ins/GCC 4.2.xcplugin/Contents/Resources/GCC 4.2.xcspec: error: unknown spec \'Class\': \'PBXCompilerSpecificationGcc3_3\'", ": error: missing required Mac OS X platform"])")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.