dependabot[bot] on bundler
dependabot[bot] on bundler
Bump rack from 2.1.1 to 2.2.6.2… (compare)
OK I got my Apple Mac Pro with M1 and have instructions for building/patching aparapi
@freemo:qoto.org let me know if you want me to send you the libaparapi_aarch64.dylib
@mgroth0 pull this repo from git and follow the README.md.
https://github.com/grfrost/aparapi-m1
Should take 10 minutes tops
@freemo the README.md also contains the patch for NativeLoader to load the aarch64 dylib
@mandeepsingh-private you might be able to rebuild and test using
https://github.com/grfrost/aparapi-m1
Build and run works for me on Apple M1 and linux x64 platforms. So hopefully it will find you NVidia CUDA OpenCL lib....
@freemo I had a crash on linux. Tracked it to this.
The extra %s in the fprintf was causing grief ;)
diff --git a/src/cpp/JNIExceptions.h b/src/cpp/JNIExceptions.h
index bcb44a0..3ff72f3 100644
--- a/src/cpp/JNIExceptions.h
+++ b/src/cpp/JNIExceptions.h
@@ -51,7 +51,7 @@ public:
void printError() {
if(_message != "") {
- fprintf(stderr, "!!!!!!! %s failed %s\n", message());
+ fprintf(stderr, "!!!!!!! failed %s\n", _message.c_str());^M
}
}
Actually we may want to check the handling of code that uses the pattern return std::string('"....").c_str()
this is dangerous as we are returning a pointer from a temporary object.
javac
was not found. So I changed the line cmake --build build --target javac --target jar
to cmake --build build --target /usr/bin/javac --target jar
cmake --build build --target /usr/bin/javac --target jar
[ 5%] Building CXX object CMakeFiles/aparapi_aarch64.dir/syncleus/aparapi-native/src/cpp/CLHelper.cpp.o
In file included from /Users/matthewgroth/registered/ide/aparapi-builder-cmake/syncleus/aparapi-native/src/cpp/CLHelper.cpp:55:
In file included from /Users/matthewgroth/registered/ide/aparapi-builder-cmake/syncleus/aparapi-native/src/cpp/CLHelper.h:57:
/Users/matthewgroth/registered/ide/aparapi-builder-cmake/syncleus/aparapi-native/src/cpp/Common.h:77:10: fatal error: 'jni.h' file not found
#include <jni.h>
^~~~~~~
1 error generated.
make[3]: *** [CMakeFiles/aparapi_aarch64.dir/syncleus/aparapi-native/src/cpp/CLHelper.cpp.o] Error 1
make[2]: *** [CMakeFiles/aparapi_aarch64.dir/all] Error 2
make[1]: *** [CMakeFiles/jar.dir/rule] Error 2
make: *** [jar] Error 2
cmake --build build --target javac --target jar
is correct. You may need to edit the CMakeLists.txt to point JAVA_HOME (in the CMakeLists.txt) to your JDK.
We need JAVA_HOME to point to a JDK so we can find javac, java and jar . Also ${JAVA_HOME}/include is where we find jni.h. The error.
Once you change JAVA_HOME (or anything in CMakeLists.txt)
cmake build
cmake --build build --target javac --target jar
The first line rescans the CMakeLists.txt to create the make/ninja files.
@freemo . I have some patches collected here
https://github.com/grfrost/aparapi-builder-cmake/tree/main/patches
Mostly they suppress clang warnings, some are potential access violations I found running valgrind. The main fix https://github.com/grfrost/aparapi-builder-cmake/blob/main/patches/aparapi-jni.patch allows Aparapi to build on Apple M1 (arch64) machines. Sorry I have not pushed this back to mainline. I moved away from using Maven a long time ago, This project builds from your maven repos using cmake... I know slightly weird for Java but saves me from more grey hairs.