<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://subsecret.dk/index.php?action=history&amp;feed=atom&amp;title=Building_from_the_new_environment</id>
	<title>Building from the new environment - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://subsecret.dk/index.php?action=history&amp;feed=atom&amp;title=Building_from_the_new_environment"/>
	<link rel="alternate" type="text/html" href="https://subsecret.dk/index.php?title=Building_from_the_new_environment&amp;action=history"/>
	<updated>2026-05-03T14:21:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://subsecret.dk/index.php?title=Building_from_the_new_environment&amp;diff=27&amp;oldid=prev</id>
		<title>Steffen Mikkelsen: Created page with &quot;==Getting started== Replace old tools with new ones. As root run the following  rm -rf /newsystem/tools/  cp -R /tools /newsystem    Make new directory for building  mkdir /ne...&quot;</title>
		<link rel="alternate" type="text/html" href="https://subsecret.dk/index.php?title=Building_from_the_new_environment&amp;diff=27&amp;oldid=prev"/>
		<updated>2013-04-21T11:45:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Getting started== Replace old tools with new ones. As root run the following  rm -rf /newsystem/tools/  cp -R /tools /newsystem    Make new directory for building  mkdir /ne...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Getting started==&lt;br /&gt;
Replace old tools with new ones. As root run the following&lt;br /&gt;
 rm -rf /newsystem/tools/&lt;br /&gt;
 cp -R /tools /newsystem&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
Make new directory for building&lt;br /&gt;
 mkdir /newsystem/build&lt;br /&gt;
 chmod a+r+w /newsystem/build&lt;br /&gt;
 &lt;br /&gt;
Move all the downloaded packages to /newsystem/build&lt;br /&gt;
&lt;br /&gt;
Follow the &amp;quot;Changing to new environment with chroot&amp;quot; section on [[Trying tools in clean environment]], so that you are in the chroot environment&lt;br /&gt;
&lt;br /&gt;
==kernel-headers==&lt;br /&gt;
 tar xf linux-2.6.38.4.tar.bz2 &lt;br /&gt;
 cd linux-2.6.38.4&lt;br /&gt;
 make mrproper&lt;br /&gt;
 make INSTALL_HDR_PATH=&amp;quot;&amp;quot; headers_install &lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
==libcap==&lt;br /&gt;
 tar xf libcap-2.20.tar.gz&lt;br /&gt;
 cd libcap-2.20&lt;br /&gt;
 make&lt;br /&gt;
 cp -R libcap/include/ /&lt;br /&gt;
 cp libcap/libcap*.so* /lib&lt;br /&gt;
 cp libcap/include/sys/capability.h /include/sys/&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
==libelf==&lt;br /&gt;
 tar xf libelf-0.8.13.tar.gz&lt;br /&gt;
 cd libelf-0.8.13&lt;br /&gt;
 ./configure --prefix=&amp;quot;&amp;quot;&lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
==glibc==&lt;br /&gt;
 tar xf glibc-2.13.tar.gz&lt;br /&gt;
 touch /etc/ld.so.conf&lt;br /&gt;
 mkdir glibc-2.13-build&lt;br /&gt;
 cd glibc-2.13-build&lt;br /&gt;
 ../glibc-2.13/configure --prefix=&amp;quot;&amp;quot; --enable-add-ons --enable-kernel=2.6.37       &lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
Edit /bin/ldd and change &lt;br /&gt;
 RTLDLIST=&amp;quot;/lib/ld-linux.so.2 /lib64/ld-linux-x86-64.so.2&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 RTLDLIST=&amp;quot;/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==gmp==&lt;br /&gt;
 tar xf gmp-5.0.1.tar.gz&lt;br /&gt;
 cd gmp-5.0.1&lt;br /&gt;
 ./configure --prefix=&amp;quot;&amp;quot;&lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==mpfr==&lt;br /&gt;
 tar xf mpfr-3.0.0.tar.gz&lt;br /&gt;
 cd mpfr-3.0.0&lt;br /&gt;
 ./configure --prefix=&amp;quot;&amp;quot;&lt;br /&gt;
 make -j 12 install&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==mpc==&lt;br /&gt;
 tar xf mpc-0.9.tar.gz&lt;br /&gt;
 cd mpc-0.9&lt;br /&gt;
 ./configure  --prefix=&amp;quot;&amp;quot;&lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
==GCC==&lt;br /&gt;
 ln -s /include /usr&lt;br /&gt;
 export LD_LIBRARY_PATH=/lib&lt;br /&gt;
 tar xf gcc-4.5.2.tar.bz2 &lt;br /&gt;
 cd gcc-4.5.2&lt;br /&gt;
 &lt;br /&gt;
Go to gcc/config/i386 and edit linux64.h or linux.h.&lt;br /&gt;
&lt;br /&gt;
 #define GLIBC_DYNAMIC_LINKER32 &amp;quot;/lib/ld-linux.so.2&amp;quot;&lt;br /&gt;
 #define GLIBC_DYNAMIC_LINKER64 &amp;quot;/lib64/ld-linux-x86-64.so.2&amp;quot;&lt;br /&gt;
Is changed to:&lt;br /&gt;
 #define GLIBC_DYNAMIC_LINKER32 &amp;quot;/lib/ld-linux.so.2&amp;quot;&lt;br /&gt;
 #define GLIBC_DYNAMIC_LINKER64 &amp;quot;/lib/ld-linux-x86-64.so.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 mkdir gccbuild&lt;br /&gt;
 cd gccbuild&lt;br /&gt;
 ../gcc-4.5.2/configure --disable-multilib  --prefix=&amp;quot;&amp;quot;  --enable-add-ons --enable-kernel=2.6.37 &lt;br /&gt;
 make -j 12 &lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
 &lt;br /&gt;
==Missing==&lt;br /&gt;
Here all the former applications should be listed again with new configure options&lt;br /&gt;
&lt;br /&gt;
==Removal of tools==&lt;br /&gt;
Now remove tools folder and run new chroot command without /tools/bin reference. &lt;br /&gt;
&lt;br /&gt;
==Bison==&lt;br /&gt;
Note that bison 2.4.2 and 2.4.3 are broken (incompatible with M4)&lt;br /&gt;
 tar xf bison-2.4.1.tar.gz&lt;br /&gt;
 cd bison-2.4.1&lt;br /&gt;
 ./configure --prefix /&lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd ..&lt;br /&gt;
&lt;br /&gt;
==Grub==&lt;br /&gt;
 tar xf grub-1.98.tar.gz&lt;br /&gt;
 cd grub-1.98&lt;br /&gt;
 ./configure --prefix /&lt;br /&gt;
 make -j 12&lt;br /&gt;
 make install&lt;br /&gt;
 cd..&lt;br /&gt;
 &lt;br /&gt;
We are now ready for next step&lt;/div&gt;</summary>
		<author><name>Steffen Mikkelsen</name></author>
	</entry>
</feed>