coronalabs / corona

Solar2D Game Engine main repository (ex Corona SDK)
https://solar2d.com/
MIT License
2.53k stars 272 forks source link

[ OSX]Building ratatouille on OSX fails with RuleScriptExecution error in librtt-simulator #322

Closed paines closed 2 years ago

paines commented 2 years ago

After checking out corona/solar2d recursively, the building of the project fails with:

RuleScriptExecution /Users/XXXXXXXXX/Library/Developer/Xcode/DerivedData/ratatouille-bwmhptjyvqbagiaojujsawbrslca/Build/Intermediates.noindex/ratatouille.build/Debug/librtt-simulator.build/widget_theme_ios_sheet.cpp /Users/XXXXXXXX/src/others/corona/subrepos/widget/widget_theme_ios_sheet.lua normal undefined_arch (in target 'librtt-simulator' from project 'ratatouille')
    cd /Users/XXXXXXXX/src/others/corona/platform/mac
    /bin/sh -c \#\ This\ option\ is\ used\ to\ exit\ the\ script\ as'
'\#\ soon\ as\ a\ command\ returns\ a\ non-zero\ value.'
'set\ -o\ errexit'
''
'\$BUILT_PRODUCTS_DIR/lua\ \$SRCROOT/../../bin/rcc.lua\ -c\ \$BUILT_PRODUCTS_DIR\ -g\ -o\ \$TARGET_TEMP_DIR/\$INPUT_FILE_BASE.lu\ \$INPUT_FILE_PATH'
'\$BUILT_PRODUCTS_DIR/lua\ -epackage.path\=\[\[\$SRCROOT/../../external/loop-2.3-beta/lua/\?.lua\]\]\ \$SRCROOT/../../external/loop-2.3-beta/lua/precompiler.constant.lua\ -d\ \$TARGET_TEMP_DIR\ -o\ \$INPUT_FILE_BASE\ -l\ \$TARGET_TEMP_DIR/\?.lu\ -n\ \$INPUT_FILE_BASE'
'

/bin/sh: line 4:  6047 Killed: 9               $BUILT_PRODUCTS_DIR/lua $SRCROOT/../../bin/rcc.lua -c $BUILT_PRODUCTS_DIR -g -o $TARGET_TEMP_DIR/$INPUT_FILE_BASE.lu $INPUT_FILE_PATH
Command RuleScriptExecution failed with a nonzero exit code

This can be bypassed by commenting out line 3(set -o errexit) of the Build Rules for "Files *.lua in Script" in the librtt-simulator in Xcode .The simulator builds and runs after commenting said line. I do not know if commenting out that line will cause side effects later at some point, as it is used to precompile resources if I understand correctly.

Environment: M1 Pro with OSX 12.1 and Xcode Version 13.2.1 (13C100).

Shchvova commented 2 years ago

Try installing latest Solar2D and launching native setup scripts

Shchvova commented 2 years ago

Oh... I think it will work on Xcode 13.