Programing



7/15/98
Added how to install Glibc2/Libc6 on a Slackware box.. I usually post things up after install the software a few times, but I only can add it to my own home computer. The worst thing that happened during the installation was that my gcc include files /usr/include/g++ or /usr/lib/g++include both with links to each other :).. hehhe my own fault for that.. Had to reinstall my gcc..Please scoll to bottom.


GCC

If you don't want to compile this yourself, then download gcc-2.7.2.3.bin.tar.gz from any sunsite mirror in the GCC directory.  Just untar it from / and that should do it from you.
Here's what I did to configure and compile gcc 2.7.2.3. Make sure you change i686 to the type of cpu you have.

./configure --build=i686-pc-linux-gnulibc1
make
make stage1
make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2"
make stage2
make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O2"
make compare
make install CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O"
 
That should do it!! 



SSL

Here's what I did to install SSLeay 0.8.1 - 0.9.0b:

cd /tmp 
tar -zxf SSLeay-0.x.xx.tar.gz
cd SSLeay-0.x.x
perl util/perlpath.pl /usr/bin
perl util/ssldir.pl /usr/local/ssl
make -f Makefile.ssl links
./Configure linux-elf
make clean
make
make rehash
make test
make install

SSLeay should be configure and ready to use.


JDK 1.1.6 v2

download jdk package at here or find the neatest mirror here.
cd /usr/local
tar -zxf jdk1.1.xxx.tar.gz
ln -s jdk1.1.xxx java

Kernel wise, you must edit the file /usr/src/linux/fs/binfmt_java.c and redeine the following:
_PATH_JAVA "/usr/local/java/bin/java"
_PATH_APPLET "/usr/local/java/bin/appletviewer"

save the file now and recompile the kernel or modules depending how you have java support setup.


Glibc / Libc6

I wrote down what I did.. Read the docs that came with gcc also.. I'll fix this one up when I can. I had to set glibc so I can do NIS + shadow. You almost can cut and paste the lines below..

tar xzf glibc-2.0.6.tar.gz
cd glibc-2.0.6
tar xzf ../glibc-linuxthreads-2.0.6.tar.gz
tar xzf ../glibc-crypt-2.0.6.tar.gz
tar xzf ../glibc-localedata-2.0.6.tar.gz
mkdir compile
cd compile
../configure --enable-add-ons=linuxthreads,crypt,localedata --prefix=/usr
make
make check

mkdir -p /usr/i486-linuxlibc5/lib
mv /usr/include /usr/i486-linuxlibc5/include
mkdir /usr/include
ln -s /usr/src/linux/include/linux /usr/include/linux
ln -s /usr/src/linux/include/asm /usr/include/asm
ln -s /usr/X11R6/include/X11 /usr/include/X11
#
# I think the line below screwed me over..
#ln -s /usr/lib/g++-include /usr/include/g++

echo /usr/i486-linuxlibc5/lib > /tmp/ld.so.conf
cat /etc/ld.so.conf >> /tmp/ld.so.conf
mv /tmp/ld.so.conf /etc/ld.so.conf

mv /usr/lib/libbsd.a /usr/i486-linuxlibc5/lib
mv /usr/lib/libc.a /usr/i486-linuxlibc5/lib
mv /usr/lib/libgmon.a /usr/i486-linuxlibc5/lib
mv /usr/lib/libm.a /usr/i486-linuxlibc5/lib
mv /usr/lib/libmcheck.a /usr/i486-linuxlibc5/lib
mv /usr/lib/libc.so /usr/i486-linuxlibc5/lib
mv /usr/lib/libm.so /usr/i486-linuxlibc5/lib
cp /lib/libm.so.5.* /usr/i486-linuxlibc5/lib
cp /lib/libc.so.5.* /usr/i486-linuxlibc5/lib

mv /usr/lib/*.o /usr/i486-linuxlibc5/lib

ldconfig -v

make install

ldconfig -v

cd /usr/lib/gcc-lib/
#------------- cut and paste stops working here..
#Copy gcc dir to *-gnulibc5
#cp -r i486-unknown-linux i486-linuxlibc5
cp -r i686-pc-linux-gnulibc1 i686-pc-linux-gnulibc5

#Read docs on how to fix gcc to compile.

#cd /usr/lib/gcc-lib/i686-pc-linux-gnulibc1/pgcc-2.90.29/