digitalgust / miniJVM

Develop iOS Android app in java, Cross platform java virtual machine , the minimal jvm .
MIT License
328 stars 91 forks source link

build warning and failure in mac m1 #15

Open qiangyt opened 2 years ago

qiangyt commented 2 years ago

Got 2 kinds of errors/warnings:

  1. miniaudio is warned as using deprecated api
  2. ../desktop/glfw_gui/c/deps/lib/mac/libglfw3.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
  3. Undefined symbols for architecture arm64 (perhaps due to -2 ?)
uname -a
Darwin GQMFHNX6F9 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug 22 20:19:52 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T6000 arm64
./build_mac_linux.sh
Mac
compile mini_jvm
compile glfw_gui
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31157:35: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddressDevices.mElement = kAudioObjectPropertyElementMaster;
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                  kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31190:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31230:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31258:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31311:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31349:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31438:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31559:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31596:28: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddress.mElement = kAudioObjectPropertyElementMaster;
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                           kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:31624:41: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
    propAddressDefaultDevice.mElement = kAudioObjectPropertyElementMaster;
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                        kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:32686:36: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            propAddress.mElement = kAudioObjectPropertyElementMaster;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                   kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:32715:36: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            propAddress.mElement = kAudioObjectPropertyElementMaster;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                   kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
In file included from ../desktop/glfw_gui/c/jni_minial.c:12:
../desktop/glfw_gui/c/deps/include/minial/miniaudio.h:33163:36: warning: 'kAudioObjectPropertyElementMaster' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
            propAddress.mElement = kAudioObjectPropertyElementMaster;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                   kAudioObjectPropertyElementMain
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardwareBase.h:208:5: note: 'kAudioObjectPropertyElementMaster' has been explicitly marked deprecated here
    kAudioObjectPropertyElementMaster API_DEPRECATED_WITH_REPLACEMENT("kAudioObjectPropertyElementMain", macos(10.0, 12.0), ios(2.0, 15.0), watchos(1.0, 8.0), tvos(9.0, 15.0)) = kAudioObjectPropertyElementMain
    ^
13 warnings generated.
ld: warning: ignoring file ../desktop/glfw_gui/c/deps/lib/mac/libglfw3.a, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_glfwCreateWindow", referenced from:
      _org_mini_glfw_Glfw_glfwCreateWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwCreateWindow)
  "_glfwDestroyWindow", referenced from:
      _org_mini_glfw_Glfw_glfwDestroyWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwDestroyWindow)
  "_glfwExtensionSupported", referenced from:
      _org_mini_glfw_Glfw_glfwExtensionSupported in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwExtensionSupported)
  "_glfwGetClipboardString", referenced from:
      _org_mini_glfw_Glfw_glfwGetClipboardString in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetClipboardString)
  "_glfwGetCurrentContext", referenced from:
      _org_mini_glfw_Glfw_glfwGetCurrentContext in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetCurrentContext)
  "_glfwGetCursorPos", referenced from:
      _org_mini_glfw_Glfw_glfwGetCursorPosX in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwGetCursorPosY in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetCursorPosX, _org_mini_glfw_Glfw_glfwGetCursorPosY )
  "_glfwGetFramebufferSize", referenced from:
      _org_mini_glfw_Glfw_glfwGetFramebufferWidth in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwGetFramebufferHeight in jni_glfw-cd559a.o
  "_glfwGetInputMode", referenced from:
      _org_mini_glfw_Glfw_glfwGetInputMode in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetInputMode)
  "_glfwGetJoystickAxes", referenced from:
      _org_mini_glfw_Glfw_glfwGetJoystickAxes in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetJoystickAxes)
  "_glfwGetJoystickButtons", referenced from:
      _org_mini_glfw_Glfw_glfwGetJoystickButtons in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetJoystickButtons)
  "_glfwGetJoystickName", referenced from:
      _org_mini_glfw_Glfw_glfwGetJoystickName in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetJoystickName)
  "_glfwGetKey", referenced from:
      _org_mini_glfw_Glfw_glfwGetKey in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetKey)
  "_glfwGetMouseButton", referenced from:
      _org_mini_glfw_Glfw_glfwGetMouseButton in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetMouseButton)
  "_glfwGetProcAddress", referenced from:
      _org_mini_glfw_Glfw_glfwMakeContextCurrentJni in jni_glfw-cd559a.o
  "_glfwGetTime", referenced from:
      _org_mini_glfw_Glfw_glfwGetTime in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetTime)
  "_glfwGetWindowAttrib", referenced from:
      _org_mini_glfw_Glfw_glfwGetWindowParam in jni_glfw-cd559a.o
  "_glfwGetWindowMonitor", referenced from:
      _org_mini_glfw_Glfw_glfwGetWindowMonitor in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwGetWindowMonitor)
  "_glfwGetWindowSize", referenced from:
      _org_mini_glfw_Glfw_glfwGetWindowX in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwGetWindowY in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwGetWindowWidth in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwGetWindowHeight in jni_glfw-cd559a.o
  "_glfwHideWindow", referenced from:
      _org_mini_glfw_Glfw_glfwHideWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwHideWindow)
  "_glfwIconifyWindow", referenced from:
      _org_mini_glfw_Glfw_glfwIconifyWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwIconifyWindow)
  "_glfwInit", referenced from:
      _org_mini_glfw_Glfw_glfwInitJni in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwInitJni)
  "_glfwMakeContextCurrent", referenced from:
      _org_mini_glfw_Glfw_glfwMakeContextCurrentJni in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwMakeContextCurrentJni)
  "_glfwPollEvents", referenced from:
      _org_mini_glfw_Glfw_glfwPollEvents in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwPollEvents)
  "_glfwRestoreWindow", referenced from:
      _org_mini_glfw_Glfw_glfwRestoreWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwRestoreWindow)
  "_glfwSetCharCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetClipboardString", referenced from:
      _org_mini_glfw_Glfw_glfwSetClipboardString in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetClipboardString)
  "_glfwSetCursorEnterCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetCursorPos", referenced from:
      _org_mini_glfw_Glfw_glfwSetCursorPos in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetCursorPos)
  "_glfwSetCursorPosCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetDropCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetErrorCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
      _org_mini_glfw_Glfw_glfwInitJni in jni_glfw-cd559a.o
  "_glfwSetFramebufferSizeCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetInputMode", referenced from:
      _org_mini_glfw_Glfw_glfwSetInputMode in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetInputMode)
  "_glfwSetKeyCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetMouseButtonCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetScrollCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetTime", referenced from:
      _org_mini_glfw_Glfw_glfwSetTime in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetTime)
  "_glfwSetWindowAspectRatio", referenced from:
      _org_mini_glfw_Glfw_glfwSetWindowAspectRatio in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetWindowAspectRatio)
  "_glfwSetWindowCloseCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowFocusCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowIconifyCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowPosCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowRefreshCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowShouldClose", referenced from:
      _org_mini_glfw_Glfw_glfwSetWindowShouldClose in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetWindowShouldClose)
  "_glfwSetWindowSize", referenced from:
      _org_mini_glfw_Glfw_glfwSetWindowSize in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetWindowSize)
  "_glfwSetWindowSizeCallback", referenced from:
      _org_mini_glfw_Glfw_glfwSetCallback in jni_glfw-cd559a.o
  "_glfwSetWindowTitle", referenced from:
      _org_mini_glfw_Glfw_glfwSetWindowTitle in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSetWindowTitle)
  "_glfwShowWindow", referenced from:
      _org_mini_glfw_Glfw_glfwShowWindow in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwShowWindow)
  "_glfwSwapBuffers", referenced from:
      _org_mini_glfw_Glfw_glfwSwapBuffers in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSwapBuffers)
  "_glfwSwapInterval", referenced from:
      _org_mini_glfw_Glfw_glfwSwapInterval in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwSwapInterval)
  "_glfwTerminate", referenced from:
      _org_mini_glfw_Glfw_glfwTerminate in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwTerminate)
  "_glfwWaitEvents", referenced from:
      _org_mini_glfw_Glfw_glfwWaitEvents in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwWaitEvents)
  "_glfwWindowHint", referenced from:
      _org_mini_glfw_Glfw_glfwWindowHint in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwWindowHint)
  "_glfwWindowShouldClose", referenced from:
      _org_mini_glfw_Glfw_glfwWindowShouldClose in jni_glfw-cd559a.o
     (maybe you meant: _org_mini_glfw_Glfw_glfwWindowShouldClose)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mv: rename libgui.dylib to macos/libgui.dylib: No such file or directory
digitalgust commented 2 years ago

I do not have a mac m1, would you built a glfw-mac-arm.a for me ? If any problem please contact me when build, digitalgust@163.com

qiangyt commented 2 years ago

@digitalgust , I cannot find glfw-mac-arm.a after miniJVM is built, what I found only is desktop/glfw_gui/c/deps/lib/mac/libglfw3.a

Or do you ask I to get a separated copy of glfw and build it? If yes, which version, and any customized build instructions?

digitalgust commented 2 years ago

I've commited the GLFW library for mac m1 (miniJVM/desktop/glfw_gui/c/deps/lib/mac_arm64/libglfw3.a) ,that file is download from glfw github, and changed the build script , but I can't test the script work for m1, could you help me to test it. run script path : binary/build_mac_linux.sh

qiangyt commented 2 years ago

@digitalgust ,

I got below error:

ld: warning: directory not found for option '-L../desktop/glfw_gui/c/deps/lib/mac_arm'
ld: library not found for -lglfw3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mv: rename libgui.dylib to mac_arm64/libgui.dylib: No such file or directory

So I changed build_mac_linux.sh line 14 from LIBDIR="mac_arm" to LIBDIR="mac_arm64", it works: 1) got libgui.dylib in binary/mac_arm64 2) test.sh can successfully launch the ui example.

digitalgust commented 2 years ago

thanks for your work , I 've fix the script.