Code Monkey home page Code Monkey logo

Comments (8)

rsfinn avatar rsfinn commented on July 20, 2024

The XcodeLegacy.sh script tries to use sed to write the new minimum SDK version into the embedded property list at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist, but in Xcode 10 the plist file is in binary format, so sed corrupts it. Fortunately the script backs up the Info.plist to Info.plist-original alongside, so you can replace the bad version with the original.

As shipped, the original version declares the minimum version as 10.11, so if you don't need an SDK older than that, you're done. Otherwise, you can use BBEdit to edit the binary plist and manually enter the desired version (the key is "MinimumSDKVersion").

from xcodelegacy.

victori avatar victori commented on July 20, 2024

Hmm, I have the same problem on Xcode 10.1. However the reverted plist hasn't not helped. Any other insight what it might be?

from xcodelegacy.

victori avatar victori commented on July 20, 2024

Actually I take it back my error appears to be different.

`2018-11-07 12:39:32.153 xcodebuild[13749:11389670] [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.
2018-11-07 12:39:32.988 XCBBuildService[13751:11389704] /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
2018-11-07 12:39:32.996 XCBBuildService[13751:11389705] /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'
2018-11-07 12:39:32.996 XCBBuildService[13751:11389693] /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'
--- xcodebuild: WARNING: Configuration Release-Debug is not in the project. Building default configuration.

2018-11-07 12:39:33.238 XCBBuildService[13751:11389706] /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
2018-11-07 12:39:33.245 XCBBuildService[13751:11389693] /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'
2018-11-07 12:39:33.246 XCBBuildService[13751:11389709] /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'
lnote: Using new build system
error: 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.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\'"])")`

from xcodelegacy.

nicolas-cellier-aka-nice avatar nicolas-cellier-aka-nice commented on July 20, 2024

Couldn't we detect the case when property list is binary, and then use plutil rather than sed?
See for example:
http://scriptingosx.com/2016/11/editing-property-lists/
plutil -replace otherkey -string othervalue test.plist

from xcodelegacy.

nicolas-cellier-aka-nice avatar nicolas-cellier-aka-nice commented on July 20, 2024

I could successfully install the legacy SDKs/Compilers on Xcode 10.1 by replacing the sed command:

mv "$PLATFORMDIR/Info.plist" "$PLATFORMDIR/Info.plist-original"
sed -e '/MinimumSDKVersion/{N;d;}' < "$PLATFORMDIR/Info.plist-original" > "$PLATFORMDIR/Info.plist"

with:

cp -p "$PLATFORMDIR/Info.plist" "$PLATFORMDIR/Info.plist-original"
plutil -remove MinimumSDKVersion "$PLATFORMDIR/Info.plist"

from xcodelegacy.

gghose avatar gghose commented on July 20, 2024

Just did the plutil fix with Xcode 10.1 and it works! Thanks.

Now I've got another problem... somehow the ld links seem screwed up. I've got a project trying to link with x86_64 and for some reason the ppc directories in the toolchain are being searched:

Ld /Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Products/Development/AttendDynX.app/Contents/MacOS/AttendDynX normal x86_64
cd /Users/geoff/Desktop/Lablib/AttendDynX5
export MACOSX_DEPLOYMENT_TARGET=10.5
/Applications/Xcode.app/Contents/Developer/usr/bin/llvm-gcc-4.2 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.5.sdk -L/Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Products/Development -F/Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Products/Development -F../LocalFrameworks/build/Development -filelist /Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Intermediates.noindex/AttendDynX.build/Development/AttendDynX.build/Objects-normal/x86_64/AttendDynX.LinkFileList -mmacosx-version-min=10.5 -Xlinker -object_path_lto -Xlinker /Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Intermediates.noindex/AttendDynX.build/Development/AttendDynX.build/Objects-normal/x86_64/AttendDynX_lto.o -fobjc-link-runtime -framework EZAudioCompat -framework Lablib -framework Cocoa -Xlinker -dependency_info -Xlinker /Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Intermediates.noindex/AttendDynX.build/Development/AttendDynX.build/Objects-normal/x86_64/AttendDynX_dependency_info.dat -o /Users/geoff/Library/Developer/Xcode/DerivedData/AttendDynX-gbqjgpntvkhtkqcasypgoxrrrqla/Build/Products/Development/AttendDynX.app/Contents/MacOS/AttendDynX

Error: cannot find ld for x86_64 in /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../libexec/ld/ppc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../libexec/ld/ppc /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../../libexec/ld/ppc or /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../../../libexec/ld/ppccollect2: ld returned 1 exit status

What's odd is that Xcode succeeded in making the app (It's in DerivedData) but this area is preventing it from being run "within" the Xcode environment? Any ideas?

from xcodelegacy.

devernay avatar devernay commented on July 20, 2024

fixed by #47

from xcodelegacy.

gghose avatar gghose commented on July 20, 2024

My issue with ld not being found is back. I wish I had a better understanding of the logic by which paths are searched. This isn't an issue of the plist; it looks fine.

To reiterate:

cannot find ld for x86_64 in /Applications/Xcode.9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../libexec/ld/ppc /Applications/Xcode.9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../libexec/ld/ppc /Applications/Xcode.9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../../libexec/ld/ppc or /Applications/Xcode.9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/llvm-gcc-4.2/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/../../../../../libexec/ld/ppccollect2: ld returned 1 exit status

from xcodelegacy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.