I have installed this library.
[root@localhost ~]# yum list | grep Xtst libXtst.i386 1.0.1-3.1 installed libXtst-devel.i386 1.0.1-3.1 installed But the error still exists. ## Starting jdk /home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/unpackexe/unpack.o: In function `unpacker::redirect_stdio()': /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp:5186: warning: the use of `tempnam' is dangerous, better use `mkstemp' /usr/bin/ld: BFD 2.17.50.0.6-20.el5_8.3 20061020 internal error, aborting at ../../bfd/elflink.c line 6841 in elf_link_check_versioned_symbol /usr/bin/ld: Please report this bug. collect2: ld returned 1 exit status gmake[2]: *** [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/unpackexe/unpack200] Error 1 gmake[1]: *** [launchers-only] Error 2 make: *** [jdk-only] Error 2 Do I need to upgrade Xtst related library? Seems CentOS 5.9 doesn't have the rpm package. ------------------ ???????? ------------------ ??????: "David Holmes";<david.hol...@oracle.com>; ????????: 2016??5??11??(??????) ????5:43 ??????: ""<31731...@qq.com>; "build-dev"<build-dev@openjdk.java.net>; ????: Re: ?????? ?????? An issue of building openjre on CentOS 5.9 On 11/05/2016 5:22 PM, 31731705 wrote: > I'm building openjdk8 so I use openjdk7 as a bootstrap JDK, and my > computer runs CentOS 5.9, and actually I already install X11. > > [root@localhost openjdk]# yum list | grep X11 > libX11.i386 1.0.3-11.el5_7.1 > installed > libX11-devel.i386 1.0.3-11.el5_7.1 > installed > > Do you mean this X11 library is too old? No but your system and the system tools, like ldd, are a bit old. For X11 you also need libxtst-dev https://launchpad.net/ubuntu/precise/+package/libxtst-dev which is what caused your X11 error. David > > > ------------------ ???????? ------------------ > *??????:* "David Holmes";<david.hol...@oracle.com>; > *????????:* 2016??5??11??(??????) ????3:17 > *??????:* ""<31731...@qq.com>; "build-dev"<build-dev@openjdk.java.net>; > *????:* Re: ?????? An issue of building openjre on CentOS 5.9 > > Are you building JDK 8 or 9? Your system is very old - too old for 9. > > If you check the build readme's they should tell you about installing > the X11 developer libraries. > > I can't help with a newer ldd I'm afraid. > > David > > On 11/05/2016 4:13 PM, 31731705 wrote: >> David, Thanks. >> >> I installed following two compilers. >> >> gcc44.i386 4.4.7-1.el5 >> installed >> gcc44-c++.i386 4.4.7-1.el5 >> installed >> >> And then set CC and CXX two environment variables, >> >> export CC=gcc44 >> export CXX=g++44 >> >> and run bash ./configure agagin. >> >> > -------------------------------------------------------------------------------------------------------------------------- >> Configuration summary: >> * Debug level: release >> * JDK variant: normal >> * JVM variants: server >> * OpenJDK target: OS: linux, CPU architecture: x86, address length: 32 >> >> Tools summary: >> * Boot JDK: java version "1.7.0_101" OpenJDK Runtime Environment >> (rhel-2.6.6.1.el5_11-i386 u101-b00) OpenJDK Server VM (build 24.95-b01, >> mixed mode) (at /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101) >> * C Compiler: gcc44 (GCC) 4.4.7 20120313 (Red Hat-1) version >> 4.4.7-1) (at /usr/bin/gcc44) >> * C++ Compiler: g++44 (GCC) 4.4.7 20120313 (Red Hat-1) version >> 4.4.7-1) (at /usr/bin/g++44) >> >> Build performance summary: >> * Cores to use: 4 >> * Memory limit: 16133 MB >> * ccache status: not installed (consider installing) >> > --------------------------------------------------------------------------------------------------------------------------- >> >> Now configure has found new compilers, but make said another issue, >> >> > ----------------------------------------------------------------------------------------------------------------------------- >> > /home/rong/openjdk/jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_sys.c:80: >> warning: comparison is always true due to limited range of data type >> /usr/bin/ld: cannot find -lXtst >> collect2: ld returned 1 exit status >> gmake[2]: *** >> > [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/lib/i386/libawt_xawt.so] >> Error 1 >> gmake[2]: *** Waiting for unfinished jobs.... >> gmake[1]: *** [libs-only] Error 2 >> make: *** [jdk-only] Error 2 >> > -------------------------------------------------------------------------------------------------------------------------------- >> >> So I build an symbol link to solve this issue. >> >> ln -s /usr/lib/libXtst.so.6.1.0 /usr/lib/libXtst.so >> >> However another linking error occured, >> >> > ------------------------------------------------------------------------------------------------------------------------- >> ## Starting jdk >> > /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp: >> In member function ??void unpacker::read_file_header()??: >> > /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp:733: >> warning: comparison between signed and unsigned integer expressions >> > /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp: >> In member function ??void cpool::init(unpacker*, int*)??: >> > /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp:985: >> warning: comparison between signed and unsigned integer expressions >> > /home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/unpackexe/unpack.o: >> In function `unpacker::redirect_stdio()': >> > /home/rong/openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/unpack.cpp:5186: >> warning: the use of `tempnam' is dangerous, better use `mkstemp' >> /usr/bin/ld: BFD 2.17.50.0.6-20.el5_8.3 20061020 internal error, >> aborting at ../../bfd/elflink.c line 6841 in > elf_link_check_versioned_symbol >> >> /usr/bin/ld: Please report this bug. >> >> collect2: ld returned 1 exit status >> gmake[2]: *** >> > [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/unpackexe/unpack200] >> Error 1 >> gmake[1]: *** [launchers-only] Error 2 >> make: *** [jdk-only] Error 2 >> > ---------------------------------------------------------------------------------------------------------------------------- >> >> I think if there is newer linking tool ld44 like gcc44 and g++44 but I >> cannot find it. >> >> Do you have any suggestion? >> >> ------------------ ???????? ------------------ >> *??????:* "David Holmes";<david.hol...@oracle.com>; >> *????????:* 2016??5??11??(??????) ????10:07 >> *??????:* ""<31731...@qq.com>; "build-dev"<build-dev@openjdk.java.net>; >> *????:* Re: An issue of building openjre on CentOS 5.9 >> >> On 11/05/2016 11:56 AM, 31731705 wrote: >>> Can anybody help me to check this compile error? >>> >>> >> > ------------------------------------------------------------------------------------------------------------------------ >>> OS is CentOS 5.9 >>> >>> >>> [root@localhost openjdk]# uname -a >>> Linux localhost.localdomain 2.6.18-348.el5PAE #1 SMP Tue Jan 8 >> 18:39:56 EST 2013 i686 i686 i386 GNU/Linux >>> [root@localhost openjdk]# cat /etc/redhat-release >>> CentOS release 5.9 (Final) >>> >>> >>> >> > ---------------------------------------------------------------------------------------------------------------------- >>> Configuration summary: >>> * Debug level: release >>> * JDK variant: normal >>> * JVM variants: server >>> * OpenJDK target: OS: linux, CPU architecture: x86, address length: 32 >>> >>> >>> Tools summary: >>> * Boot JDK: java version "1.7.0_101" OpenJDK Runtime Environment >> (rhel-2.6.6.1.el5_11-i386 u101-b00) OpenJDK Server VM (build 24.95-b01, >> mixed mode) (at /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101) >>> * C Compiler: gcc (GCC) 4.1.2 20080704 (Red Hat-54) version >> 4.1.2-54) (at /usr/bin/gcc) >>> * C++ Compiler: g++ (GCC) 4.1.2 20080704 (Red Hat-54) version >> 4.1.2-54) (at /usr/bin/g++) >> >> Your gcc is too old to support the compiler flags that are being used. >> >> David >> ------ >> >>> >>> Build performance summary: >>> * Cores to use: 4 >>> * Memory limit: 16133 MB >>> * ccache status: not installed (consider installing) >>> >>> >>> WARNING: The result of this configuration has overridden an older >>> configuration. You *should* run 'make clean' to make sure you get a >>> proper build. Failure to do so might result in strange build problems. >>> >>> >>> >>> >> > ------------------------------------------------------------------------------------------------------------------------ >>> Below is the error information. >>> >>> >>> /home/rong/openjdk/jdk/src/solaris/native/sun/nio/ch/IOUtil.c: In >> function ??Java_sun_nio_ch_IOUtil_fdLimit??: >>> /home/rong/openjdk/jdk/src/solaris/native/sun/nio/ch/IOUtil.c:132: >> warning: comparison of unsigned expression < 0 is always false >>> cc1: error: unrecognized command line option > "-Wno-error=unused-parameter" >>> cc1: error: unrecognized command line option > "-Wno-error=unused-parameter" >>> gmake[2]: *** >> > [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/libsctp/SctpNet.o] >> Error 1 >>> gmake[2]: *** Waiting for unfinished jobs.... >>> gmake[2]: *** >> > [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/libsctp/SctpChannelImpl.o] >> Error 1 >>> cc1: error: unrecognized command line option > "-Wno-error=unused-parameter" >>> gmake[2]: *** >> > [/home/rong/openjdk/build/linux-x86-normal-server-release/jdk/objs/libsctp/SctpServerChannelImpl.o] >> Error 1 >>> gmake[1]: *** [libs-only] Error 2 >>> make: *** [jdk-only] Error 2 >>> >>> >>> >>> >>> Any suggestions are welcome. >>>