kunstmusik / CsoundJNI

Java binding for Csound using JNI
GNU Lesser General Public License v2.1
5 stars 0 forks source link

Error trying to build library on M1 mac #2

Open boonier opened 2 years ago

boonier commented 2 years ago

Hi, I just tried to build the library, but got this error below..

which JNI is it referring to? - are my paths not set properly?

-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Java: /Library/Java/JavaVirtualMachines/jdk-18.jdk/Contents/Home/bin/java (found suitable version "18.0.0", minimum required is "11") found components: Development
CMake Error at /opt/homebrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2
  JAVA_AWT_INCLUDE_PATH)
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /opt/homebrew/Cellar/cmake/3.22.2/share/cmake/Modules/FindJNI.cmake:382 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:13 (find_package)

-- Configuring incomplete, errors occurred!
boonier commented 2 years ago

sorry, details: image

kunstmusik commented 2 years ago

I wonder if this is a Java 18-specific issue. JNI headers should be included with the JDK and I can build here with JDK 17 (using Zulu release). Which vendor of JDK are you using?

On Tue, May 17, 2022 at 10:57 AM Si Mills @.***> wrote:

sorry, details:

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

boonier commented 2 years ago

Hi, OpenJDK I believe https://jdk.java.net/18/

boonier commented 2 years ago

OK I installed the Zulu JDK 17 and it seems better, although an error right at the end might be causing issues?

boonier:build/ (master✗) $ make install                                                                                                                                                                        [9:45:06]
/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -S/Users/boonier/GIT/CsoundJNI -B/Users/boonier/GIT/CsoundJNI/build --check-build-system CMakeFiles/Makefile.cmake 0
/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_progress_start /Users/boonier/GIT/CsoundJNI/build/CMakeFiles /Users/boonier/GIT/CsoundJNI/build//CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/depend
cd /Users/boonier/GIT/CsoundJNI/build && /opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build/CMakeFiles/csoundjni-native.dir/DependInfo.cmake --color=
/Applications/Xcode.app/Contents/Developer/usr/bin/make  -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/build
[ 50%] Linking CXX shared library libcsoundjni.jnilib
/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_link_script CMakeFiles/csoundjni-native.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -std=c++11 -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.3 -dynamiclib -Wl,-headerpad_max_install_names -o libcsoundjni.jnilib -install_name @rpath/libcsoundjni.jnilib CMakeFiles/csoundjni-native.dir/src/main/cpp/CsoundJNI.cpp.o -F/Library/Frameworks  -framework CsoundLib64
ld: warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64
Undefined symbols for architecture arm64:
  "_csoundCleanup", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup)
  "_csoundCompile", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile )
  "_csoundCompileOrc", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc )
  "_csoundCompileOrcAsync", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync)
  "_csoundCreate", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate)
  "_csoundDestroy", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy)
  "_csoundEvalCode", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode)
  "_csoundGet0dBFS", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS)
  "_csoundGetChannelPtr", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr)
  "_csoundGetHostData", referenced from:
      jniMessageStringCallback(CSOUND_*, int, char const*) in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o
  "_csoundGetKr", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr)
  "_csoundGetKsmps", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps)
  "_csoundGetNchnls", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls )
  "_csoundGetNchnlsInput", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput in CsoundJNI.cpp.o
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput)
  "_csoundGetScoreTime", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime)
  "_csoundGetSpin", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin)
  "_csoundGetSpout", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout)
  "_csoundGetSr", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr)
  "_csoundGetVersion", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion)
  "_csoundInitialize", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize)
  "_csoundInputMessage", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage )
  "_csoundInputMessageAsync", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync)
  "_csoundPerformKsmps", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps)
  "_csoundReadScore", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore )
  "_csoundReadScoreAsync", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync)
  "_csoundReset", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset)
  "_csoundSetControlChannel", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel)
  "_csoundSetMessageStringCallback", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o
  "_csoundSetOption", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption)
  "_csoundSetStringChannel", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel)
  "_csoundStart", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart)
  "_csoundStop", referenced from:
      _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop in CsoundJNI.cpp.o
     (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libcsoundjni.jnilib] Error 1
make[1]: *** [CMakeFiles/csoundjni-native.dir/all] Error 2
make: *** [all] Error 2
boonier:build/ (master✗) $                                                                                                                                                                                     [9:45:20]

I can't see how to use use -v to see invocation to get better output

cheers

kunstmusik commented 2 years ago

Apologies, coming back to this now, I see this error:

ld: warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

It has been a while since I worked on this library (got it to work and kind of left it there) and it looks like I did not do a good job documenting or automating the build process. I will try to spend some time tomorrow to review and revise all of this.

On Fri, May 20, 2022 at 4:55 AM Si Mills @.***> wrote:

OK I installed the Zulu JDK 17 and it seems better, although an error right at the end might be causing issues?

boonier:build/ (master✗) $ make install [9:45:06]

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -S/Users/boonier/GIT/CsoundJNI -B/Users/boonier/GIT/CsoundJNI/build --check-build-system CMakeFiles/Makefile.cmake 0

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_progress_start /Users/boonier/GIT/CsoundJNI/build/CMakeFiles /Users/boonier/GIT/CsoundJNI/build//CMakeFiles/progress.marks

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/depend

cd /Users/boonier/GIT/CsoundJNI/build && /opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build/CMakeFiles/csoundjni-native.dir/DependInfo.cmake --color=

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/build

[ 50%] Linking CXX shared library libcsoundjni.jnilib

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_link_script CMakeFiles/csoundjni-native.dir/link.txt --verbose=1

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++11 -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.3 -dynamiclib -Wl,-headerpad_max_install_names -o libcsoundjni.jnilib -install_name @rpath/libcsoundjni.jnilib CMakeFiles/csoundjni-native.dir/src/main/cpp/CsoundJNI.cpp.o -F/Library/Frameworks -framework CsoundLib64

ld: warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

Undefined symbols for architecture arm64:

"_csoundCleanup", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup)

"_csoundCompile", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile )

"_csoundCompileOrc", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc )

"_csoundCompileOrcAsync", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync)

"_csoundCreate", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate)

"_csoundDestroy", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy)

"_csoundEvalCode", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode)

"_csoundGet0dBFS", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS)

"_csoundGetChannelPtr", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr)

"_csoundGetHostData", referenced from:

  jniMessageStringCallback(CSOUND_*, int, char const*) in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o

"_csoundGetKr", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr)

"_csoundGetKsmps", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps)

"_csoundGetNchnls", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls )

"_csoundGetNchnlsInput", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput in CsoundJNI.cpp.o

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput)

"_csoundGetScoreTime", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime)

"_csoundGetSpin", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin)

"_csoundGetSpout", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout)

"_csoundGetSr", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr)

"_csoundGetVersion", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion)

"_csoundInitialize", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize)

"_csoundInputMessage", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage )

"_csoundInputMessageAsync", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync)

"_csoundPerformKsmps", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps)

"_csoundReadScore", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore )

"_csoundReadScoreAsync", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync)

"_csoundReset", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset)

"_csoundSetControlChannel", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel)

"_csoundSetMessageStringCallback", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o

"_csoundSetOption", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption)

"_csoundSetStringChannel", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel)

"_csoundStart", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart)

"_csoundStop", referenced from:

  _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop in CsoundJNI.cpp.o

 (maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [libcsoundjni.jnilib] Error 1

make[1]: *** [CMakeFiles/csoundjni-native.dir/all] Error 2

make: *** [all] Error 2

boonier:build/ (master✗) $ [9:45:20]

I can't see how to use use -v to see invocation to get better output

cheers

— Reply to this email directly, view it on GitHub https://github.com/kunstmusik/CsoundJNI/issues/2#issuecomment-1132651685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMA66VOZKMECAOSSDRDVLVK5HPJANCNFSM5WFFCBCA . You are receiving this because you commented.Message ID: @.***>

boonier commented 2 years ago

No problem at all!

A lesson for me to thoroughly read the error logs, as the answer is usually in there :)

Thanks for getting back anyhow

On Sun, 5 Jun 2022 at 17:14, Steven Yi @.***> wrote:

Apologies, coming back to this now, I see this error:

ld: warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

It has been a while since I worked on this library (got it to work and kind of left it there) and it looks like I did not do a good job documenting or automating the build process. I will try to spend some time tomorrow to review and revise all of this.

On Fri, May 20, 2022 at 4:55 AM Si Mills @.***> wrote:

OK I installed the Zulu JDK 17 and it seems better, although an error right at the end might be causing issues?

boonier:build/ (master✗) $ make install [9:45:06]

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -S/Users/boonier/GIT/CsoundJNI -B/Users/boonier/GIT/CsoundJNI/build --check-build-system CMakeFiles/Makefile.cmake 0

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_progress_start /Users/boonier/GIT/CsoundJNI/build/CMakeFiles /Users/boonier/GIT/CsoundJNI/build//CMakeFiles/progress.marks

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/depend

cd /Users/boonier/GIT/CsoundJNI/build && /opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_depends "Unix Makefiles" /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build /Users/boonier/GIT/CsoundJNI/build/CMakeFiles/csoundjni-native.dir/DependInfo.cmake --color=

/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/csoundjni-native.dir/build.make CMakeFiles/csoundjni-native.dir/build

[ 50%] Linking CXX shared library libcsoundjni.jnilib

/opt/homebrew/Cellar/cmake/3.22.2/bin/cmake -E cmake_link_script CMakeFiles/csoundjni-native.dir/link.txt --verbose=1

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -std=c++11 -O3 -DNDEBUG -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -mmacosx-version-min=12.3 -dynamiclib -Wl,-headerpad_max_install_names -o libcsoundjni.jnilib -install_name @rpath/libcsoundjni.jnilib CMakeFiles/csoundjni-native.dir/src/main/cpp/CsoundJNI.cpp.o -F/Library/Frameworks -framework CsoundLib64

ld: warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

Undefined symbols for architecture arm64:

"_csoundCleanup", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCleanup)

"_csoundCompile", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc , _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompile )

"_csoundCompileOrc", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrc )

"_csoundCompileOrcAsync", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileCsdText in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCompileOrcAsync)

"_csoundCreate", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundCreate)

"_csoundDestroy", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy)

"_csoundEvalCode", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundEvalCode)

"_csoundGet0dBFS", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGet0dBFS)

"_csoundGetChannelPtr", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr)

"_csoundGetHostData", referenced from:

jniMessageStringCallback(CSOUND_, int, char const) in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundDestroy in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o

"_csoundGetKr", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKr)

"_csoundGetKsmps", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetChannelPtr in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetKsmps)

"_csoundGetNchnls", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnls )

"_csoundGetNchnlsInput", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput in CsoundJNI.cpp.o

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetNchnlsInput)

"_csoundGetScoreTime", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetScoreTime)

"_csoundGetSpin", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpin)

"_csoundGetSpout", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSpout)

"_csoundGetSr", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetSr)

"_csoundGetVersion", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundGetVersion)

"_csoundInitialize", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInitialize)

"_csoundInputMessage", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessage )

"_csoundInputMessageAsync", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundInputMessageAsync)

"_csoundPerformKsmps", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundPerformKsmps)

"_csoundReadScore", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync, _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScore )

"_csoundReadScoreAsync", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReadScoreAsync)

"_csoundReset", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundReset)

"_csoundSetControlChannel", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetControlChannel)

"_csoundSetMessageStringCallback", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetMessageCallback in CsoundJNI.cpp.o

"_csoundSetOption", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetOption)

"_csoundSetStringChannel", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundSetStringChannel)

"_csoundStart", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStart)

"_csoundStop", referenced from:

_Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop in CsoundJNI.cpp.o

(maybe you meant: _Java_com_kunstmusik_csoundjni_CsoundJNI_csoundStop)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[2]: *** [libcsoundjni.jnilib] Error 1

make[1]: *** [CMakeFiles/csoundjni-native.dir/all] Error 2

make: *** [all] Error 2

boonier:build/ (master✗) $ [9:45:20]

I can't see how to use use -v to see invocation to get better output

cheers

— Reply to this email directly, view it on GitHub < https://github.com/kunstmusik/CsoundJNI/issues/2#issuecomment-1132651685>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAMMA66VOZKMECAOSSDRDVLVK5HPJANCNFSM5WFFCBCA

. You are receiving this because you commented.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/kunstmusik/CsoundJNI/issues/2#issuecomment-1146841508, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPLKROD6WJVX3H5QWMX2JTVNTG55ANCNFSM5WFFCBCA . You are receiving this because you authored the thread.Message ID: @.***>

-- [image: sjm*create logo] SI MILLS https://www.linkedin.com/in/si-mills-80a42516 https://github.com/boonier https://codepen.io/boonier WWW.SJM-CREATE.CO.UK http://www.sjm-create.co.uk/ @. @.> T. + 44 (0) 7870 647178

boonier commented 2 years ago

There aren't any publicly available (universal) builds for M1/arm-64 that I can see. That's the primary issue right?

kunstmusik commented 2 years ago

Universal builds of Csound? Not that I'm aware of. Having one would certainly make building this easier on Mac. I think the last build I did was manually installing the x86_64 version of Csound temporarily just to build, then uninstalling and using my normal arm64 build to build the other native lib. The CsoundJNI native portion is using separate dylibs at the moment; could look at making that a universal build as well.

On Thu, Jun 9, 2022 at 5:07 AM Si Mills @.***> wrote:

There aren't any publicly available (universal) builds for M1/arm-64 that I can see. That's the primary issue right?

— Reply to this email directly, view it on GitHub https://github.com/kunstmusik/CsoundJNI/issues/2#issuecomment-1150866750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMA64YYCD6DDKMSETJIZDVOGX3XANCNFSM5WFFCBCA . You are receiving this because you commented.Message ID: @.***>

boonier commented 2 years ago

Hey @kunstmusik don't suppose you had any joy/made progress on this?

I just built csound (--HEAD) using homebrew, but it didn't seem to update the /Library/Frameworks/CsoundLib64.framework/CsoundLib64 - I still get the same error:

warning: ignoring file /Library/Frameworks/CsoundLib64.framework/CsoundLib64, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

boonier commented 2 years ago

But I can confirm the homebrew built exec is arm64:

$: file csound
$: csound: Mach-O 64-bit executable arm64

and

$: file lib_jcsound6.jnilib
$: lib_jcsound6.jnilib: Mach-O 64-bit bundle arm64

and I've symlinked to them in /Library/Java/Extensions