touchHLE icon indicating copy to clipboard operation
touchHLE copied to clipboard

Will not run on macOS Big Sur (11.7.1)

Open ceilingtilefan opened this issue 2 years ago • 16 comments

Running "./touchHLE app.app" returns "dyld: Symbol not found: __ZTTNSt3__114basic_ifstreamIcNS_11char_traitsIcEEEE Referenced from: /Users/shark/Desktop/touchHLE_v0.1.0_macOS_x86_64/./touchHLE (which was built for Mac OS X 12.0) Expected in: /usr/lib/libc++.1.dylib in /Users/shark/Desktop/touchHLE_v0.1.0_macOS_x86_64/./touchHLE zsh: abort ./touchHLE app.app"

ceilingtilefan avatar Feb 04 '23 14:02 ceilingtilefan

Oh no! Thanks for telling me about this, I had no idea it wouldn't work on Big Sur :(

I'm surprised a version so close in time wouldn't work. I'll have to investigate. I guess I'll install Big Sur in a VM because I don't want to upgrade and break my dev environment.

hikari-no-yume avatar Feb 04 '23 14:02 hikari-no-yume

Oh wait, the issue is it's an older version, not a newer version? Hmm, I might be able to trivially fix this by changing the SDK I build for then.

hikari-no-yume avatar Feb 04 '23 14:02 hikari-no-yume

I haven't managed to figure out how to do this. By the way, are you stuck on Big Sur for some reason; is something preventing you upgrading to Monterey?

hikari-no-yume avatar Feb 04 '23 19:02 hikari-no-yume

I'm running a hackintosh. My hardware doesn't like Monterey.

ceilingtilefan avatar Feb 04 '23 22:02 ceilingtilefan

Ah I see. :(

Excluding older versions is really only due to accident and to some extent convenience. I was stuck on macOS Mojave for many years because it was the last version with 32-bit app support, so I feel your pain.

FWIW it should be pretty easy to compile touchHLE yourself if you want. Have you tried it? I don't know if you filed the issue because not having a binary is a blocker for you, or just to try to improve things for others.

hikari-no-yume avatar Feb 04 '23 22:02 hikari-no-yume

Haven't tried it, I'll try soon though. I filed it for both reasons.

ceilingtilefan avatar Feb 04 '23 22:02 ceilingtilefan

Cool, give me a shout if you hit any problems. The build process works very reliably for me but I'm sure there'll be issues I could miss due to only having a handful of environments I can test in.

hikari-no-yume avatar Feb 04 '23 22:02 hikari-no-yume

Oh right: I don't remember how well it works, but I think WINE manages to run touchHLE on macOS, if you want to try the Windows binary. Just make sure to use wine64 not wine.

hikari-no-yume avatar Feb 04 '23 22:02 hikari-no-yume

Tried to build it and got this. Not sure if I did something wrong.

   Compiling touchHLE_dynarmic_wrapper v0.1.0 (/Users/shark/Desktop/touchHLE/src/cpu/dynarmic_wrapper)
   Compiling sdl2 v0.35.1
   Compiling sdl2-sys v0.35.1
   Compiling touchHLE_openal_soft_wrapper v0.1.0 (/Users/shark/Desktop/touchHLE/src/audio/openal_soft_wrapper)
   Compiling touchHLE v0.1.0 (/Users/shark/Desktop/touchHLE)
error: failed to run custom build command for `touchHLE_dynarmic_wrapper v0.1.0 (/Users/shark/Desktop/touchHLE/src/cpu/dynarmic_wrapper)`

Caused by:
  process didn't exit successfully: `/Users/shark/Desktop/touchHLE/target/release/build/touchHLE_dynarmic_wrapper-6555b99d421dbc25/build-script-build` (exit status: 101)
  --- stdout
  CMAKE_TOOLCHAIN_FILE_x86_64-apple-darwin = None
  CMAKE_TOOLCHAIN_FILE_x86_64_apple_darwin = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-apple-darwin = None
  CMAKE_GENERATOR_x86_64_apple_darwin = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-apple-darwin = None
  CMAKE_PREFIX_PATH_x86_64_apple_darwin = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-apple-darwin = None
  CMAKE_x86_64_apple_darwin = None
  HOST_CMAKE = None
  CMAKE = None
  running: "cmake" "/Users/shark/Desktop/touchHLE/src/cpu/dynarmic_wrapper/../../../vendor/dynarmic" "-DCMAKE_OSX_ARCHITECTURES=x86_64" "-DDYNARMIC_WARNINGS_AS_ERRORS=OFF" "-DDYNARMIC_TESTS=OFF" "-DCMAKE_INSTALL_PREFIX=/Users/shark/Desktop/touchHLE/target/release/build/touchHLE_dynarmic_wrapper-2afd96c9ebca93e8/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- Target architecture: x86_64
  -- Module support is disabled.
  -- Version: 9.0.0
  -- Build type: Release
  -- CXX_STANDARD: 20
  -- Required features: cxx_variadic_templates
  -- mach/mach_exc.defs location: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/Kernel.framework/Headers
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/shark/Desktop/touchHLE/target/release/build/touchHLE_dynarmic_wrapper-2afd96c9ebca93e8/out/build
  running: "cmake" "--build" "." "--target" "install" "--config" "Release"
  [  6%] Built target Zycore
  [  8%] Built target fmt
  [  9%] Built target mcl
  [ 17%] Built target Zydis
  [ 17%] Building CXX object src/dynarmic/CMakeFiles/dynarmic.dir/ir/ir_emitter.cpp.o

  --- stderr
  gmake[1]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
  /Users/shark/Desktop/touchHLE/vendor/dynarmic/src/dynarmic/ir/ir_emitter.cpp:1943:47: error: implicit instantiation of undefined template 'std::vector<Dynarmic::IR::TypedValue<Dynarmic::IR::Type::U64>>'
  Table IREmitter::VectorTable(std::vector<U64> values) {
                                                ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iosfwd:248:28: note: template is declared here
  class _LIBCPP_TEMPLATE_VIS vector;
                             ^
  /Users/shark/Desktop/touchHLE/vendor/dynarmic/src/dynarmic/ir/ir_emitter.cpp:1943:47: warning: unused parameter 'values' [-Wunused-parameter]
  Table IREmitter::VectorTable(std::vector<U64> values) {
                                                ^
  /Users/shark/Desktop/touchHLE/vendor/dynarmic/src/dynarmic/ir/ir_emitter.cpp:1949:48: error: implicit instantiation of undefined template 'std::vector<Dynarmic::IR::TypedValue<Dynarmic::IR::Type::U128>>'
  Table IREmitter::VectorTable(std::vector<U128> values) {
                                                 ^
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/usr/include/c++/v1/iosfwd:248:28: note: template is declared here
  class _LIBCPP_TEMPLATE_VIS vector;
                             ^
  /Users/shark/Desktop/touchHLE/vendor/dynarmic/src/dynarmic/ir/ir_emitter.cpp:1949:48: warning: unused parameter 'values' [-Wunused-parameter]
  Table IREmitter::VectorTable(std::vector<U128> values) {
                                                 ^
  2 warnings and 2 errors generated.
  gmake[2]: *** [src/dynarmic/CMakeFiles/dynarmic.dir/build.make:493: src/dynarmic/CMakeFiles/dynarmic.dir/ir/ir_emitter.cpp.o] Error 1
  gmake[1]: *** [CMakeFiles/Makefile2:362: src/dynarmic/CMakeFiles/dynarmic.dir/all] Error 2
  gmake: *** [Makefile:136: all] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit status: 2

  build script failed, must exit now', /Users/shark/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.49/src/lib.rs:1104:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...

ceilingtilefan avatar Feb 04 '23 23:02 ceilingtilefan

Huh, that's inside dynarmic and it's C++ so I'm probably hopeless at debugging it, but: if you edit /Users/shark/Desktop/touchHLE/vendor/dynarmic/src/dynarmic/ir/ir_emitter.cpp and just add the line #include <vector> somewhere at the top, does it perhaps get fixed?

hikari-no-yume avatar Feb 04 '23 23:02 hikari-no-yume

Had to add #include <vector> into several files before it built. Running the app now gives me Error: "Could not parse icon image"

ceilingtilefan avatar Feb 04 '23 23:02 ceilingtilefan

Had to add #include <vector> into several files before it built

Aha okay, I'll let the developers of dynamic know about that issue.

Running the app now gives me Error: "Could not parse icon image"

Ah, there's some problems with the icon handling that I need to fix eventually, but so far as I know, no version of Super Monkey Ball has this problem. So I guess you're trying to run some other app? Sadly, I can practically guarantee nothing other than Super Monkey Ball works right now. Even if I fix the icon thing it'll probably break for some other reason. If you want to try such apps, perhaps come back in a few months, I'm sure the situation will be at least a bit better then.

hikari-no-yume avatar Feb 04 '23 23:02 hikari-no-yume

I was trying Paper Toss, so that's probably the issue. I'll try Super Monkey Ball.

ceilingtilefan avatar Feb 04 '23 23:02 ceilingtilefan

It works! I guess it built for my operating system without any other modifications. Screen Shot 2023-02-04 at 5 53 40 PM

ceilingtilefan avatar Feb 04 '23 23:02 ceilingtilefan

🎊

hikari-no-yume avatar Feb 04 '23 23:02 hikari-no-yume

I can confirm "dyld: Symbol not found" issue with current release build v0.1.2 running on macOS Big Sur

The solution is to specify MACOSX_DEPLOYMENT_TARGET (ref)

export MACOSX_DEPLOYMENT_TARGET=10.13
rustup target add x86_64-apple-darwin
cargo build --target=x86_64-apple-darwin --release

This way i was able to build v0.1.2 on Big Sur (11.7.2) and run on High Sierra (10.13.6) Capture d’écran 2023-03-26 à 13 11 45

ciciplusplus avatar Mar 26 '23 11:03 ciciplusplus