Jack-Ji/jok

Build fails when trying to run examples

Closed this issue · 4 comments

Running build on the jok repo on macos intel fails with this error:

zig build particle_2d
particle_2d
└─ run particle_2d
   └─ install particle_2d
      └─ zig build-exe particle_2d Debug native 5 errors
error: undefined symbol: ___PHYSFS_platformCalcBaseDir
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_calculateBaseDir
error: undefined symbol: ___PHYSFS_platformCalcPrefDir
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_PHYSFS_getPrefDir
error: undefined symbol: ___PHYSFS_platformDeinit
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_doDeinit
error: undefined symbol: ___PHYSFS_platformDetectAvailableCDs
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_PHYSFS_getCdRomDirs
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_PHYSFS_getCdRomDirsCallback
error: undefined symbol: ___PHYSFS_platformInit
    note: referenced by /Users/lk/projects/jok/.zig-cache/o/74b923e632358a61ab54fde2c4b11c0f/physfs.o:_PHYSFS_init
error: the following command failed with 5 compilation errors:
Screenshot 2024-10-09 at 18 31 17

Could you try latest master again? I don't have macbook here, sorry.

slightly different error:
jok git:(main) zig build svg
svg
└─ run svg
└─ zig build-exe svg Debug native 3 errors
error: undefined symbol: _objc_autoreleasePoolPop
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcPrefDir
error: undefined symbol: _objc_autoreleasePoolPush
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcPrefDir
error: undefined symbol: _objc_msgSend
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir
note: referenced by /Users/lk/projects/jok/.zig-cache/o/06eb57eae31269fadcd4c9529e97ac22/physfs_platform_apple.o:___PHYSFS_platformCalcBaseDir

I missed objc system lib. Updated link option, should be fixed now.

Works now. Thanks.
Screenshot 2024-10-11 at 08 59 07