DSL-N :: gcc can't find /usr/bin/ld



Well, quick search: (juanito's thread) http://damnsmalllinux.org/cgi-bin....t=18021

Also, make sure you see the 'old' forums at http://damnsmalllinux.org/dsl-n/f/ ... seems to suggest grabbing bin-utils then gcc/gcc-3.4/gcc-2.95

Before Hats mentioned it, I'd forgotten that I'd made a post on this.

Since the first post, I've continued to add debs each time I get an error message that something is missing when compiling. By now I would guess that some of the list/symlinks are obsolete but I did not get round to refining this somewhat "brute force" method.

Here's the latest script:
Code Sample
#!/bin/bash
#
# Requires dsl-dpkg.dsl & gnu-utils.dsl [be sure you have the DSL-N versions]
#
dpkg -i /path-to-file/libc6_2.3.2.ds1-22sarge5_i386.deb
dpkg -i /path-to-file/libgcc1_3.4.3-13sarge1_i386.deb
dpkg -i /path-to-file/libdb4.2_4.2.52-18_i386.deb
dpkg -i /path-to-file/libgdbm3_1.8.3-2_i386.deb
dpkg -i /path-to-file/perl-base_5.8.4-8sarge5_i386.deb
dpkg -i --force-all /path-to-file/perl-modules_5.8.4-8sarge5_all.deb
dpkg -i /path-to-file/perl_5.8.4-8sarge5_i386.deb
dpkg -i /path-to-file/m4_1.4.2-1_i386.deb
dpkg -i /path-to-file/make_3.80-9_i386.deb
dpkg -i /path-to-file/patch_2.5.9-2_i386.deb
dpkg -i /path-to-file/autoconf_2.59a-3_all.deb
dpkg -i /path-to-file/autotools-dev_20050422.1_all.deb
#dpkg -i /path-to-file/automake1.7_1.7.9-7_all.deb [some applications require different automake versions]
#dpkg -i /path-to-file/automake1.8_1.8.5-3_all.deb
dpkg -i /path-to-file/automake1.9_1.9.5-1_all.deb
dpkg -i /path-to-file/binutils_2.15-6_i386.deb
dpkg -i /path-to-file/cpp-2.95_2.95.4-22_i386.deb
dpkg -i /path-to-file/gcc-2.95_2.95.4-22_i386.deb
#
dpkg -i /path-to-file/linux-kernel-headers_2.5.999-test7-bk-17_i386.deb
dpkg -i /path-to-file/libc6-dev_2.3.2.ds1-22sarge5_i386.deb
#
ln -s /usr/src/linux-2.6.12 /usr/src/linux
ln -s /usr/bin/gcc-2.95 /usr/bin/cc
ln -s /usr/bin/gcc-2.95 /usr/bin/gcc
ln -s /usr/bin/cpp-2.95 /usr/bin/cpp
ln -s /usr/bin/cpp-2.95 /lib/cpp
dpkg -i /path-to-file/libtool_1.5.6-6_i386.deb
#
dpkg -i /path-to-file/libsysfs1_1.2.0-5_i386.deb
dpkg -i /path-to-file/libsysfs-dev_1.2.0-5_i386.deb
#
#dpkg -i /cdrom/temp/zlib1g_1.2.2-4.sarge.2_i386.deb
#dpkg -i /cdrom/temp/libmagic1_4.12-1_i386.deb
#dpkg -i /cdrom/temp/file_4.12-1_i386.deb
#
dpkg -i /path-to-file/gcc-3.3-base_3.3.5-13_i386.deb
dpkg -i /path-to-file/cpp-3.3_3.3.5-13_i386.deb
dpkg -i /path-to-file/cpp_3.3.5-3_i386.deb
dpkg -i /path-to-file/gcc-3.3_3.3.5-13_i386.deb
dpkg -i /path-to-file/gcc_3.3.5-3_i386.deb
#
dpkg -i /path-to-file/pkg-config_0.17.2-1_i386.deb
dpkg -i /path-to-file/gettext-base_0.14.4-2_i386.deb
dpkg -i /path-to-file/gettext_0.14.4-2_i386.deb
dpkg -i /path-to-file/zlib1g_1.2.2-4.sarge.2_i386.deb
dpkg -i /path-to-file/libxml2_2.6.16-7_i386.deb
dpkg -i /path-to-file/zlib1g-dev_1.2.2-4.sarge.2_i386.deb
dpkg -i /path-to-file/libxml2-dev_2.6.16-7_i386.deb
#
dpkg -i /path-to-file/libncurses5_5.4-4_i386.deb
dpkg -i /path-to-file/libncurses5-dev_5.4-4_i386.deb
#
dpkg -i /path-to-file/libstdc++5_3.3.5-13_i386.deb
dpkg -i --force-all /path-to-file/libstdc++5-3.3-dev_3.3.5-13_i386.deb
dpkg -i /path-to-file/g++-3.3_3.3.5-13_i386.deb
dpkg -i /path-to-file/g++_3.3.5-3_i386.deb
#
# EOF


In case you need the full kernel sources to build modules or recompile a patched kernel, you can run the following script after the first script. Once this is done (and you apply your patch or whatever) you can go directly to "make clean" then "make && make install" or "make modules && make modues_install":
Code Sample
#!/bin/bash
#
rm -f /lib/modules/2.6.12/modules.*
cp /KNOPPIX/lib/modules/2.6.12/modules.* /lib/modules/2.6.12
#
cp /path-to-file/linux-2.6.12.tar.gz /usr/src/
cd /usr/src
tar -xzvf linux-2.6.12.tar.gz -C /usr/src
rm -f linux-2.6.12.tar.gz
#
ln -s /usr/src/linux-2.6.12/include/asm-i386 /usr/src/linux-2.6.12/include/asm
rm -f /lib/modules/2.6.12/build
ln -s /usr/src/linux-2.6.12 /lib/modules/2.6.12/build
rm -f /lib/modules/2.6.12/source
ln -s /usr/src/linux-2.6.12 /lib/modules/2.6.12/source
#
cp /path-to-file/autoconf.h /usr/src/linux-2.6.12/include/linux
cp /path-to-file/version.h /usr/src/linux-2.6.12/include/linux
cp /path-to-file/Module.symvers /usr/src/linux-2.6.12
cp /path-to-file/modpost /usr/src/linux-2.6.12/scripts/mod
#
cp -f /usr/src/linux-2.6.12/.config /usr/src/linux-2.6.12/arch/i386/defconfig
cd /usr/src/linux-2.6.12
make oldconfig
make modules_prepare
#
# EOF

Note that the files autoconf.h, version.h, etc come from the equivalent location on the Knoppix 4.0.2 cd/iso.


original here.