redox-os/orbtk

Undefined symbols for architecture x86_64

Opened this issue · 1 comments

Describe the bug
When compiling the showcase example on an Intel-based Macbook, it fails with the error "Undefined symbols for architecture x86_64." I know this has been reported in the past but it was for a different version of macOS and I didn't want to hijack another thread.

  = note: Undefined symbols for architecture x86_64:
            "_OBJC_CLASS_$_CHHapticDynamicParameter", referenced from:
                objc-class-ref in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_OBJC_CLASS_$_CHHapticEventParameter", referenced from:
                objc-class-ref in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_CHHapticDynamicParameterIDHapticIntensityControl", referenced from:
                -[SDL_RumbleMotor setIntensity:] in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_CHHapticEventParameterIDHapticIntensity", referenced from:
                -[SDL_RumbleMotor setIntensity:] in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_OBJC_CLASS_$_CHHapticPattern", referenced from:
                objc-class-ref in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_OBJC_CLASS_$_CHHapticEvent", referenced from:
                objc-class-ref in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
            "_CHHapticEventTypeHapticContinuous", referenced from:
                -[SDL_RumbleMotor setIntensity:] in libsdl2_sys-ee657edccdc41d23.rlib(SDL_mfijoystick.m.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)


error: could not compile `orbtk` due to previous error

To Reproduce
Steps to reproduce the behavior:

  1. Clone this repo.
  2. Install sdl2 with Homebrew.
  3. Build the showcase example as described in the README, with or without the "bundled" feature.
  4. See error

Expected behavior
the build process to complete successfully

Desktop:

  • OS: macOS Monterey
  • Version: 12.4
  • Darwin kernel version: 21.5.0
  • Architecture: x86_64

Additional context

  • orbtk develop branch (68c67da)
  • sdl2: stable 2.0.22 (installed by brew install sdl2)
  • Command Line Tools for Xcode 13.4

I also tried export LIBRARY_PATH="$(brew --prefix)/lib" as suggested by the rust-sdl2 project but this made no difference.

hello lan,

Maybe you can try to link to CoreHaptics by #487 (comment)