emscripten
emscripten copied to clipboard
Emconfigure fails while configuring openjdk
Bug description: I am trying to configure openjdk (https://github.com/openjdk/jdk) with emscripten toolchain. For this purpose, I use emconfigure. However, it fails. You can find the details below. Even if I try to give host and target values, I still get the same error. What are your suggestions related to this problem? Thank you.
The output of emcc-v is given below:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.61 (67fa4c16496b157a7fc3377afd69ee0445e8a6e3)
clang version 19.0.0git (https:/github.com/llvm/llvm-project 7cfffe74eeb68fbb3fb9706ac7071f8caeeb6520)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: ...../emsdk/upstream/bin
Failing command line:
........@cagla:~/jdk$ emconfigure bash configure
The full output:
........@cagla:~/jdk$ emconfigure bash configure
configure: bash configure
configure: Configuration created at Thu Aug 15 11:10:45 +03 2024.
checking for basename... /usr/bin/basename
checking for dirname... /usr/bin/dirname
checking for file... /usr/bin/file
checking for ldd... /usr/bin/ldd
checking for echo... echo [builtin]
checking for tr... /usr/bin/tr
checking for uname... /usr/bin/uname
checking for wc... /usr/bin/wc
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for locale... /usr/bin/locale
checking for cygpath... [not found]
checking for wslpath... [not found]
checking for cmd.exe... [not found]
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking openjdk-build os-cpu... linux-x86_64
checking openjdk-build C library... gnu
checking openjdk-target os-cpu... linux-x86_64
checking openjdk-target C library... gnu
checking compilation type... native
checking for top-level directory... /home/......../jdk
checking for bash... /usr/bin/bash
checking for cat... /usr/bin/cat
checking for chmod... /usr/bin/chmod
checking for cp... /usr/bin/cp
checking for cut... /usr/bin/cut
checking for date... /usr/bin/date
checking for gdiff... [not found]
checking for diff... /usr/bin/diff
checking for expr... /usr/bin/expr
checking for find... /usr/bin/find
checking for gunzip... /usr/bin/gunzip
checking for pigz... [not found]
checking for gzip... /usr/bin/gzip
checking for head... /usr/bin/head
checking for ln... /usr/bin/ln
checking for ls... /usr/bin/ls
checking for gmkdir... [not found]
checking for mkdir... /usr/bin/mkdir
checking for mktemp... /usr/bin/mktemp
checking for mv... /usr/bin/mv
checking for gawk... [not found]
checking for nawk... /usr/bin/nawk
checking for printf... printf [builtin]
checking for rm... /usr/bin/rm
checking for rmdir... /usr/bin/rmdir
checking for sh... /usr/bin/sh
checking for sort... /usr/bin/sort
checking for tail... /usr/bin/tail
checking for gtar... [not found]
checking for tar... /usr/bin/tar
checking for tee... /usr/bin/tee
checking for touch... /usr/bin/touch
checking for xargs... /usr/bin/xargs
checking for fgrep... /usr/bin/grep -F
checking for df... /usr/bin/df
checking for git... /usr/bin/git
checking for nice... /usr/bin/nice
checking for greadlink... [not found]
checking for readlink... /usr/bin/readlink
checking for whoami... /usr/bin/whoami
checking for lsb_release... /usr/bin/lsb_release
checking for cmp... /usr/bin/cmp
checking for uniq... /usr/bin/uniq
checking for build environment type... dev, default (calculated from 'auto')
checking if custom source is suppressed (openjdk-only)... disabled, default
checking for --enable-debug... disabled, default
checking which debug level to use... release
checking which variants of the JVM to build... server
checking if absolute paths should be allowed in the build output... no, release build
checking for toolchain path...
checking for sysroot...
checking for extra path...
checking where to store configuration... in default location
checking what configuration name to use... linux-x86_64-server-release
checking for zypper... [not found]
checking for apt-get... /usr/bin/apt-get
checking for pandoc... [not found]
checking for gmake... /usr/bin/gmake
configure: Testing potential make at /usr/bin/gmake, found using gmake in PATH
configure: Using GNU make at /usr/bin/gmake (version: GNU Make 4.3)
checking if make --output-sync is supported... yes
checking for make --output-sync value... none, default
checking if find supports -delete... yes
checking what type of tar was found... gnu
checking that grep (/usr/bin/grep) -Fx handles empty lines in the pattern list correctly... yes
checking for unzip... /usr/bin/unzip
checking for zip... /usr/bin/zip
checking for greadelf... [not found]
checking for readelf... /usr/bin/readelf
checking for dot... [not found]
checking for stat... /usr/bin/stat
checking for time... time [builtin]
checking for flock... /usr/bin/flock
checking for dtrace... [not found]
checking for gpatch... [not found]
checking for patch... /usr/bin/patch
checking if date is a GNU compatible version... yes
checking for ulimit... ulimit [builtin]
checking bash version... 5.2.21
checking if bash supports pipefail... yes
checking if bash supports errexit (-e)... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for default LOG value...
checking for JMOD compression type... zip-6, default
checking if packaged modules are kept... enabled, default
checking for --with-build-user... agrena, default
checking for --with-jdk-rc-name... OpenJDK Platform, default
checking for --with-vendor-name... N/A, default
checking for --with-jdk-rc-company-name... N/A, default
checking for --with-vendor-url... https://openjdk.org/, default
checking for --with-vendor-bug-url... https://bugreport.java.com/bugreport/, default
checking for --with-vendor-vm-bug-url... https://bugreport.java.com/bugreport/crash.jsp, default
checking for --with-version-string... <none>, default
checking for --with-version-feature... 24, default
checking for --with-version-date... 2025-03-18, default
checking for --with-vendor-version-string... <disabled>, default
checking for --with-macosx-bundle-name-base... OpenJDK, default
checking for --with-macosx-bundle-id-base... net.java.openjdk-internal, default
checking for --with-macosx-bundle-build-version... 0, default
checking for version string... 24-internal-adhoc.agrena.jdk
checking for javac... /usr/bin/javac
checking for java... /usr/bin/java
configure: Found potential Boot JDK using java(c) in PATH
checking for Boot JDK... /usr/lib/jvm/jdk-22.0.2-oracle-x64
checking Boot JDK version... java version "22.0.2" 2024-07-16 Java(TM) SE Runtime Environment (build 22.0.2+9-70) Java HotSpot(TM) 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing)
checking for java [Boot JDK]... $BOOT_JDK/bin/java
checking for javac [Boot JDK]... $BOOT_JDK/bin/javac
checking for javadoc [Boot JDK]... $BOOT_JDK/bin/javadoc
checking for jar [Boot JDK]... $BOOT_JDK/bin/jar
checking if Boot JDK jar supports --date=TIMESTAMP... true
checking if Boot JDK is 32 or 64 bits... 64
checking for local Boot JDK Class Data Sharing (CDS)... yes, created
checking for Build JDK... yes, will use output dir
checking for docs-reference JDK... no, using interim javadoc for the docs-reference targets
checking what source date to use... 1723709446, from 'current' (default)
checking if we should build headless-only (no GUI)... disabled, default
checking if linker should clean out unused code (linktime-gc)..... disabled, default
checking for graphviz dot... no, cannot generate full docs
checking for pandoc... no, cannot generate full docs
checking for --enable-full-docs... disabled, from default 'auto'
checking for cacerts file... default
checking for cacerts source... default
checking for --enable-unlimited-crypto... enabled, default
checking for jni library path... default
configure: Using default toolchain gcc (GNU Compiler Collection)
configure: Will use user supplied compiler CC=/home/........./emsdk/upstream/emscripten/emcc
checking resolved symbolic links for CC... no symlink
configure: The C compiler (located as /home/........../emsdk/upstream/emscripten/emcc) does not seem to be the required gcc compiler.
configure: The result from running with --version was: ""
configure: error: A gcc compiler is required. Try setting --with-tools-dir.
configure exiting with result code 1
emconfigure: error: 'bash configure' failed (returned 1)
The error message seems to suggest that fgcc is required, but emcc is based on clang.
Perhaps file a bug with openjdk and ask them if its possible to build with clang (or emcc) instead of gcc in particular?