Error when building openjdk-7 on Ubuntu 16.04
Zelong Gong
841057341 at qq.com
Sun May 1 13:15:25 UTC 2022
zelong at zelong-ThinkPad-T430:/home/sdb/jdk7u-jdk$ make all
STATS: LIBRARY=verify, PRODUCT=java, OPTIMIZATION_LEVEL=HIGHER
Rebuilding ../../../build/linux-amd64/lib/amd64/libverify.so because of ../../../build/linux-amd64/tmp/java/verify/obj64/.files_compiled mapfile-vers
/usr/bin/gcc -g -O2 -fno-strict-aliasing -fPIC -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer -D_LITTLE_ENDIAN -DNDEBUG -DARCH='"amd64"' -Damd64 -DLINUX -DRELEASE='"1.7.0-internal"' -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -D_LP64=1 -I. -I../../../build/linux-amd64/tmp/java/verify/CClassHeaders -I../../../src/solaris/javavm/export -I../../../src/share/javavm/export -Xlinker -O1 -Xlinker -version-script=mapfile-vers -Wl,--hash-style=both -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$ORIGIN -Xlinker -z -Xlinker defs -L../../../build/linux-amd64/lib/amd64 -Wl,-soname=libverify.so -shared -mimpure-text -o ../../../build/linux-amd64/lib/amd64/libverify.so ../../../build/linux-amd64/tmp/java/verify/obj64/check_code.o ../../../build/linux-amd64/tmp/java/verify/obj64/check_format.o -L../../../build/linux-amd64/lib/amd64/server -ljvm -lc
gcc: error: unrecognized command line option '-mimpure-text'
make[2]: *** [../../common/Library.gmk:255: ../../../build/linux-amd64/lib/amd64/libverify.so] Error 1
make[2]: Leaving directory '/home/sdb/jdk7u-jdk/make/java/verify'
make[1]: *** [Makefile:67: all] Error 1
make[1]: Leaving directory '/home/sdb/jdk7u-jdk/make/java'
make: *** [Makefile:250: all] Error 1
It seems that -mimpure-text is supported only Solaris operating system.
The gcc preinstalled on Ubuntu 16.04 is:
zelong at zelong-ThinkPad-T430:/home/sdb/jdk7u-jdk$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Anyone knows how to fix the build error and build openjdk7 successfully? Or is there a valid ppa for me to install openjdk7 on my Ubuntu 16.04?
More information about the build-dev
mailing list