Skip to content

Figure out compile requirements on MacOS Sequoia (15) #1281

Open

Description

@bob-the-hamster

I'm writing an ansible script that can install all the OHRRPGCE compile dependencies on a MacOS target, but I am having a hard time getting it all working, especially figuring out which clang/gcc versions actually work

I current have everything installed, but compiling with

ohrmacdev@OHRRPGCEs-MacBook-Pro wip % scons game                      
scons: Reading SConscript files ...
Using target: darwin  arch: x86_64  fbc: fbc (1.06.0 (04-29-2016))  fbcc: gcc (clang 16.0.0)  cc: gcc (clang 16.0.0)  cctarget: x86_64-apple-darwin24.3.0
WARNING: due to bug in old fbc, dropping arg -Wc -Wno-incompatible-library-redeclaration
WARNING: due to bug in old fbc, dropping arg -Wc -Wno-builtin-requires-header
WARNING: due to bug in old fbc, dropping arg -Wc -Wno-missing-braces
WARNING: due to bug in old fbc, dropping arg -Wc -Wno-unused-but-set-variable
scons: done reading SConscript files.
scons: Building targets ...
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/achievements_runtime.rbas.bas -o build/achievements_runtime.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/bmod.rbas.bas -o build/bmod.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/menustuf.rbas.bas -o build/menustuf.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/moresubs.rbas.bas -o build/moresubs.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/savegame.rbas.bas -o build/savegame.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/purchase.rbas.bas -o build/purchase.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/achievements.rbas.bas -o build/game-achievements.rbas.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/animations.rbas.bas -o build/game-animations.rbas.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-achievements.rbas.o.c -o build/game-achievements.rbas.o
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/common.rbas.bas -o build/game-common.rbas.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/achievements_runtime.rbas.o.c -o build/achievements_runtime.rbas.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-animations.rbas.o.c -o build/game-animations.rbas.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/purchase.rbas.o.c -o build/purchase.rbas.o
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/loading.rbas.bas -o build/game-loading.rbas.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/moresubs.rbas.o.c -o build/moresubs.rbas.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/savegame.rbas.o.c -o build/savegame.rbas.o
Retrieved `build/os_sockets.o' from cache
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r networkutil.bas -o build/networkutil.o.c
Retrieved `build/os_unix.o' from cache
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r os_unix2.bas -o build/os_unix2.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/networkutil.o.c -o build/networkutil.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/menustuf.rbas.o.c -o build/menustuf.rbas.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/os_unix2.o.c -o build/os_unix2.o
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r util.bas -o build/util.o.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r base64.bas -o build/base64.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/base64.o.c -o build/base64.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/bmod.rbas.o.c -o build/bmod.rbas.o
Retrieved `build/unicode.o' from cache
Retrieved `build/array.o' from cache
Retrieved `build/miscc.o' from cache
Retrieved `build/fb/error.o' from cache
Retrieved `build/lib/sha1.o' from cache
Retrieved `build/lib/lodepng.o' from cache
Retrieved `build/lib/lodepng_gzip.o' from cache
Retrieved `build/filelayer.o' from cache
Generating version/backend info
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r build/globals.bas -o build/globals.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/globals.o.c -o build/globals.o
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r lumpfile.bas -o build/lumpfile.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/util.o.c -o build/util.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/lumpfile.o.c -o build/lumpfile.o
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -r vector.bas -o build/vector.o.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/vector.o.c -o build/vector.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-loading.rbas.o.c -o build/game-loading.rbas.o
gcc -o build/os_unix_wm.o -c -I. -Wall -Wno-deprecated-declarations -Wno-unused-but-set-variable -DFBCVERSION=1060 -g -fno-omit-frame-pointer -O3 -ffunction-sections -fdata-sections -mmacosx-version-min=10.6 -m64 -fwrapv -frounding-math --std=gnu11 -D_THREAD_SAFE -I/usr/local/include/SDL2 os_unix_wm.c
Retrieved `build/blit.o' from cache
Retrieved `build/matrixMath.o' from cache
Retrieved `build/rasterizer.o' from cache
Retrieved `build/rotozoom.o' from cache
Retrieved `build/surface.o' from cache
Retrieved `build/lib/gif.o' from cache
Retrieved `build/lib/jo_jpeg.o' from cache
Retrieved `build/lib/ujpeg.o' from cache
Generating datafiles.c
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r game.bas -o build/game.o.c
gcc -o build/datafiles.o -c -I. -Wall -Wno-deprecated-declarations -Wno-unused-but-set-variable -DFBCVERSION=1060 -g -fno-omit-frame-pointer -O3 -ffunction-sections -fdata-sections -mmacosx-version-min=10.6 -m64 -fwrapv -frounding-math --std=gnu11 -D_THREAD_SAFE -I/usr/local/include/SDL2 build/datafiles.c
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-common.rbas.o.c -o build/game-common.rbas.o
In file included from os_unix_wm.c:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Headers/ApplicationServices.h:27:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATS.h:28:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSLayoutTypes.h:28:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSTypes.h:24:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGGeometry.h:8:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:276:34: error: missing ')' after '__attribute__'
  276 | # if __CG_HAS_COMPILER_ATTRIBUTE(pure)
      |                                  ^~~~
./fb/../config.h:211:29: note: expanded from macro 'pure'
  211 | # define pure __attribute__ ((__pure__))
      |               ~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:20:66: note: expanded from macro '__CG_HAS_COMPILER_ATTRIBUTE'
   20 | #  define __CG_HAS_COMPILER_ATTRIBUTE(attribute) __has_attribute(attribute)
      |                                                                  ^~~~~~~~~
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:276:6: note: to match this '('
  276 | # if __CG_HAS_COMPILER_ATTRIBUTE(pure)
      |      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGBase.h:20:65: note: expanded from macro '__CG_HAS_COMPILER_ATTRIBUTE'
   20 | #  define __CG_HAS_COMPILER_ATTRIBUTE(attribute) __has_attribute(attribute)
      |                                                                 ^
fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r bmodsubs.bas -o build/bmodsubs.o.c
1 error generated.
scons: *** [build/os_unix_wm.o] Error 1
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/bmodsubs.o.c -o build/bmodsubs.o
gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math --std=gnu11 -fdata-sections -fno-omit-frame-pointer -mmacosx-version-min=10.6 -Wno-unused-but-set-variable -Wno-deprecated-declarations -O3 -I. -DFBCVERSION=1060 -ffunction-sections -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game.o.c -o build/game.o
scons: building terminated because of errors.

Activity

  1. bob-the-hamster commented on Mar 15, 2025

    @bob-the-hamster
    CollaboratorAuthor

    The docs here https://rpg.hamsterrepublic.com/ohrrpgce/Compiling_in_Mac_OS_X suggest using:

    "XCode 4.2/Apple GCC 4.2.1, and GCC 4.9.3 from MacPorts are both known to work.)"

    Apparently XCode 16 is current, so 4 is really old. I already have the Xcode command line tools installed and it seems to just have clang 16 (gcc seems to just be an alias for clang)

    Macports still exists, but I am hoping to be able to get everything I need from Homebrew, as it is really the de-facto standard, and I would like to avoid requiring two different package managers if I can help it.

    However, brew defaults to gcc version 14, and it looks like gcc 9 is the oldest they have in their default package repos

  2. bob-the-hamster commented on Mar 15, 2025

    @bob-the-hamster
    CollaboratorAuthor
  3. rversteegen commented on Mar 16, 2025

    @rversteegen
    Contributor

    This is caused by our #define pure ... in config.h. We should rename pure to purefunc or similar.

    Also, I would not recommend using an old version of clang or gcc. Better to use the newest stable. That comment on the wiki page is ancient.

  4. bob-the-hamster commented on Mar 16, 2025

    @bob-the-hamster
    CollaboratorAuthor

    Renaming pure to purefunc did help. (By the way, is pure actually used anywhere? I was not able to spot any usage of it anywhere outside of config.h)

    That fix did get me past the compiling stage, but it fails at linking

    gcc -o ohrrpgce-game build/achievements_runtime.rbas.o build/bmod.rbas.o build/menustuf.rbas.o build/moresubs.rbas.o build/savegame.rbas.o build/purchase.rbas.o build/game-achievements.rbas.o build/game-animations.rbas.o build/game-common.rbas.o build/game-loading.rbas.o build/os_sockets.o build/networkutil.o build/os_unix.o build/os_unix2.o build/util.o build/base64.o build/unicode.o build/array.o build/miscc.o build/fb/error.o build/lib/sha1.o build/lib/lodepng.o build/lib/lodepng_gzip.o build/filelayer.o build/globals.o build/lumpfile.o build/vector.o build/os_unix_wm.o build/blit.o build/matrixMath.o build/rasterizer.o build/rotozoom.o build/surface.o build/lib/gif.o build/lib/jo_jpeg.o build/lib/ujpeg.o build/datafiles.o build/game.o build/bmodsubs.o build/scriptcommands.o build/yetmore2.o build/walkabouts.o build/scripting.o build/oldhsinterpreter.o build/pathfinding.o build/game-gfx_sdl2.o build/game-music_sdl2.o build/game-allmodex.o build/game-audiofile.o build/game-backends.o build/game-bam2mid.o build/game-bcommon.o build/game-browse.o build/game-common_menus.o build/game-cmdline.o build/game-menus.o build/game-reload.o build/game-reloadext.o build/game-sliceedit.o build/game-slices.o build/game-specialslices.o build/game-steam.o build/game-thingbrowser.o build/game-plankmenu.o -g -O2 -mmacosx-version-min=10.6 -Wl,-rpath,@executable_path/../Frameworks -Wl,-no_pie -m64 -Wl,-dead_strip -Wl,-L/Users/ohrmacdev/src/ohrmac/fbcmac/bin/../lib/freebasic/darwin-x86_64 /Users/ohrmacdev/src/ohrmac/fbcmac/bin/../lib/freebasic/darwin-x86_64/fbrt0.o -lfbmt -lstdc++ -lpthread -lncurses -framework SDL2 -framework SDL2 -framework SDL2_mixer -framework Cocoa
    ld: framework not found SDL2
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    scons: *** [ohrrpgce-game] Error 1
    

    I guess the sdl2 that I installed with brew just isn't a framework build, so I'll have to figure out how to install a framework build, or to convert what brew installs into a framework (I found inconsistent information about whether or not that was even possible)

  5. rversteegen commented on Mar 17, 2025

    @rversteegen
    Contributor

    I think that I added pure because I thought I would use it, but didn't, and I've since forgotten about it.

    It's probably best to download and link to the official SDL framework builds. SConscript contains FRAMEWORKS_PATH, but it's not customisable yet. So it expects framesworks either in ~/Library/Frameworks or in /Library/Frameworks.) Additionally if sdl2-config is installed, sdl2-config --cflags is used instead for the -I include path, so you'd have to uninstall SDL from homebrew if switching to frameworks.

  6. bob-the-hamster commented on Apr 4, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I removed the SDL2 frameworks from homebrew, and installed the frameworks into ~/Library/Frameworks instead.

    compiling still fails, but with new and interesting error messages

    ohrmacdev@OHRRPGCEs-MacBook-Pro wip % scons
    scons: Reading SConscript files ...
    Using target: darwin  arch: x86_64  fbc: fbc (1.06.0 (04-29-2016))  fbcc: gcc (clang 16.0.0)  cc: gcc (clang 16.0.0)  cctarget: x86_64-apple-darwin24.3.0
    WARNING: due to bug in old fbc, dropping arg -Wc -Wno-incompatible-library-redeclaration
    WARNING: due to bug in old fbc, dropping arg -Wc -Wno-builtin-requires-header
    WARNING: due to bug in old fbc, dropping arg -Wc -Wno-missing-braces
    WARNING: due to bug in old fbc, dropping arg -Wc -Wno-unused-but-set-variable
    scons: done reading SConscript files.
    scons: Building targets ...
    python3 reloadbasic/reloadbasic.py --careful achievements_runtime.rbas -o build/achievements_runtime.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful bmod.rbas -o build/bmod.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful menustuf.rbas -o build/menustuf.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful moresubs.rbas -o build/moresubs.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful savegame.rbas -o build/savegame.rbas.bas
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    python3 reloadbasic/reloadbasic.py --careful purchase.rbas -o build/purchase.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful achievements.rbas -o build/achievements.rbas.bas
    python3 reloadbasic/reloadbasic.py --careful animations.rbas -o build/animations.rbas.bas
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:65: SyntaxWarning: invalid escape sequence '\.'
      def nodeSpec():             return (AND(re.compile('.*\.\s*"')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:68: SyntaxWarning: invalid escape sequence '\w'
      STAR, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:72: SyntaxWarning: invalid escape sequence '\.'
      def nodeZeroSpec():         return (AND(re.compile('.*\.\.')),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:74: SyntaxWarning: invalid escape sequence '\w'
      PLUS, (".", CHECKPNT, re.compile('\w+'),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:84: SyntaxWarning: invalid escape sequence '\.'
      def tokenList():            return [(AND(re.compile('.*(\.\.|\.\s*"|readnode)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:155: SyntaxWarning: invalid escape sequence '\s'
      def lineGrammar():          return [(AND(re.compile('(end\s+)?(dim.*node|declare +as|readnode|withnode|loadarray|private|local|static|sub|function|constructor|destructor|property|operator|starttest|endtest|#)', re.I)),
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:183: SyntaxWarning: invalid escape sequence '\W'
      continuation = re.compile("(?<=\W)_\s*(('.*)|/'.*'/\s*)?$")
    /Users/ohrmacdev/src/ohr/wip/reloadbasic/reloadbasic.py:576: SyntaxWarning: invalid escape sequence '\s'
      whitespace = re.compile("\s*")
    fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/achievements_runtime.rbas.bas -o build/achievements_runtime.rbas.o.c
    fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/achievements.rbas.bas -o build/game-achievements.rbas.o.c
    gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math -fdata-sections -ffunction-sections -mmacosx-version-min=10.6 /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers -O3 -DFBCVERSION=1060 /Library/Frameworks/SDL2.framework/Headers -Wno-unused-but-set-variable -fno-omit-frame-pointer -I. --std=gnu11 -Wno-deprecated-declarations -I -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-achievements.rbas.o.c -o build/game-achievements.rbas.o
    fbc -g -i /Users/ohrmacdev/src/ohr/wip/build/ -mt -target darwin -arch x86_64 -asm att -gen gcc -Wc -I.,-fno-omit-frame-pointer,-O3,-ffunction-sections,-fdata-sections,-mmacosx-version-min=10.6,-Wno-deprecated-declarations -d IS_GAME -m game -r build/purchase.rbas.bas -o build/purchase.rbas.o.c
    clang: error: no such file or directory: '/Library/Frameworks/SDL2.framework/Headers'
    clang: warning: /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers: 'linker' input unused [-Wunused-command-line-argument]
    scons: *** [build/game-achievements.rbas.o] Error 1
    gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math -fdata-sections -ffunction-sections -mmacosx-version-min=10.6 /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers -O3 -DFBCVERSION=1060 /Library/Frameworks/SDL2.framework/Headers -Wno-unused-but-set-variable -fno-omit-frame-pointer -I. --std=gnu11 -Wno-deprecated-declarations -I -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/achievements_runtime.rbas.o.c -o build/achievements_runtime.rbas.o
    clang: error: no such file or directory: '/Library/Frameworks/SDL2.framework/Headers'
    clang: warning: /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers: 'linker' input unused [-Wunused-command-line-argument]
    scons: *** [build/achievements_runtime.rbas.o] Error 1
    gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math -fdata-sections -ffunction-sections -mmacosx-version-min=10.6 /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers -O3 -DFBCVERSION=1060 /Library/Frameworks/SDL2.framework/Headers -Wno-unused-but-set-variable -fno-omit-frame-pointer -I. --std=gnu11 -Wno-deprecated-declarations -I -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/purchase.rbas.o.c -o build/purchase.rbas.o
    clang: error: no such file or directory: '/Library/Frameworks/SDL2.framework/Headers'
    clang: warning: /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers: 'linker' input unused [-Wunused-command-line-argument]
    scons: *** [build/purchase.rbas.o] Error 1
    scons: building terminated because of errors.
    Pruned 1 file(s) (1MB) from cache
    
  7. rversteegen commented on Apr 11, 2025

    @rversteegen
    Contributor
    gcc [...] -mmacosx-version-min=10.6 /Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers -O3 -DFBCVERSION=1060 /Library/Frameworks/SDL2.framework/Headers -Wno-unused-but-set-variable -fno-omit-frame-pointer -I. --std=gnu11 -Wno-deprecated-declarations -I -Wno-missing-braces [...]
    clang: error: no such file or directory: '/Library/Frameworks/SDL2.framework/Headers'
    

    Notice that -I is missing before the (nonexistant) header path, and it's been moved elsewhere. I see the problem. This line:
    '$FBCC $FBC_CFLAGS ${list(set(CFLAGS).difference(FBC_CFLAGS))} $GENGCC_CFLAGS -c ${TARGET}.c -o $TARGET']
    I really shouldn't have tried to cram that into one line.

    I'm gone for the next few days, if you want to fix it.

    Also, all those syntax warnings in recent Python (which I haven't seen before) will turn into errors into a future version so need fixing.

  8. bob-the-hamster commented on Apr 12, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I could not find a way to fix it in that line, but this did help:

    Index: SConscript
    ===================================================================
    --- SConscript	(revision 13880)
    +++ SConscript	(working copy)
    @@ -1299,13 +1299,13 @@
             if env.WhereIs('sdl-config'):
                 commonenv.ParseConfig('sdl-config --cflags')
             else:
    -            commonenv['CFLAGS'] += ["-I", "/Library/Frameworks/SDL.framework/Headers", "-I", FRAMEWORKS_PATH + "/SDL.framework/Headers"]
    +            commonenv['CFLAGS'] += ["-I/Library/Frameworks/SDL.framework/Headers", "-I" + FRAMEWORKS_PATH + "/SDL.framework/Headers"]
         if 'sdl2' in gfx:
             # SDL2 does not have SDLmain
             if env.WhereIs('sdl2-config'):
                 commonenv.ParseConfig('sdl2-config --cflags')
             else:
    -            commonenv['CFLAGS'] += ["-I", "/Library/Frameworks/SDL2.framework/Headers", "-I", FRAMEWORKS_PATH + "/SDL2.framework/Headers"]
    +            commonenv['CFLAGS'] += ["-I/Library/Frameworks/SDL2.framework/Headers", "-I" + FRAMEWORKS_PATH + "/SDL2.framework/Headers"]
         # if 'sdl' in music:
         #     # libvorbisfile is linked into SDL_mixer.framework which has been compiled to export its symbols
         #     commonenv['FBFLAGS'] += ['-d', 'HAVE_VORBISFILE']
    

    With that fix, it gets further, to a different interesting error

    gcc -Wall -Wno-unused-label -Wno-unused-variable -Wno-unused-function -g -m64 -fwrapv -frounding-math -fno-omit-frame-pointer --std=gnu11 -mmacosx-version-min=10.6 -Wno-deprecated-declarations -ffunction-sections -DFBCVERSION=1060 -fdata-sections -I/Users/ohrmacdev/Library/Frameworks/SDL2.framework/Headers -O3 -I/Library/Frameworks/SDL2.framework/Headers -I. -Wno-unused-but-set-variable -Wno-missing-braces -Wno-builtin-requires-header -Wno-incompatible-library-redeclaration -c build/game-allmodex.o.c -o build/game-allmodex.o
    gcc -o ohrrpgce-game build/achievements_runtime.rbas.o build/bmod.rbas.o build/menustuf.rbas.o build/moresubs.rbas.o build/savegame.rbas.o build/purchase.rbas.o build/game-achievements.rbas.o build/game-animations.rbas.o build/game-common.rbas.o build/game-loading.rbas.o build/os_sockets.o build/networkutil.o build/os_unix.o build/os_unix2.o build/util.o build/base64.o build/unicode.o build/array.o build/miscc.o build/fb/error.o build/lib/sha1.o build/lib/lodepng.o build/lib/lodepng_gzip.o build/filelayer.o build/globals.o build/lumpfile.o build/vector.o build/os_unix_wm.o build/blit.o build/matrixMath.o build/rasterizer.o build/rotozoom.o build/surface.o build/lib/gif.o build/lib/jo_jpeg.o build/lib/ujpeg.o build/datafiles.o build/game.o build/bmodsubs.o build/scriptcommands.o build/yetmore2.o build/walkabouts.o build/scripting.o build/oldhsinterpreter.o build/pathfinding.o build/game-gfx_sdl2.o build/game-music_sdl2.o build/game-allmodex.o build/game-audiofile.o build/game-backends.o build/game-bam2mid.o build/game-bcommon.o build/game-browse.o build/game-common_menus.o build/game-cmdline.o build/game-menus.o build/game-reload.o build/game-reloadext.o build/game-sliceedit.o build/game-slices.o build/game-specialslices.o build/game-steam.o build/game-thingbrowser.o build/game-plankmenu.o -g -O2 -F /Users/ohrmacdev/Library/Frameworks -mmacosx-version-min=10.6 -Wl,-rpath,@executable_path/../Frameworks -Wl,-no_pie -m64 -Wl,-dead_strip -Wl,-L/Users/ohrmacdev/src/ohrmac/fbcmac/bin/../lib/freebasic/darwin-x86_64 /Users/ohrmacdev/src/ohrmac/fbcmac/bin/../lib/freebasic/darwin-x86_64/fbrt0.o -lfbmt -lstdc++ -lpthread -lncurses -framework SDL2 -framework SDL2 -framework SDL2_mixer -framework Cocoa
    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2.framework/SDL2) was built for newer macOS version (10.11) than being linked (10.6)
    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2_mixer.framework/SDL2_mixer) was built for newer macOS version (10.11) than being linked (10.6)
    Undefined symbols for architecture x86_64:
      "ACHIEVEMENTS::IS_PERMANENT()", referenced from:
          ACHIEVEMENTS::EVALUATE_TAGS() in achievements_runtime.rbas.o
      "ACHIEVEMENTS::ENABLE_DEBUG$", referenced from:
          _DEBUG_MENU_FUNCTIONS in game.o
          _GAME_SETOPTION in yetmore2.o
      "ACHIEVEMENTS::DEFINITIONS_LOAD(FBSTRING&)", referenced from:
          _main in game.o
      "ACHIEVEMENTS::DEFINITIONS_COUNT()", referenced from:
          ACHIEVEMENTS::RUNTIME_RESET() in achievements_runtime.rbas.o
          ACHIEVEMENTS::RUNTIME_LOAD(RELOAD::NODE*) in achievements_runtime.rbas.o
      "ACHIEVEMENTS::DEFINITIONS_RESET()", referenced from:
          _GAME_SETOPTION in yetmore2.o
      "ACHIEVEMENTS::GET_DEFINITION_BY_INDEX(int)", referenced from:
          ACHIEVEMENTS::EVALUATE_TAGS() in achievements_runtime.rbas.o
          ACHIEVEMENTS::RUNTIME_LOAD(RELOAD::NODE*) in achievements_runtime.rbas.o
      "ACHIEVEMENTS::ACH_DEBUG(FBSTRING&)", referenced from:
          ACHIEVEMENTS::EVALUATE_TAGS() in achievements_runtime.rbas.o
          ACHIEVEMENTS::RUNTIME_LOAD(RELOAD::NODE*) in achievements_runtime.rbas.o
          ACHIEVEMENTS::RUNTIME_SAVE(RELOAD::NODE*) in achievements_runtime.rbas.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    scons: *** [ohrrpgce-game] Error 1
    scons: building terminated because of errors.
    Pruned 21 file(s) (12MB) from cache
    
  9. rversteegen commented on Apr 14, 2025

    @rversteegen
    Contributor

    I sometimes see similar errors when trying linking 32-bit and 64-bit object files together, which happens because disappointingly SCons sometimes fails to rebuild objects when I interrupt a build and then switch arch. Try file build/game-achievements.rbas.o to check whether it's 32-bit. If so try doing a clean build... but you probably are since this is with ansible?

  10. bob-the-hamster commented on Apr 14, 2025

    @bob-the-hamster
    CollaboratorAuthor

    It does seem to be 64 bit

    ohrmacdev@OHRRPGCEs-MacBook-Pro wip % file build/game-achievements.rbas.o
    build/game-achievements.rbas.o: Mach-O 64-bit object x86_64
    
  11. rversteegen commented on Apr 15, 2025

    @rversteegen
    Contributor

    I would try to figure out whether those symbols are not in the object files, in which case they were built incorrectly, or if they are then maybe the linker wasn't invoked correctly, e.g. because of an object file ordering issue and this code:

        #if mac:
            # -( -) are not supported on Mac, and don't seem to work with some other linkers either (e.g. on NixOS)...
        if True:
            # ...so never use -( -), to be more portable
            basexe_gcc_action = '$CC -o $TARGET $SOURCES $CCLINKFLAGS'
        else:
            basexe_gcc_action = '$CC -o $TARGET $SOURCES "-Wl,-(" $CCLINKFLAGS "-Wl,-)"'
    
  12. rversteegen commented on Apr 15, 2025

    @rversteegen
    Contributor

    Well, I don't think the -( ... -) args should ever be needed for .o files, only for libraries. So that's probably not it. But it looks like it could be a similar problem.

  13. bob-the-hamster commented on Apr 19, 2025

    @bob-the-hamster
    CollaboratorAuthor

    Well, it seems likely that file wasn't build correctly

    ohrmacdev@OHRRPGCEs-MacBook-Pro wip % nm build/game-achievements.rbas.o     
    0000000000000000 s ___fbctinf
    ohrmacdev@OHRRPGCEs-MacBook-Pro wip % objdump -t build/game-achievements.rbas.o
    
    build/game-achievements.rbas.o:	file format mach-o 64-bit x86-64
    
    SYMBOL TABLE:
    0000000000000000 l     O __DATA,fbctinf ___fbctinf
    
  14. rversteegen commented on Apr 19, 2025

    @rversteegen
    Contributor

    Are you sure this a clean build? An earlier log you posted showed an error while compiling build/game-achievements.rbas.o. The list of missing symbols shows other objects are built normally. Otherwise, does build/game-achievements.rbas.c contain code?

  15. bob-the-hamster commented on Apr 19, 2025

    @bob-the-hamster
    CollaboratorAuthor

    Definitely a clean build, because I get the same even when I rm -R ./build

    However, you are right, build/game-achievements.rbas.o.c is almost empty.

    Furthermore, build/achievements.rbas.bas is completely empty.

    So the problem command seems to be:

    python3 reloadbasic/reloadbasic.py --careful achievements.rbas -o build/achievements.rbas.bas
    

    I'm investigating that. It runs with no errors, and other reloadbasic invocations do seem to generate code just fine.

  16. bob-the-hamster commented on Apr 19, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I ran that reloadbasic command with --trace and it produced abundant output that looks like proper processing of the file, with nothing that seems to be an error message.

    rbtrace.txt

  17. bob-the-hamster commented on Apr 19, 2025

    @bob-the-hamster
    CollaboratorAuthor

    My current suspect is DelayedFileWriter class

    Even if I tell it to .flush() and exit the program early after writing the first few lines, I still get an empty file.

    Also, I get empty output no matter which rbas file I compile, which is weird, because when I compiler with scons, all of them except build/achievements.rbas.bas are non-empty

    EDIT: actually thats just with the early flush and exit, so I'm probably on to something there...

  18. bob-the-hamster commented on Apr 19, 2025

    @bob-the-hamster
    CollaboratorAuthor

    Hmmm... so in the process of trying to track down exactly where the write was failing to the reloadbasic output file, I happened to add a print(self.file.tell()) and suddenly the bug went away. Super weird! So my build compiles now, but the reloadbasic mystery remains unsolved.

    Now the build succeeds, with the following two warnings:

    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2.framework/SDL2) was built for newer macOS version (10.11) than being linked (10.6)
    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2_mixer.framework/SDL2_mixer) was built for newer macOS version (10.11) than being linked (10.6)
    

    The custom binary fails with this message

    ohrmacdev@OHRRPGCEs-MacBook-Pro wip % ./ohrrpgce-custom --help
    dyld[52647]: Library not loaded: @rpath/SDL2.framework/Versions/A/SDL2
      Referenced from: <5546FD92-23B3-3E2C-A03E-65ABDD86F2D1> /Users/ohrmacdev/src/ohr/wip/ohrrpgce-custom
      Reason: tried: '/Users/ohrmacdev/src/ohr/Frameworks/SDL2.framework/Versions/A/SDL2' (no such file), '/Users/ohrmacdev/src/ohr/Frameworks/SDL2.framework/Versions/A/SDL2' (no such file)
    zsh: abort      ./ohrrpgce-custom --help
    

    That error speaks the truth, /Users/ohrmacdev/src/ohr/Frameworks/SDL2.framework does not exist, but I am unsure why it is looking there instead of /Users/ohrmacdev/Library/Frameworks/SDL2.framework

    (passage of time...)

    Oh! Okay. ./bundle-apps.sh x86_64 SDL2 does actually give me working apps. Yay!

    So I now have a working dev environment on MacOS Sequoia

    "Test Game" doesn't work from the bundled app, but maybe that is expected.

    Also I don't know if it is possible to create a 32 bit build from this environment or not

  19. rversteegen commented on Apr 19, 2025

    @rversteegen
    Contributor

    Hmmm... so in the process of trying to track down exactly where the write was failing to the reloadbasic output file, I happened to add a print(self.file.tell()) and suddenly the bug went away.

    I'm still using Python 3.11. I had a look through the changes in 3.12 and notice that there are changes to the GC. I also notice that DelayedFileWriter creates FileMarker reference loops. reloadbasic.py doesn't actually flush or close the output file but instead dodgily assumes that it will be closed/flushed to disk when the program exits, when all variables are finalised. It turns out that this worked in Python 2 but is not reliable in Python 3. The reason being the reference loops: in order to clean them up the GC has to break references between objects and it can break references inside the file object, destroying the buffer without flushing it. See python/cpython#62052 (comment) and python/cpython#23135 (comment). There is a warning in the documentation (which was fixed here: you have to close files, not just delete them).

    "Test Game" doesn't work from the bundled app, but maybe that is expected.

    It's meant to work if OHRRPGCE-Game.app is next to OHRRPGCE-Custom.app. Anything in c_debug?

  20. rversteegen commented on Apr 20, 2025

    @rversteegen
    Contributor
    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2.framework/SDL2) was built for newer macOS version (10.11) than being linked (10.6)
    ld: warning: dylib (/Users/ohrmacdev/Library/Frameworks/SDL2_mixer.framework/SDL2_mixer) was built for newer macOS version (10.11) than being linked (10.6)
    

    I notice that the current Mac build machine doesn't print this and must have an older SDL version. It used to be the case that SDL2 was built to target 10.6+. Doing some (a lot of) searching I found it's changed as follows

    • SDL 2.26.5 (2023): bumped to macOS 10.11 (El Capitan, released 2015)
    • SDL 2.24.0 (Aug 2022): bumped to macOS 10.9 (Mavericks, released 2013)
    • SDL 2.0.22 (Apr 2022): supported macOS 10.6 (Snow Leopard, released 2009)

    (And it was 10.7 for a short while between 2.24 and 2.0.22).
    It was (mainly?) changed to support newer XCode, and that's just the default target and it's likely SDL2 could still be custom-built to support older versions, but I don't want to bother with that.

    I think it's worth using an older SDL version to support a few more years of MacOS releases anyway, until we actually want some newer feature or bugfix. 2.26.4 will be a good option too; that's almost right at the end of active SDL 2 development.

    I also saw

    32-bit Intel and macOS 10.8 runtime support has been officially dropped as of SDL 2.24.0.

    But our 32-bit Mac apps use SDL 1.2 anyway, and support macOS 10.4+ (2005). But you'd also have to first get 32-bit builds working. Is the clang toolchain from XCode, or from homebrew? It would be nice to keep but not priority. The last 32-bit-only Macs were apparently from approximately 2011.

    MacOS requirement of SDL_mixer and other optional libraries all seem to match the corresponding SDL release.

  21. rversteegen commented on May 18, 2025

    @rversteegen
    Contributor

    Related to my spelunking above, I've just discovered that Wohlstand (who else) patched SDL 2.26/27 to get it running on OSX 10.4 on a PPC. Mostly.
    libsdl-org/SDL#6506

  22. bob-the-hamster commented on Jul 23, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I did figure out why "Test Game" wasn't working on mac.
    I was running open OHRRPGCE-Custom.app out of the source where I built it. It was trying to run ohrrpgce-game from the same folder, which doesn't work for me.

    Copying both OHRRPGCE-*.app files to a different folder works around the problem for me.

  23. bob-the-hamster commented on Aug 6, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I realized that ohrrpgce-game and ohrrpgce-custom where just looking for ../Frameworks which makes perfect sense inside the app bundle, but did not make sense in my source folder. I fixed it with a simple symlink.

    Now I am noticing a really weird error with scons autotest_rpg
    It mostly works, but then the script fails in weird ways, like asserts failing where they don't fail on Linux builds.

    If I comment out enough failing tests in autotest.hss I eventually get a script corruption error, so maybe hspeak on mac is writing corrupt output in some cases

    Image
  24. rversteegen commented on Aug 7, 2025

    @rversteegen
    Contributor

    "scons test", runs ohrrpgce-game without bundling it, so I would want it to work without needing to set up a symlink. SConscript passes -rpath,@executable_path/../Frameworks''-rpath,@executable_path/../Frameworks and we could make it look in ~/Library/Frameworks too.
    Likewise IIRC Test Game prefers to run ohrrpgce-game instead of OHRRPGCE-Game.app because if it exists it's likely because you've just recompiled ohrrpgce-game.


    Considering that that is an error message that I recently touched, about an error condition in script trigger stuff that I recently rewrote, the most likely explanation is that my changes I broke it.

  25. rversteegen commented on Aug 7, 2025

    @rversteegen
    Contributor

    You could even copy autotest.rpg to Linux and see whether running it there gives the same error to find out whether the problem is in compile/import or in Game.

    That error message doesn't indicate a problem with hspeak, most likely lookup1.bin is written (or read) incorrectly. Probably to do with the way (inside importscripts) the old lookup1.bin is loaded, a new temp file in a different format is written, and they are swapped. Could be Mac-specific file IO differences (e.g rename(2) is infamously not atomic on Mac) or more likely just due to the sequence of script imports on that particular machine exposed a bug.

  26. bob-the-hamster commented on Aug 7, 2025

    @bob-the-hamster
    CollaboratorAuthor

    I created #1284 specifically for this script corruption bug, since I want to get that fixed for kaleidophone+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions