cvs commit: hints javafromscratch.txt

timothy at linuxfromscratch.org timothy at linuxfromscratch.org
Mon Jan 13 11:24:55 PST 2003


timothy     03/01/13 14:24:55

  Modified:    .        javafromscratch.txt
  Log:
  Updated to j2sdk-1.4.1. Added fixes for motif and lesstif.
  
  Revision  Changes    Path
  1.9       +41 -69    hints/javafromscratch.txt
  
  Index: javafromscratch.txt
  ===================================================================
  RCS file: /home/cvsroot/hints/javafromscratch.txt,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- javafromscratch.txt	28 Dec 2002 20:02:38 -0000	1.8
  +++ javafromscratch.txt	13 Jan 2003 19:24:55 -0000	1.9
  @@ -28,6 +28,11 @@
   at LinuxFromScratch.Org.
   
   Change Log:
  +[2002-01-13]
  +        * Updated to j2sdk-1.4.1.
  +	* Added fix so that system installed motif libraries are not linked.
  +[2003-01-03]
  +	* Added fix for lesstif to avoid conflict with gcj headers.
   [2002-12-25]
   	* Changed primary location and e-mail address.
   [2002-11-13]
  @@ -86,16 +91,8 @@
   		<http://freshmeat.net/projects/tcsh/>
   	* Sun JDK 1.4
   		<http://freshmeat.net/projects/sunjdk/>
  -	* LessTif 0.93.36
  -		<http://freshmeat.net/projects/lesstif/>
   Installation of all these packages is covered in the BLFS book at
   <http://beyond.linuxfromscratch.org>.
  -Note that I have used the following configure options to compile lesstif:
  ---enable-build-12 --enable-build-20 --enable-build-21. Without these options,
  -lesstif will not provide the proper motif version compatibility needed by the
  -JDK. You may link the JDK to libXm.so or libXm.a. If you need to include the
  -static version of the library, also add the flag --enable-static when
  -configuring lesstif. FYI, I don't build the static library.
   
   The JDK has a circular dependency and hence requires a Java compiler to compile
   some parts for bootstrapping. You can install the JDK in a non-standard location
  @@ -117,14 +114,14 @@
   	* Java 2 SDK Source <http://wwws.sun.com/software/java2/download.html>
   From Sun's website, download the following files (you will need to sign up and
   agree to SCSL):
  -	- j2sdk-1_4_0-src-scsl.zip
  -	- j2sdk-1_4_0-mozilla_headers-unix.zip
  -The last zip file is referred to as Mozilla binaries at the above URL.
  +	- j2sdk-1_4_1-src-scsl-a.zip
  +	- j2sdk-1_4_1-src-scsl-b.zip
  +	- j2sdk-1_4_1-mozilla_headers-unix.zip
  +The last zip file may be referred to as Mozilla binaries at the above URL.
   You will need to register at the website and agree to the "SUN COMMUNITY SOURCE
   LICENSE" before downloading the code. Note that the file
  -j2sdk-sec-1_4_0-src-scsl.zip is not needed (unless you have a certificate from a
  -certificate authority). j2sdk-1_4_0-motif-linux-i386.zip is not required since
  -we link against system installed lesstif (motif clone) libraries.
  +j2sdk-sec-1_4_1-src-scsl.zip is not needed (unless you have a certificate from a
  +certificate authority).
   
   Also download the patches from the primary site of this hint. Each patch should
   have a short blurb on what it does.
  @@ -148,11 +145,11 @@
   	# Extract the files and move them to where we want the jdk installed.
   	./install.sfx.$$
   	cd j2sdk${VERSION}
  -	install -d /opt/java/j2sdk-precompiled-1.4
  -	mv * /opt/java/j2sdk-precompiled-1.4
  +	install -d /opt/java/j2sdk-precompiled-1.4.1
  +	mv * /opt/java/j2sdk-precompiled-1.4.1
   
   This location is referred to as JAVA_HOME. So set the variable now.
  -	export JAVA_HOME=/opt/java/j2sdk-precompiled-1.4
  +	export JAVA_HOME=/opt/java/j2sdk-precompiled-1.4.1
   Sun's binary JDK is linked against gcc2 libraries, hence you will need the gcc2
   libraries for compatibility reasons. There are two options to get this library.
   One is to compile gcc2 (with c++) in a temporary prefix (such as /var/tmp) and
  @@ -170,43 +167,41 @@
   Compiling Java 2 SDK:
   
   Unzip all the files where you plan to compile JDK:
  -	cd $SRC &&
  -	for i in j2sdk-1_4_0-*.zip ; do unzip $i; done
  +	cd $SRC
  +
  +The source files are split into two (a & b) so just combine them together using
  +cat:
  +        cat j2sdk-1_4_1-src-scsl-{a,b}.zip > j2sdk-1_4_1-src-scsl.zip
  +
  +Now unzip the two files
  +        unzip j2sdk-1_4_1-src-scsl.zip
  +        unzip j2sdk-1_4_1-mozilla_headers-unix.zip
  +
  +Apply the patches to fix the syntax and various other issues.
  +Sun includes the Motif version it needs and compiles it. To avoid linking with
  +the system installed libXm.a we change the name of the internal motif library
  +that is built. Linking against system installed libXm leads to crashes.
   
   Now we will set some variables required by the build.
   	export ALT_BOOTDIR="$JAVA_HOME"
   
  -The following variables should point to where we unzipped the respective header
  -files.
  +The following variable should point to where mozilla headers are unzipped.
   	export ALT_MOZILLA_PATH=$SRC
   
  -Sun includes Motif headers and a static libXm lib along with the source, but
  -this static library cannot be used if your glibc version is 2.3.1. As an
  -alternative, we will use lesstif headers and libraries. If you link to the
  -dynamic version of lesstif lib, you will need to preload libXm.so in mozilla to
  -avoid a core dump when loading a Java Applet. A patch for the mozilla startup
  -script is provided with the mozilla hint. If you want to avoid this, you may
  -link to the static versoon of the library. Don't apply the lesstif patch if you
  -want to use the static version.
  -
  -Also, if the JDK gets linked against system installed OpenMotif, the resulting
  -plugin crashes Mozilla whenever an applet is encountered. Check the Workarounds
  -section at the end for a possible hack (untested since I don't install
  -OpenMotif).
  -
  -On my system, I install LessTif to /usr. Point to where you have installed
  -LessTif.
  -	export ALT_MOTIF_DIR=/usr
  -
   The Makefiles set the following variable to a ridiculous value. So change it.
   	export ALT_DEVTOOLS_PATH="/usr/bin"
   
   The following two variables are not required to be set, but if set they will
   give the value you want when running "javac -version". I like to set them to
  -non-default values so that I can identify when I am switching between JDKs.
  +non-default values so that I can identify when I am switching between JDKs. Note
  +that these variables cannot contain spaces.
   	export MILESTONE="ttcompiled" &&
   	export BUILD_NUMBER=`date +%s`
   
  +We will need a root certificates file since it is not included in the source. We
  +use the cacerts file that is available with the precompiled j2sdk we installed
  +        export ALT_CACERTS_FILE=${ALT_BOOTDIR}/jre/lib/security/cacerts
  +
   Set this variable if you don't need to build the documentation and other related
   stuff. People have reported problems when compiling the documentation. It
   requires rpm and even then the documentation is not built. So be a good boy/girl
  @@ -217,12 +212,6 @@
   Env. Avoid setting that. Or if you like adventure, set it and try... then do a
   make clobber and come back to this point.
   
  -This one took me a long time to figure out. After getting some build errors
  -related to pthread variables, as per the standard practice I tried setting
  -LDFLAGS, but continued getting the same errors; grepping thru the make files
  -gave me the following variable.
  -	export OTHER_LDFLAGS="-lpthread"
  -
   The compilation will go awry if the following variables are set, so unset them.
   	unset JAVA_HOME
   	unset CLASSPATH
  @@ -232,7 +221,8 @@
   second phase (j2se build) it uses OTHER_C{,XX}FLAGS. Setting CFLAGS gave me core
   dumps during the second phase of the build. I unset C{,XX}FLAGS and set
   OTHER_C{,XX}FLAGS to "-march=i686 -fomit-frame-pointer -s". Also unset the
  -LDFLAGS variable (same reason).
  +LDFLAGS variable (same reason). If you set any of these variables, the build
  +WILL fail!!!
   
   Using any optimizations causes miscompilation when using gcc3, especially in
   java.lang.Math class. Thanks to a Gentoo user Bernhard Stegmaier
  @@ -248,6 +238,8 @@
                   sed -e "s:\-O3:\-march=i686 \-fomit\-frame\-pointer \-s:g" \
   			$i.orig > $i
           done
  +For test case please refer to:
  +http://archive.linuxfromscratch.org/mail-archives/blfs-support/2002/11/0247.html
   
   If you would like make to output verbose messages instead of the boring
   "Compiling xxx..." messages, set the following variable:
  @@ -257,9 +249,6 @@
   insane:) Hence the following variable has to be set to affirm that you really
   are insane:))
   	export INSANE=true
  -Alternatively, if you are a little saner, you can instead apply the patch to
  -disable sanity check. Only one is required but doing both doesn't cause any
  -harm.
   
   The build also looks for a Redhat Release 6.1. Though the error is not show
   stopping, if you want you can make a file for the duration of the build. This is
  @@ -297,11 +286,11 @@
   "make clobber" in $SRC/control/make to go back to the beginning.
   
   The built SDK and JRE are in the following directory.
  -	cd $SRC/control/build/linux-i386
  +	cd $SRC/control/build/linux-i?86
   
   The j2sdk-image is the built JDK, congrats:)
   	mkdir -p /opt/java &&
  -	cp -a j2sdk-image /opt/java/j2sdk-1.4.0-tt &&
  +	cp -a j2sdk-image /opt/java/j2sdk-1.4.1-tt &&
   	cd /opt/java &&
   	ln -nsf j2sdk-1.4.0-tt j2sdk
   
  @@ -343,23 +332,6 @@
   * Sam Halliday reported that if the partition where you are compiling runs out
     space, the build gives some very strange errors rather than the usual "Out of
     disk space" error.
  -* Gentoo users have had problems with the compiled j2sdk with openmotif
  -  installed. So please remove openmotif from your system before compiling. An
  -  untested alternative is to install the static version of lesstif with a
  -  different prefix (e.g. /opt/lesstif) and use that prefix as the ALT_MOTIF_DIR.
  -  Also to prevent jdk linking against the OpenMotif libs, rename the motif libs
  -  for the duration of jdk comoile.
  -	for lib in /usr/{,X11R6}/lib/libXm.{a,so}
  -	do
  -		mv $lib $lib.tmp
  -	done
  -  Remember to rename the files after compiling j2sdk else other packages won't
  -  be able to link against OpenMotif.
  -	for lib in /usr/{,X11R6}/lib/libXm.{a,so}
  -	do
  -		mv $lib.tmp $lib
  -	done
  -  It is advisable to not use the dynamic lesstif patch for this situation.
   
   CLASSPATH script:
   
  
  
  
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe hints' in the subject header of the message



More information about the hints mailing list