question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot compile with openjdk17 and gcc[89] with Intel opencl.

See original GitHub issue

Describe the bug Trying to compile on Centos 7 with opencl support on devtoolset-8 and devtoolset-9 :

How To Reproduce

 make jdk-11-plus BACKEND=opencl
...
INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) @ tornado-benchmarks ---
-- Looking for CL_VERSION_2_2 - found
-- Found OpenCL: /usr/lib64/libOpenCL.so (found version "2.2")
[INFO] Building jar: /d00/local/tornado/tornadovm/benchmarks/target/tornado-benchmarks-0.11-dev-c61f388.jar
-- Found JNI: /d00/gaia/jdk17/lib/libjawt.so
-- Configuring done
-- Generating done
-- Build files have been written to: /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake
[INFO]
[INFO] --- cmake-maven-plugin:3.7.0-b2:compile (cmake-compile) @ tornado-drivers-opencl-jni ---
[INFO] Configured to use native CMake
gmake[1]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/d00/local/tornado/cmake-3.10.1/bin/cmake -H/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources -B/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake --check-build-system CMakeFiles/Makefile.cmake 0
/d00/local/tornado/cmake-3.10.1/bin/cmake -E cmake_progress_start /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles/progress.marks
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/Makefile2 all
gmake[2]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/tornado-opencl.dir/build.make CMakeFiles/tornado-opencl.dir/depend
gmake[3]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
cd /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake && /d00/local/tornado/cmake-3.10.1/bin/cmake -E cmake_depends "Unix Makefiles" /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake/CMakeFiles/tornado-opencl.dir/DependInfo.cmake --color=
Scanning dependencies of target tornado-opencl
gmake[3]: Leaving directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
/opt/rh/devtoolset-9/root/usr/bin/gmake -f CMakeFiles/tornado-opencl.dir/build.make CMakeFiles/tornado-opencl.dir/build
gmake[3]: Entering directory '/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/cmake'
[  9%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLCommandQueue.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++  -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux  -O3 -fpermissive -export-dynamic -fPIC  -O3 -DNDEBUG -fPIC   -o CMakeFiles/tornado-opencl.dir/source/OCLCommandQueue.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp: In function ‘void Java_uk_ac_manchester_tornado_drivers_opencl_OCLCommandQueue_clEnqueueWaitForEvents(JNIEnv*, jclass, jlong, jlongArray)’:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:145:97: warning: ‘cl_int clEnqueueWaitForEvents(cl_command_queue, cl_uint, _cl_event* const*)’ is deprecated [-Wdeprecated-declarations]
  145 |     cl_int status = clEnqueueWaitForEvents((cl_command_queue) queue_id, len, (cl_event *) events);
      |                                                                                                 ^
In file included from /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:30:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include/CL/cl.h:1891:1: note: declared here
 1891 | clEnqueueWaitForEvents(cl_command_queue  command_queue,
      | ^~~~~~~~~~~~~~~~~~~~~~
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:145:97: warning: ‘cl_int clEnqueueWaitForEvents(cl_command_queue, cl_uint, _cl_event* const*)’ is deprecated [-Wdeprecated-declarations]
  145 |     cl_int status = clEnqueueWaitForEvents((cl_command_queue) queue_id, len, (cl_event *) events);
      |                                                                                                 ^
In file included from /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLCommandQueue.cpp:30:
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include/CL/cl.h:1891:1: note: declared here
 1891 | clEnqueueWaitForEvents(cl_command_queue  command_queue,
      | ^~~~~~~~~~~~~~~~~~~~~~
[ 18%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLContext.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++  -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux  -O3 -fpermissive -export-dynamic -fPIC  -O3 -DNDEBUG -fPIC   -o CMakeFiles/tornado-opencl.dir/source/OCLContext.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLContext.cpp
/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLContext.cpp:95:7: warning: extra tokens at end of #endif directive [-Wendif-labels]
   95 | #endif()
      |       ^
[ 27%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLDevice.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++  -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux  -O3 -fpermissive -export-dynamic -fPIC  -O3 -DNDEBUG -fPIC   -o CMakeFiles/tornado-opencl.dir/source/OCLDevice.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLDevice.cpp
[ 36%] Building CXX object CMakeFiles/tornado-opencl.dir/source/OCLEvent.cpp.o
/opt/rh/devtoolset-9/root/usr/bin/c++  -Dtornado_opencl_EXPORTS -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source -I/d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/headers/opencl/3.0/include -I/d00/gaia/jdk17/include -I/d00/gaia/jdk17/include/linux  -O3 -fpermissive -export-dynamic -fPIC  -O3 -DNDEBUG -fPIC   -o CMakeFiles/tornado-opencl.dir/source/OCLEvent.cpp.o -c /d00/local/tornado/tornadovm/drivers/opencl-jni/target/linux-amd64-release/sources/source/OCLEvent.cpp
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] [options] system modules path not set in conjunction with -source 11
[WARNING] [options] --add-opens has no effect at compile time
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] [options] module name in --add-exports option not found: tornado.annotation
[WARNING] [options] module name in --add-exports option not found: tornado.drivers.ptx
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] using incubating module(s): jdk.incubator.foreign,jdk.incubator.vector
[WARNING] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/phases/TornadoTaskSpecialisation.java:[95,18] [deprecation] isAccessible() in AccessibleObject has been deprecated
[INFO] 8 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/OCLArchitecture.java:[45,7] error: OCLArchitecture is not abstract and does not override abstract method getFeatures() in Architecture
[INFO] 1 error
[INFO] -------------------------------------------------------------

...

INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for tornado 0.11-dev:
[INFO]
[INFO] tornado ............................................ SUCCESS [  1.021 s]
[INFO] tornado-api ........................................ SUCCESS [  3.393 s]
[INFO] tornado-runtime .................................... SUCCESS [  2.587 s]
[INFO] tornado-matrices ................................... SUCCESS [  0.985 s]
[INFO] tornado-drivers .................................... SUCCESS [  0.685 s]
[INFO] tornado-drivers-common ............................. SUCCESS [  0.851 s]
[INFO] tornado-drivers-opencl ............................. FAILURE [  2.008 s]
[INFO] tornado-drivers-opencl-jni ......................... SUCCESS [  5.210 s]
[INFO] tornado-examples ................................... SUCCESS [  2.870 s]
[INFO] tornado-benchmarks ................................. SUCCESS [  7.747 s]
[INFO] tornado-unittests .................................. SUCCESS [  3.850 s]
[INFO] tornado-annotation ................................. SUCCESS [  0.819 s]
[INFO] tornado-assembly ................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.291 s (Wall Clock)
[INFO] Finished at: 2021-09-17T18:22:18+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project tornado-drivers-opencl: Compilation failure
[ERROR] /d00/local/tornado/tornadovm/drivers/opencl/src/main/java/uk/ac/manchester/tornado/drivers/opencl/graal/OCLArchitecture.java:[45,7] error: OCLArchitecture is not abstract and does not override abstract method getFeatures() in Architecture
[ERROR]

Expected behavior Successful compilation.

Computing system setup (please complete the following information):

  • OS: centos7
  • OpenCL Version : 2.2 reported by the build process
  • TornadoVM commit id c61f388544396609de3b11350e307a048e610a65

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
jjfumerocommented, Nov 26, 2021

Yes, that’s right. Our maven repos only ship the releases. What you propose will also work because we rarely change the API. We haven’t scheduled any changes for the next release regarding the API, so it will keep as it is for now.

What we do internally is to use 0.13-dev (current tag as today) in our pom files and then we update accordingly with each release.

Hope this helps

1reaction
jjfumerocommented, Nov 26, 2021

Great. I will close this issue then. Feel free to open new issues if you encounter new problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenCL source file does not compile with Intel OpenCL SDK
Solved: Hi to everyone, I am facing (another) strange problem with one of my codes. I have been working since some time on...
Read more >
Installing and using OpenJDK 17 on RHEL
Run the yum command, specifying the package you want to install: Copy. Copied! $ sudo yum install java-17-openjdk · Check that the installation ......
Read more >
Cannot get my first OpenCL program to work - Stack Overflow
1 Answer 1 ... If you are using a PC with intel then your intel PC CPU is going to act as the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found