Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Java plugin for moz

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Mads Laursen <dossen+sgl AT daimi.au.dk>
  • To: Robin <robin AT kallisti.2y.net>
  • Cc: "Sergey A. Lipnevich" <sergeyli AT pisem.net>, sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Java plugin for moz
  • Date: Tue, 6 Aug 2002 14:03:45 +0200

On 06/08/02 23.42, Robin wrote:
> On Tue, Aug 06, 2002 at 07:31:13AM -0400, Sergey A. Lipnevich wrote:
> > If you compiled mozilla with gcc 3, I think it should see the plug-in
> > and crash when you try to use it. That's what happens with flash plug-in
> > that only compiles with gcc 2 anyway :-(. Currently, pre-packaged Java 2
> > SDK is compiled with gcc 2.
> After a bit of mucking around, I found it saying:
> LoadPlugin: failed to initialize shared library
> /usr/lib/j2sdk1.3.1/jre/plugin/i386/mozilla/javaplugin_oji.so
> [/usr/lib/j2sdk1.3.1/jre/plugin/i386/mozilla/javaplugin_oji.so:
> undefined symbol: __vt_17nsGetServiceByCID]
> which does look like a GCC3 thing. Is there any way around this? It
> would be nice to get this, and flash, working.
>
> BTW, when is the move to the next GCC likely to be made?
I came across some info[1] on mozilla/java and other plugins with gcc 3,
but due to work and stuff I have not been able to find the time to
test it/hack the spells. But at least I would like to make it
available to the list.

[1] From linux from scratch[2].
[2] I'm sure they have more stuff we could learn from.

/dossen
Received: from horse03.daimi.au.dk (horse03 [130.225.18.243])
by daimi.au.dk (8.11.6/8.11.6) with ESMTP id g6VEW2106281
for <dossen AT daimi.au.dk>; Wed, 31 Jul 2002 16:32:02 +0200
Received: (from dossen@localhost)
by horse03.daimi.au.dk (8.11.6/8.11.6) id g6VEW2H20173
for dossen AT daimi.au.dk; Wed, 31 Jul 2002 16:32:02 +0200
Date: Wed, 31 Jul 2002 16:32:02 +0200
From: Mads Laursen <dossen AT daimi.au.dk>
To: Mads Laursen <dossen AT daimi.au.dk>
Subject: mozilla/j2sdk stuff
Message-ID: <20020731143202.GA18773 AT daimi.au.dk>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="dDRMvlgZJXvWKvBx"
Content-Disposition: inline
User-Agent: Mutt/1.4i
X-Virus-Scanned: by amavisd-milter (http://amavis.org/)


--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

http://hints.linuxfromscratch.org/hints/mozilla.txt

http://hints.linuxfromscratch.org/hints/javafromscratch.txt

--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mozilla.txt"

TITLE: Compiling Mozilla and Installing Plugins

LFS VERSION: All

AUTHOR: Tushar Teredesai <Tush AT Yahoo.Com>

SYNOPSIS:
How to compile 'Mozilla from Scratch' and install some relevant
plugins.

HINT:

Change Log:
[2002-06-20]
* Changed the CFLAGS I use.
[2002-06-19]
* Added alternate site for hint.
[2002-06-17]
* Added "make install" option.
* Added MOZ_PLUGIN_PATH.
* Added warning for GTK2 option.
[2002-05-14]
* Added explanations for configure options.
* Added options to build only the browser.
[2002-04-28]
* Add gtk2 toolkit option.
* Added a section to list of relevant URLs.
[2002-04-24]
* Added hack to ignore autocomplete=off attribute used by some
websites.
* Added some useful preference settings.
[2002-04-22]
* Fixed some typos, again!
* Renamed hint to mozilla.
* Added warning for CFLAGS, CXXFLAGS.
* Added warning for QT and XLib toolkits.
* Added info about pre-compiled distributions.
* Added MOZILLA_FIVE_HOME to .mozconfig
* Added instructions to copy man page, header files and idl files.
[2002-03-28]
* Fixed some typos.
* Environment variable to speed up Mozilla.
* First version as mozcompile.

Pre-requisites:
* X 4.2.0
* GLib & GTK >= 1.2 (<2.0)
* libIDL >= 0.6.3 && < 0.7
* JPEG, PNG, MNG Libraries (latest versions)

Packages to download:
* Info Zip >= 2.3 <http://www.info-zip.org/Zip.html>
* iCal <http://www.softwarestudio.org/libical/> [Optional]
* Mozilla:) <http://www.mozilla.org/releases>
* Mozilla SpellChecker <http://spellchecker.mozdev.org/source.html>

Alternate site:
This hint is also available at <http://www.geocities.com/tush/lfs>. The latest
version of the hint is available there.

I also have a patch at the site that enables the password hack mentioned below
and enables compilation of spellchecker.

Installing X:

I have X-4.2.0. If possible use the latest version, there have been some
problems when building the Xft support for some X versions. See the BLFS book
on
installing X.


Installing GTK:

Installing GTK 1.2 and its dependencies (GLib-1.2). Mozilla has a new option
to
build for GTK 2.0 but I had problems compiling mozilla for GTK2. YMMV.

The installation is simply the regular installation dance routine:
./configure --help
./configure "$OPTIONS" && make && make install


Installing libIDL:

libIDL is a part of ORBIT (Orbit1, not Orbit2). If you have not installed
ORBIT1, download libIDL from mozilla's ftp site.


Installing Image Libraries (JPEG, PNG, MNG):

See the BLFS book for installation instructions. Get the latest versions.


Installing Zip:

There are additional options, check out the unix/Makefile. I use:
make -f unix/Makefile prefix=/usr generic_gcc &&
make -f unix/Makefile prefix=/usr install


Installing libical:

libical is only required if you want to play around with calendar. I had
problems building Mozilla calendar, YMMV. Also, mozilla requires the libical
that is available from mozilla's CVS.
./configure --prefix=/usr --disable-static &&
make &&
make install


Compiling Mozilla:

One option is to pass the options to configure. Alternatively, these options
can
be placed in a file .mozconfig that is read by Mozilla's configure script. I
prefer latter method (useful for recompiles).

First we will set the flags so that we can build a distribution rather than
having to run Mozilla from the directory we compiled.
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
export MOZ_INTERNAL_LIBART_LGPL=1
export MOZ_CALENDAR=1
The third export specifies that you accept the LGPL License for libart. This
is
required for SVG support and is recommended. The fourth export is required
only
if you want to build the calendar interface (experimental).

Set CFLAGS and CXXFLAGS based on your needs. It is reported that Mozilla
crashes
on startup if -fomit-frame-pointer is used. I have had no problems setting
both
CFLAGS and CXXFLAGS to "-O3 -march=i686 -fforce-addr -funroll-loops
-frerun-cse-after-loop -frerun-loop-opt -falign-functions=4". YMMV.

If you would like to compile the spellchecker, you will need to download the
spellchecker source code via cvs. First the login.
cvs -d :pserver:guest AT mozdev.org:/cvs login
The password is guest. Now download the spellchecker code.
cvs -d :pserver:guest AT mozdev.org:/cvs co spellchecker/spellcheck
Move the spellcheck directory to the extensions directory of mozilla
mv spellchecker/spellcheck $MOZSRC/extensions

First try
cd $MOZSRC &&
./configure --help
to understand all the options that are available to you.

Now create the .mozconfig file containing the options you want. The .mozconfig
file can be in various locations (home directory of the user compiling, or in
a
hierarchy above the mozilla source directory). Since I use MSB's package user
hint, I prefer to keep the file in the home directory.

There are options that you can use to install just the browser and skip all
the
additional baggage that comes along with mozilla. These are some of the common
options along with short descriptions.

Mozilla now supports the "make install" option:) I prefer installing mozilla
in
one of the standard locations. Since GNOME is heavily depended on mozilla, I
install it with the same prefix as gnome.
echo ac_add_options --prefix=/opt/gnome >> .mozconfig

The --enable-default-mozilla-five-home is not relevant anymore since mozilla
installs in the standard locations.

Redundant but here for the sake of completeness:)
echo ac_add_options --with-x >> .mozconfig

Use the packages we have installed as against using the ones available with
mozilla.
echo ac_add_options --with-system-jpeg >> .mozconfig
echo ac_add_options --with-system-zlib >> .mozconfig
echo ac_add_options --with-system-png >> .mozconfig
echo ac_add_options --with-system-mng >> .mozconfig

Build the calendar client (optional).
echo ac_add_options --enable-calendar >> .mozconfig

Disable the mail and news client (optional).
echo ac_add_options --disable-mailnews >> .mozconfig

Disable LDAP Support, recommended if mail is disabled.
echo ac_add_options --disable-ldap >> .mozconfig

Enable the Xft support.
echo ac_add_options --enable-xft >> .mozconfig

Enable the Personal Security Manager to enable SSL connections.
echo ac_add_options --enable-crypto >> .mozconfig

Disable all debugging options and enable all optimization options. Pick and
choose.
echo ac_add_options --disable-jsd >> .mozconfig
echo ac_add_options --disable-accessibility >> .mozconfig
echo ac_add_options --disable-tests >> .mozconfig
echo ac_add_options --disable-debug >> .mozconfig
echo ac_add_options --enable-optimize=-O3 >> .mozconfig
echo ac_add_options --disable-dtd-debug >> .mozconfig
echo ac_add_options --disable-logging >> .mozconfig
echo ac_add_options --enable-reorder >> .mozconfig
echo ac_add_options --enable-strip >> .mozconfig
echo ac_add_options --enable-elf-dynstr-gc >> .mozconfig
echo ac_add_options --enable-cpp-rtti >> .mozconfig

The following option is for enabling the xterm title with the current command
when compiling.
echo ac_add_options --enable-xterm-updates >> .mozconfig

Disable support for HTML editing (optional).
echo ac_add_options --enable-plaintext-editor-only >> .mozconfig

Enable extensions you want.
echo ac_add_options --enable-extensions="all" >> .mozconfig
You may also pick and choose the extensions you want. To disable everything
other than the browser, use the following.
echo ac_add_options \
--enable-extensions="default,-venkman,-inspector,-irc" >> \
.mozconfig

Enable SVG (Scalable Vector Graphics) support.
echo ac_add_options --enable-svg >> .mozconfig

Mozilla now supports both gtk 1.2 and gtk 2.0. To enable gtk2 support, use the
option '--enable-default-toolkit=gtk2'. I had problems compiling for GTK2.

The QT and XLib toolkit support are not stable and may fail to compile. Try
compiling without these first and if all goes well, experiment with the other
toolkits.

<WARNING>
According to the financial institutions, the following hack makes your browser
insecure. IMO, it is no more insecure than using MS-IIS (along with its
security
history) as the server for financial sites;) You have been warned. Many sites
use an MS-IE specific tag (autocomplete=off) to prevent autocomplete from
working in some forms. This tag is now supported in mozilla to appease the
financial institutions. As per the requirements of the financial institutions,
they will not even accept a solution where this a preference option. My
opinion
is that it should be in the hands of the user. To enable autocomplete to
bypass
this restriction, we need to make a slight modification in the code.
</WARNING>

<HACK>
Open the file /usr/src/mozilla/extensions/wallet/src/wallet.cpp and search for
the line
#define WALLET_DONT_CACHE_ALL_PASSWORDS
and delete or comment out the line.
</HACK>

If anyone tells you MS-IE is user friendly, give them this example:)

Optionally you can apply the patch I mentioned in the begining of the hint to
enable spellchecker and the password hack.

Now configure and compile the package as usual. If there are problems run
configure again by removing the offending option.
./configure &&
make
This will take a few hours to compile. Watch your favorite Startrek movie.

You have two options, installing mozilla in the standard locations or making a
distribution that can be installed on various computers.

If you would like to install in the standard locations do the standard:
make install

To make a distribution that you would like to install on other machines:
cd xpinstall/packager &&
make &&
cd /opt &&
tar -xzf $MOZSRC/dist/mozilla-i686-pc-linux-gnu.tar.gz &&
cd $MOZSRC/dist &&
cp -LfR man /opt/mozilla &&
cp -LfR idl /opt/mozilla &&
cp -LfR include /opt/mozilla &&
mkdir /opt/mozilla/include/nss &&
cp -Lf private/security/*.h /opt/mozilla/include/nss &&
cp -Lf public/security/*.h /opt/mozilla/include/nss &&
cd /opt &&
tar -cvzf mozilla-dist.tar.gz mozilla/
The above commands create a binary distribution, installs it in /opt/mozilla,
copies the man pages and header files to the installation and then creates a
distribution that can be untarred on other machines.

Now we make some environment settings.

If you install mozilla in a non-standard location, make sure that the location
is in your PATH. Also you may add the man page to your MANPATH.
export PATH=$PATH:/opt/mozilla
export MANPATH=$MANPATH:/opt/mozilla/man
You may also add /opt/mozilla to /etc/ld.so.conf (not required and not
recommended). Remember to run ldconfig if you do.

To make your Mozilla build go faster, add:
export XPCOM_CHECK_THREADSAFE=0
in .bash_profile or in run-mozilla.sh. This apparently only affects debug
builds, but no harm in setting it for optimized builds.

I use a different location for the Mozilla plugins so that I can keep remove
and
reinstall mozilla without affecting the plugins. If you do this set the
MOZ_PLUGIN_PATH to the appropriate directory. I use:
export MOZ_PLUGIN_PATH=/opt/mozilla-plugins
Also make a link to the default plugin in the mozilla directory
(libnullplugin.so).

To allow for a multiple-user install, the easiest option is to run mozilla as
the user that installed mozilla (usually root). Else when some other user
tries
to run mozilla, it results in a segmentation fault. So check out your shiny
new
Moz:
mozilla

Enzoy:)


Installing a pre-compiled distribution:

An alternative is to install a pre-compiled Mozilla distribution. Though
against
"the spirit of LFS", the reasons you may wish to do so:
1. Chicken and egg problem:) You are having problems compiling Mozilla
and till you resolve them, you need a browser to get support with
the
debugging.
2. You don't want to spend 5 hours (thats how long it takes on my P-II
350) compiling.
3. You are content with the options used by the pre-compiled
distribution.
4. You have a GCC3 CVS and you would like to use a GCC2 compiled
mozilla
so that commercial plugins can work without problems. Though I am
using all the plugins (except for Real) mentioned below without
problems.

If so, head over to mozilla.org and download the "talkback enabled full
installer" and read the installation instructions in the release notes.
Remember to follow the instructions for multi-user installs in the notes, else
a core dump may occur at startup.


Relevant URLs:

Visit the following sites to find help and find extensions to mozilla.
* http://www.mozdev.org/projects.html
Some really cool extensions to mozilla such as google bar.
* http://www.mozilla.org/projects/
Projects related to mozilla, some of them are already integrated
into
the current release, some are yet to mature.
* http://www.gerbilbox.com/newzilla/
The unofficial Mozilla FAQ.
* http://www.themes.org/skins/mozilla/
Theme park for Mozilla.


Changing Preferences:

Whether to follow the settings in the current section is entirely at your
discretion. Would just like to mention some changes in the preferences I like:
* Appearance -> Colors -> Enable Use System Colors.
* Appearance -> Theme -> Select Modern Theme. Way better than Classic.
* Navigator -> Smart Browsing -> Enable Internet Keywords.
* Navigator -> Search Engine -> Search Using Google:)
* Navigator -> Tabbed Browsing -> Enable all options under Open Tabs
instead of windows. Tabs are cool.
* Privacy & Security -> Cookies -> Enable Ask me before storing a
cookie. Bye bye Doubleclick.
* Privacy & Security -> Images -> Enable Ask me before downloading an
image. Do this only if you are on a slow connection. Otherwise it is
more of a hassle. I usually set it because it prevents the user
tracking images from loading.
* Advanced -> Scripts & Windows -> Disable Open Unrequested Windows,
Move or resize existing windows, Raise or lower windows. Bye bye
X10.
* Advanced -> Cache -> Disk Cache = 8192KB. I had some problems in an
older version when the disk cache became very large (although that
was
on Windows 2000:D). Anyways 50 MB sounds a bit too much.


GCC 3 Tips:

If you compile Mozilla using GCC3, closed source plug-ins such as flash will
crash Mozilla since these plug-ins are compiled using GCC2. A work-around till
the plug-ins are fixed is to pre-load a library that will make some required
functions available to these plug-ins. Unfortunately, the Java Plugin does not
work using this approach. But I have hacked the j2sdk to compile from scratch.

Do the following.
cat > libc++mem.c << "EOF"
// From http://bugzilla.mozilla.org/show_bug.cgi?id=124006
void *__builtin_new(int size) {return (void*)malloc(size);}
void *__builtin_vec_new(int size) {return __builtin_new(size);}
void *__builtin_delete(void *ptr) {free(ptr);}
void *__builtin_vec_delete(void *ptr) {__builtin_delete(ptr);}
EOF
gcc -shared -fPIC -o libc++mem.so libc++mem.c
Move the resulting libc++mem.so to the location where run-mozilla.sh file is
installed (e.g. /opt/gnome/lib/mozilla-1.0.0/ or /opt/mozilla)
mv libc++mem.so /opt/mozilla

Open run-mozilla.sh and just below line 351 enter
export LD_PRELOAD=$MOZILLA_FIVE_HOME/libc++mem.so


Installing Adobe Acrobat Plugin:

Download the Acrobat Reader from Adobe's website.
http://www.adobe.com/products/acrobat/readstep2.html

Install Acrobat in /opt/acrobat. Now link the plugin.
cd $MOZ_PLUGIN_PATH &&
ln -s /opt/acrobat/Browsers/intellinux/nppdf.so


Installing Java Plugin:

Download SUN JRE 1.4 from
http://java.sun.com/j2se/

Install JDK in /opt/j2sdk and then link the plugin.
cd $MOZ_PLUGIN_PATH &&
ln -s ${JAVA_HOME}/jre/plugin/i386/ns610/libjavaplugin_oji.so

Some alternative java plugins:
http://www.alphaworks.ibm.com/
http://www.blackdown.org/

I have succesfully managed to compile Java 2 SDK 1.4 that is linked against
GCC3. Check out the "Java From Scratch" hint.


Installing Macromedia Flash Player:

Download the Flash Player from Macromedia's website.
http://sdc.shockwave.com/shockwave/download/alternates/#linux

Untar the files.
cp libflashplayer.so ShockwaveFlash.class $MOZ_PLUGIN_PATH


Installing RealPlayer:

Download the plugin from Real Networks.
http://forms.real.com/real/player/unix/unix.html

Install RealPlayer in /opt/RealPlayer8 and then copy the plugin to mozilla's
plugin directory.
cp rpnp.so raclass.zip $MOZ_PLUGIN_PATH


CodeWeaver's CrossOver Plugin:

If you are interested in using Windows plugins, this commercial product will
allow you to do it. Check out:
http://www.codeweavers.com/products/crossover/
for more info.


Have fun mozzing around.

Don't forget to send me bug reports and enhancements so that I can keep the
hint
updated. An appropriate place to discuss problems is the blfs-support mailing
list.




--dDRMvlgZJXvWKvBx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="javafromscratch.txt"

TITLE: Compiling Java 2 SDK from Scratch

LFS VERSION: Any.

AUTHOR: Tushar Teredesai <Tush AT Yahoo.Com>

SYNOPSIS:
How to compile Java 2 SDK Source (available from Sun) using gcc3 so
that
you can use it as a plugin for your shiny new gcc3 compiled mozilla.

HINT:

Change Log:
[2002-07-18]
* Optmizing the build.
* Added Problems and Workarounds section.
* Added fix by Harald Meier.
[2002-06-20]
* First public version.

NOTE:
This hint and the attached patch is only useful for people who have accepted
SUN
COMMUNITY SOURCE LICENSE for the Java 2 Platform Standard Edition. Note that
you
are not allowed to distribute the resulting JDK/JRE and you also cannot use
the
resulting JDK to compile programs for distribution unless they pass Sun's
compatiblity tests. In short don't use the resulting JDK except for your
personal use.

Pre-requisites (post LFS):
* XFree86 <http://freshmeat.net/projects/xfree86/>
* InfoZip Zip and Unzip <http://freshmeat.net/projects/zip/>
* InfoZip Unzip <http://freshmeat.net/projects/unzip/>
* GNU cpio <http://freshmeat.net/projects/cpio>
* Turbo C Shell <http://freshmeat.net/projects/tcsh/>
* Sun JDK 1.4 <http://freshmeat.net/projects/sunjdk/>

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
for compiling the SDK and then delete it. Also, it needs a 1.4 version JDK
according to Sun's website. If you don't want to install the jdk permenantly,
I
have included instructions on how to install it for the duration of the
compilation.

Install cpio binary in /bin or make a symlink to the it from /bin.

Note that when I build the SDK, I had many packages already installed, so I
don't have the exact dependencies. If anyone runs into any problems regarding
missing dependencies, let me know and I will update this section.

Packages to download:
* Java 2 SDK Source <http://wwws.sun.com/software/java2/download.html>
>From Sun's website, download the following files:
- j2sdk-1_4_0-src-scsl.zip
- j2sdk-1_4_0-motif-linux-i386.zip
- j2sdk-1_4_0-mozilla_headers-unix.zip
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.

The Java Source doesn't work well with locally installed mozilla and motif
headers and requires the download of the header files from the above site
where
you download the source.

* My Patch <http://www.geocities.com/tush/lfs/>
The patch fixes some non-gcc3 compliant code and few missing library links. It
took me some time to understand the build process and to figure out how to
link
additional libraries. You agree that by downloading the patch, you accept the
SUN COMMUNITY SOURCE LICENSE:)

Alternate site:
This hint is also available at <http://www.geocities.com/tush/lfs>. The latest
version of the hint is usually available there.


Compiling Java 2 SDK:

This hint, unlike the mozilla and openoffice hints, is short and sweet:)

I will refer to the root of the source tree as $SRC.
cd $SRC

If you don't have JDK 1.4 installed, you can install the JDK in the current
directory for the duration of the compilation.
chmod +x j2sdk-1_4_0_01-linux-i586.bin &&
./j2sdk-1_4_0_01-linux-i586.bin

This location is referred to as JAVA_HOME. So set the variable now.
export JAVA_HOME=$SRC/j2sdk1.4.0_01
Also since the JDK binary from Sun is linked against gcc2, download it from
<http://www.linuxfromscratch.org/~timothy/misc/> and move it where the jdk can
find it.
mv libstdc++-* $JAVA_HOME/jre/lib/i386/
Try running $JAVA_HOME/bin/java and if it reports any missing libraries, make
appropriate links in $JAVA_HOME/jre/lib/i386.

Unzip all the files:
cd $SRC &&
for i in j2sdk-1_4_0-*.zip ; do unzip $i; done

Apply the downloaded patch to fix some compilation problems.
cd $SRC &&
patch -Np1 -i j2sdk.patch

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.
export ALT_MOTIF_DIR=$SRC &&
export ALT_MOZILLA_PATH=$SRC

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.
export MILESTONE="ttcompiled" &&
export BUILD_NUMBER=`date +%s`

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
and do an
export DEV_ONLY=true

There is also a variable J2RE_ONLY which if set to true builds only the
Runtime
Env. Avoid setting that. Or if you like adventure, set it and try...

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

I also remove any CFLAGS or CXXFLAGS settings since I don't like taking
risks:)
Well, that was before, now I do like taking risks:)) So do the following to
get
your CFLAGS and CXXFLAGS recognized. I have compiled with "-O3 -march=i686"
without problems. Also, I applied the combreloc patch to binutils:)
export OTHER_CFLAGS=${CFLAGS}
export OTHER_CXXFLAGS=${CXXFLAGS}
unset CFLAGS
unset CXXFLAGS

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
entirely optional, I don't create the file.
echo "Red Hat Linux release 6.1 (LFS)" > /etc/redhat-release

Now the most simple part of the build.
cd $SRC/control/make &&
make

The build took around 4 hours on my PIII-800.

If anytime during the build, you would like to start from scratch, you can do
a
"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

The j2sdk-image is the built JDK, congrats:)
mkdir -p /opt/java &&
cp -a j2sdk-image /opt/java/j2sdk-1.4.0-tt &&
cd /opt/java &&
ln -s j2sdk-1.4.0-ttimage j2sdk

Add the following to your </etc/profile> or <~/.profile>. Many programs expect
the JAVA_HOME variable to find the JDK.
export JAVA_HOME=/opt/java/j2sdk
export PATH=$PATH:$JAVA_HOME/bin

Tip: You can install multiple jdk's in /opt/java, changing between them is
just
as easy as:
ln -sf j2sdk-<required-version> j2sdk

Link the java plugin we built for mozilla. After all that was the main reason
for me compiling jdk from scratch! Check out the mozilla hint on how to do
this.

Now LFS CVS is all ready for big time. The first system out there to be
completely gcc3:))

If you deviate from the hint and you run into problems, first try following
the
hint exactly to see if it works. Also, if you deviate from the hint and run
into
successes, please let me know so that I can add the same to the hint.

Reported Problems & Workarounds:

* Harald Meier reported that if there are problems, try removing the "-z defs"
from LDFLAGS_COMMON from line 263 in the file
$SRC/j2sdk_ori/j2se/make/common/Defs-linux.gmk.

Don't forget to send me bug reports and enhancements so that I can keep the
hint
updated. An appropriate place to discuss problems is the blfs-support mailing
list.



--dDRMvlgZJXvWKvBx--




Archive powered by MHonArc 2.6.24.

Top of Page