Re: Linux Kernel 64 compile on Knoppix 6.7
Hello Gilles,
On Mon, Aug 15, 2011 at 09:20:12PM -0700, Gilles van Ruymbeke wrote:
> Hi Ming-Ching, Klaus
> Thank you for your response.
> I will try the ARCH override but I did not need to use it on previous release
> of Knoppix as the 6.5 version was ok. Also reverting to gcc 4.4 solves the problem.
>
> And This does not explain the mismatch between the installed gcc (4.6) and what
> synaptic (apt-get database) think that is installed (4.4).
There are several gcc versions installed in the DVD version, since there
are binaries with different dependencies on a specific gcc version. This
is unavoidable if we keep packages from both Debian/stable as well as
Debian/testing in parallel.
dpkg -l | grep gcc
ii gcc 4:4.6.0-6 GNU C compiler
ii gcc-4.1 4.1.2-29 The GNU C compiler
ii gcc-4.1-base 4.1.2-29 The GNU Compiler Collection (base package)
ii gcc-4.4 4.4.5-8 The GNU C compiler
ii gcc-4.4-base 4.4.5-8 The GNU Compiler Collection (base package)
ii gcc-4.5 4.5.3-1 The GNU C compiler
ii gcc-4.5-base 4.5.3-1 The GNU Compiler Collection (base package)
ii gcc-4.6 4.6.0-10 The GNU C compiler
ii gcc-4.6-base 4.6.0-10 The GNU Compiler Colle
As you can see, the frontend (gcc) is from gcc 4.6 (and hence will show
this version by default), while you have a choice of gcc 4.1, 4.4, 4.5
and 4.6 for compiling sources. I compiled the kernel with gcc 4.6. (at
least, that is what searching for GCC symbols in modules tells me).
> The "amd64-libs-dev" install also adds all the dependencies as multi-lib,...
>
> I did run knoppix as poor man install, install the 64 gcc/libs and compile
> the kernel (obviously without reboot) in order to create my new minirt
> and cloops loop back files for my 64bits live patch iso boot.
If you want to compile with gcc-4.6, you will have to install the 64bit
gcc-libs from Debian/testing or Debian/unstable.
> Good point about the /lib64 not being part of the unionfs.
> I will add it in my minirt init script. By the way I much prefer using
> "mout bind" instead of soft links (from the root to the /UNIONFS) as some installer
> like to use the real path and include the /UNIONFS in their install/config files.
Right. Bind mounts are more "invisible" to the file system, I had to use
a bind mount for /home in order to get rid of a very ugly looking prompt
and "/UNIONFS" paths in personal configurations that may not fit a
harddisk install. However, it is easier to replace a directory which is
in use by another one if you use symlinks, i.e. you cannot umount or
remount /lib, but you can change the symlink to point to another place.
Therefore my strategy of using symlinks, not bind-mounts, for everything
but /home.
Regards
-Klaus
> On Mon, Aug 15, 2011 at 04:56:47PM -0700, Ming-Ching Tiew wrote:
> > --- On Mon, 8/15/11, Gilles van Ruymbeke <[1]ruymbeke@gmail.com> wrote:
>
> >
> > > Trying to compile the 64 bits kernels (from your sources) still gives me
> > a 32 bits binary.
> >
> > Did you add "ARCH=x86_64" to all your compilations of kernel/modules ?
>
> >
> > eg
> >
> > �������� $ make ARCH=x86_64 bzImage
> > �������� $ make ARCH=x86_64 modules
> > �������� $ sudo make ARCH=x86_64 modules_install
> >
> > Also did you install the needed multi-lib compiler and libraries on a
>
> > harddisk install or on a "poor-man" install with persistency ? If you
> > installed them on a "poor-man" install, the /lib64 libraries will not
> > survive a reboot because the minirt.gz did not put that into the
>
> > persistent store. A minor fix to minirt.gz is needed to include lib64 into
> > the UNIONFS.
>
> Good point. New directories in / will not be stored automatically into
> /UNIONFS, and minirt.gz/init currently ignores everything but boot etc
>
> sbin var lib opt root usr bin. The quick fix is copying /lib64 to
> /UNIONFS with persistent overlay, and add lib64 to the for loop which
> links the toplevel directories in init inside minirt.gz.
>
> -Klaus
>
> On Mon, Aug 15, 2011 at 2:20 PM, Gilles van Ruymbeke
> <[2]ruymbeke@gmail.com> wrote:
>
> Hi Klaus,
> The 32 bits version of Knoppix 6.7 works great but I have some problems
> with the 64 bits version:
> After installing the "amd64-libs-dev" package (+ 12 dependencies) I
> still cannot compile 64 bits binaries
> (This was working just fine with Knoppix 6.5)
> According to synaptic the installed version of gcc is 4.4 but "gcc
> --version" displays 4.6.
> After replacing the /usr/bin/gcc link from gcc-4.6 to gcc-4.4, 64 bits
> compile now works,
> but I cannot upgrade gcc from 4.4 to 4.6, even after trying to upgrade
> or remove before re-install.
> Trying to compile the 64 bits kernels (from your sources) still gives me
> a 32 bits binary.
> And obviously the vmware tools kernel modules do compile but do not load
> into the 64 bits kernel.
> What version of gcc did you use to compile your kernels ? Did you use
> Knoppix to compile it ?
> Any idea or suggestion ? Am I missing something obvious ?
> Thank you again for your great work and Knoppix releases.
> Best Regards,
> Gilles
Reply to: