No openjdk development package found, please install JDK package,

NobinPegasus

Member
Joined
Feb 4, 2022
Messages
53
Reaction score
0
Credits
471
I have my java installed and linked.
Still when I run another config it shows no openjdk development package found.
Code:
pegasus@pegasus:~/Documents/perf-6.4.0$ make -C tools/perf/
make: Entering directory '/home/pegasus/Documents/perf-6.4.0/tools/perf'
  BUILD:   Doing 'make -j16' parallel build
Makefile.config:1105: No openjdk development package found, please install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel

  INSTALL libsubcmd_headers
  INSTALL libapi_headers
  INSTALL libperf_headers
  INSTALL libsymbol_headers
  GEN     python/perf.cpython-312-x86_64-linux-gnu.so
  INSTALL libbpf_headers
  CC      scripts/python/Perf-Trace-Util/Context.o
In file included from /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/Python.h:44,
                 from scripts/python/Perf-Trace-Util/Context.c:14:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/object.h: In function ‘Py_SIZE’:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  233 |     PyVarObject *var_ob = _PyVarObject_CAST(ob);
      |     ^~~~~~~~~~~
In file included from /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/Python.h:53:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/cpython/longintrepr.h: In function ‘_PyLong_CompactValue’:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  121 |     Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK);
      |     ^~~~~~~~~~
  CC      util/scripting-engines/trace-event-python.o
In file included from /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/Python.h:44,
                 from util/scripting-engines/trace-event-python.c:22:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/object.h: In function ‘Py_SIZE’:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  233 |     PyVarObject *var_ob = _PyVarObject_CAST(ob);
      |     ^~~~~~~~~~~
cc1: all warnings being treated as errors
In file included from /home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/Python.h:53:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/cpython/longintrepr.h: In function ‘_PyLong_CompactValue’:
/home/linuxbrew/.linuxbrew/opt/[email protected]/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  121 |     Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK);
      |     ^~~~~~~~~~
make[5]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:98: scripts/python/Perf-Trace-Util/Context.o] Error 1
make[4]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:140: python/Perf-Trace-Util] Error 2
make[3]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:140: scripts] Error 2
make[3]: *** Waiting for unfinished jobs....
^Cmake[5]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:98: util/scripting-engines/trace-event-python.o] Interrupt
make[4]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:140: scripting-engines] Interrupt
interrupted
make[3]: *** [/home/pegasus/Documents/perf-6.4.0/tools/build/Makefile.build:140: util] Interrupt
make[2]: *** [Makefile.perf:675: perf-in.o] Interrupt
make[2]: *** [Makefile.perf:650: python/perf.cpython-312-x86_64-linux-gnu.so] Interrupt
make[1]: *** [Makefile.perf:235: sub-make] Interrupt
make: *** [Makefile:70: all] Interrupt

pegasus@pegasus:~/Documents/perf-6.4.0$ java --version
openjdk 21.0.2 2024-01-16
OpenJDK Runtime Environment (build 21.0.2+13-58)
OpenJDK 64-Bit Server VM (build 21.0.2+13-58, mixed mode, sharing)
pegasus@pegasus:~/Documents/perf-6.4.0$ javac --version
javac 21.0.2
 


Is the build system looking for a specific version of the openjdk? From the example in the error message it looks like it's looking for JDK 8.
Maybe try installing the specified version of the JDK?
Otherwise, you may have to hack the makefile, or some of the other files in the build system to get it to accept JDK V21.

Another thought occurs to me - was there anything like a configure script alongside the makefile? If so, perhaps try running ./configure before running make. That will check your build environment and will modify any ancilliary build files, to include any library paths, or paths to other external dependencies (like the JDK), in order to sucessfully build the program on your machine.
If there is a configure script - it should be able to pick up the correct path to the JDK and will set up whatever paths it needs. Again, that's only IF there is a configure script in the source code for that program.

What is this "perf" that you're trying to build?
Where did you get it from?
If we can see what it is, and where you got it from - we can take a look at whatever files are in the sources and help you get to the bottom of the problem.
At the moment, I'm just blindly stabbing in the dark!
 

Members online


Top