LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to build openjdk/icedtea on Slack 13.1 (https://www.linuxquestions.org/questions/slackware-14/unable-to-build-openjdk-icedtea-on-slack-13-1-a-844176/)

robertjinx 11-14-2010 05:55 AM

Unable to build openjdk/icedtea on Slack 13.1
 
Hello, Im trying to build openjdk/icedtea on Slackware.
I have installed xulrunner, mozilla-nss, rhino, xalan, apache-ant, fastjar, xerces, gcc-java, but don't have gcj-java and can't find it so:

SlackBuild:
Code:

PRGNAM=openjdk6                        # replace with name of progra
VERSION="1.9.1b20"                        # replace with version of program
ARCH="i486"
BUILD=${BUILD:-1}
TAG="_kng"

CWD=$(pwd)
TMP=${TMP:-/tmp/kng}                # For consistency's sake, use this
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}                # Drop the package in /tmp

if [ "$ARCH" = "i386" ]; then
  SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
elif [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2"
fi

if [ -r /etc/profile.d/apache-ant.sh ]; then
        source /etc/profile.d/apache-ant.sh
else
        ANT_HOME="/usr/share/ant"
fi

# Exit on most errors
set -e

# Setup some temporary variables
unset JAVA_HOME
unset CLASSPATH
_javaver=6
_jvmdir=usr/lib/jvm/java-${_javaver}-openjdk
_icetea=icedtea6-1.9.1

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
tar xvf $CWD/${_icetea}.tar.gz || exit 1
cd ${_icetea}

chmod -R u+w,go+r-w,a-s .
chown -R root:root .

ln -sf $CWD/openjdk-6-src-b20-21_jun_2010.tar.gz .
ln -sf $CWD/hotspot.tar.gz .
cp -f $CWD/patch/*.diff ./patches/

autoreconf -i
export DISTRIBUTION_PATCHES="patches/fix_jdk_cmds_path.diff patches/aatext_by_default.diff patches/fontconfig-paths.diff patches/fix_corba_cmds_path.diff patches/nonreparenting-wm.diff"
export ALT_PARALLEL_COMPILE_JOBS="${MAKEFLAGS/-j}"
export HOTSPOT_BUILD_JOBS="${ALT_PARALLEL_COMPILE_JOBS}"
unset MAKEFLAGS

export CFLAGS="$SLKCFLAGS" &&
export CXXFLAGS="$SLKCFLAGS" &&
export LIBS="-I/usr/include/xulrunner" &&
./configure --with-parallel-jobs=${HOTSPOT_BUILD_JOBS} \
--with-ant-home=${ANT_HOME} \
--with-hotspot-src-zip=hotspot.tar.gz \
--with-jaxp-drop-zip=$CWD/jdk6-jaxp-b20.zip \
--with-jaxws-drop-zip=$CWD/jdk6-jaxws-b20.zip \
--with-jaf-drop-zip=$CWD/jdk6-jaf-b20.zip \
--with-gcj=/usr/bin \
--with-xalan2-jar=${ANT_HOME}/lib/xalan.jar \
--with-xerces2-jar=${ANT_HOME}/lib/xercesImpl.jar \
--with-rhino=${ANT_HOME}/lib/rhino.jar \
--with-ecj \
--with-ecj-jar=/usr/share/java/ecj.jar \
--with-gcj-home=${TMP}/${_icetea} \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux \
--target=$ARCH-slackware-linux

# Build man pages
export LD_PRELOAD=""
make -j3 || make || exit 1

Error:
Code:

mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin stamps/
touch stamps/download.stamp
ln -sf /usr/bin/gij /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/java
mkdir -p /tmp/kng/icedtea6-1.9.1/plugin/icedteanp && \
cd /tmp/kng/icedtea6-1.9.1/plugin/icedteanp && \
i486-slackware-linux-g++ -O2 -march=i486 -mtune=i686 \
  -DJDK_UPDATE_VERSION="\"20\"" \
  -DPLUGIN_VERSION="\"IcedTea6 1.9.1\"" \
  -DMOZILLA_VERSION_COLLAPSED="1090212" \
  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  \
  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng14 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2  \
  -DXP_UNIX -I/usr/include/xulrunner-1.9.2.12/stable  \
  -fPIC -o /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaNPPlugin.o -c /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaNPPlugin.cc
ln -sf /usr/bin/gjavah /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javah
mkdir -p /tmp/kng/icedtea6-1.9.1/plugin/icedteanp && \
cd /tmp/kng/icedtea6-1.9.1/plugin/icedteanp && \
i486-slackware-linux-g++ -O2 -march=i486 -mtune=i686 \
  -DJDK_UPDATE_VERSION="\"20\"" \
  -DPLUGIN_VERSION="\"IcedTea6 1.9.1\"" \
  -DMOZILLA_VERSION_COLLAPSED="1090212" \
  -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  \
  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng14 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2  \
  -DXP_UNIX -I/usr/include/xulrunner-1.9.2.12/stable  \
  -fPIC -o /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.o -c /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.cc
ln -sf /usr/bin/grmic /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/rmic
In file included from /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaNPPlugin.cc:51:0:
/tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.h:45:19: fatal error: npapi.h: No such file or directory
compilation terminated.
ln -sf /usr/bin/gjar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/jar
make: *** [/tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaNPPlugin.o] Error 1
make: *** Waiting for unfinished jobs....
ln -sf /tmp/kng/icedtea6-1.9.1/javac /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javac
ln -sf /tmp/kng/icedtea6-1.9.1/javap /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javap
mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed && \
ln -sf /usr/share/ant/lib/xalan.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xalan-j2.jar && \
ln -sf /usr/share/java/serializer.jar \
  /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xalan-j2-serializer.jar && \
ln -sf /usr/share/ant/lib/xercesImpl.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xerces-j2.jar
In file included from /tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.cc:41:0:
/tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.h:45:19: fatal error: npapi.h: No such file or directory
compilation terminated.
make: *** [/tmp/kng/icedtea6-1.9.1/plugin/icedteanp/IcedTeaScriptablePluginObject.o] Error 1
mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib && \
cp /tmp/kng/icedtea6-1.9.1/jre/lib/rt.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/rt.jar && \
ln -sf /tmp/kng/icedtea6-1.9.1/jre/lib/i386 \
  /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/ && \
if ! test -d /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/i386; \
  then \
  ln -sf ./i386 \
    /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/i386; \
fi;
cp: cannot stat `/tmp/kng/icedtea6-1.9.1/jre/lib/rt.jar': No such file or directory
make: *** [stamps/bootstrap-directory-ecj.stamp] Error 1
mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin stamps/
ln -sf /usr/bin/gij /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/java
ln -sf /usr/bin/gjavah /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javah
ln -sf /usr/bin/grmic /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/rmic
ln -sf /usr/bin/gjar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/jar
ln -sf /tmp/kng/icedtea6-1.9.1/javac /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javac
ln -sf /tmp/kng/icedtea6-1.9.1/javap /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/bin/javap
mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed && \
ln -sf /usr/share/ant/lib/xalan.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xalan-j2.jar && \
ln -sf /usr/share/java/serializer.jar \
  /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xalan-j2-serializer.jar && \
ln -sf /usr/share/ant/lib/xercesImpl.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/lib/endorsed/xerces-j2.jar
mkdir -p /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib && \
cp /tmp/kng/icedtea6-1.9.1/jre/lib/rt.jar /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/rt.jar && \
ln -sf /tmp/kng/icedtea6-1.9.1/jre/lib/i386 \
  /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/ && \
if ! test -d /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/i386; \
  then \
  ln -sf ./i386 \
    /tmp/kng/icedtea6-1.9.1/bootstrap/ecj/jre/lib/i386; \
fi;
cp: cannot stat `/tmp/kng/icedtea6-1.9.1/jre/lib/rt.jar': No such file or directory
make: *** [stamps/bootstrap-directory-ecj.stamp] Error 1

NOTE: npapi.h is installed and found at:
Code:

file /usr/include/xulrunner-1.9.2.12/npapi.h 
/usr/include/xulrunner-1.9.2.12/npapi.h: ASCII C program text

Does anyone know what am I missing or doing wrong?

business_kid 11-14-2010 11:15 AM

google 'circular dependency iced tes'
Something involving Ant, I believe.
Quote:

fatal error: npapi.h: No such file or directory
Fix that as well.

robertjinx 11-14-2010 12:30 PM

I didnt get what you wrote and apache-ant is installed.

robertjinx 11-14-2010 03:47 PM

Ok, somehow I did started the build of icedtea, but it runs into an error:

Code:

-init-src-dirs:
    [echo] Using primary.src.dir=/tmp/kng/icedtea6-1.9.1/openjdk.build-ecj/jaxws/drop/jaxws_src/src
    [echo] Using src.dir.id=/tmp/kng/icedtea6-1.9.1/openjdk.build-ecj/jaxws/drop/jaxws_src/src:/tmp/kng/icedtea6-1.9.1/openjdk.build-ecj/jaxws/drop/jaf_src/src

compile:
    [javac] Compiling 2545 source files to /tmp/kng/icedtea6-1.9.1/openjdk.build-ecj/jaxws/build/classes
    [javac] ----------
    [javac] 1. ERROR in /tmp/kng/icedtea6-1.9.1/openjdk.build-ecj/jaxws/drop/jaxws_src/src/com/sun/xml/internal/fastinfoset/stax/events/AttributeBase.java (at line 111)
    [javac]        public QName getDTDType() {
    [javac]                ^^^^^
    [javac] The return type is incompatible with Attribute.getDTDType()
    [javac] ----------
    [javac] 1 problem (1 error)

BUILD FAILED
/tmp/kng/icedtea6-1.9.1/openjdk-ecj/jaxws/build.xml:135: Compile failed; see the compiler error output for details.

Total time: 1 minute 7 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory `/tmp/kng/icedtea6-1.9.1/openjdk-ecj/jaxws/make'
make[2]: *** [jaxws-build] Error 2
make[2]: Leaving directory `/tmp/kng/icedtea6-1.9.1/openjdk-ecj'
make[1]: *** [build_product_image] Error 2
make[1]: Leaving directory `/tmp/kng/icedtea6-1.9.1/openjdk-ecj'
make: *** [stamps/icedtea-ecj.stamp] Error 2


business_kid 11-15-2010 07:03 AM

google 'circular dependency iced tea' is nearer what I meant. Excuse the typo.

http://en.wikipedia.org/wiki/Circular_dependency


All times are GMT -5. The time now is 01:41 PM.