-
Knoppix 7.0.2-EN DVD notes & comments
Hello,
Did someone managed yet to get the 64 bits compile & run time environment working on Knoppix 7.0.2 ?
The steps provided by Klaus for Knoppix 6.7.1 are no longer working (cf link below)
http://knoppix.net/forum/threads/294...l=1#post125222
and my other attempts have failed so far.
Best Regards,
Gilles
-
Senior Member
registered user
Greetings, Gilles.
Is your 7.0.2 running a 64-bit kernel?
-
Hi Utu,
Yes of course.
The following line was working well enough on Knoppix 6.7.1 with the 64 bit Linux kernel:
sudo apt-get -y -t sid --reinstall install libc6 libc6-dev libc6-dev-amd64 gcc-4.6-multilib lib64gcc1
But this does not work any more with Knoppix 7 (7.0.0 nor 7.0.1 nor 7.0.2).
There are conflicting packages that are in use and switching into single user mode (init 1) does not help.
Cheers,
Gilles
Last edited by ruymbeke; 06-07-2012 at 02:40 AM.
-
Senior Member
registered user
Hi Gilles,
I have successfully tried the following with Knoppix V7.0.2.
You have to replace the packages libc-bin, libc-dev-bin, libc6, libc6-dev with those of the unstable branch.
Open a terminal an issue
Code:
sudo apt-get update
sudo apt-get -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
sudo chvt 1
init 2
apt-get -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
chroot /UNIONFS/
apt-get -t unstable -f install
exit
init 5
chvt 5
Now you can install the current packages gcc-4.6-multilib and g++-4.6-multilib from the unstable branch.
Code:
sudo apt-get -y -t unstable install gcc-4.6-multilib g++-4.6-multilib
Download and extract pi_quick_start.tar.gz
Change to your pi_quick_start directory and load start.sh into a text editor. Replace all occurances of "cc" with "gcc -m64". Save the file and exit the text editor.
Set the environment variable CFLAGS: Run the script: Best Regards
-
Senior Member
registered user
apt-get crash: "A copy of the C library was found in an unexpected directory"
Originally Posted by
klaus2008
Hi Gilles,
I have successfully tried the following with Knoppix V7.0.2.
You have to replace the packages libc-bin, libc-dev-bin, libc6, libc6-dev with those of the unstable branch.
Open a terminal an issue
Code:
sudo apt-get update
sudo apt-get -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
sudo chvt 1
init 2
apt-get -t unstable install libc-bin libc-dev-bin libc6 libc6-dev
chroot /UNIONFS/
apt-get -t unstable -f install
exit
init 5
chvt 5
Now you can install the current packages gcc-4.6-multilib and g++-4.6-multilib from the unstable branch.
Code:
sudo apt-get -y -t unstable install gcc-4.6-multilib g++-4.6-multilib
Download and extract pi_quick_start.tar.gz
Change to your pi_quick_start directory and load start.sh into a text editor. Replace all occurances of "cc" with "gcc -m64". Save the file and exit the text editor.
Set the environment variable CFLAGS:
Run the script:
Best Regards
Last week this recipe worked perfectly, but now it hangs, seemingly in the check_dir() function in libc:i386.preinst. Is there any way to get around this? The script is found in /var/lib/dpkg/info/libc6:i386.preinst, but editing this doesn't seem to help.
For me, this is a very serious problem.
Here is what seems to be the culprit:
Code:
# Sanity check.
# If there are versions of glibc outside of the normal installation
# location (/lib, /lib64, etc.) then things may break very badly
# as soon as ld.so is replaced by a new version. This check is not
# foolproof, but it's pretty accurate. This script ignores libraries
# with different sonames, and libraries incompatible with the
# to-be-installed ld.so.
check_dir () {
msg=$1
dir=$2
# Follow symlinks
dir=$(readlink -e $dir || true)
# Ignore inexistent directories
if ! test -d "$dir" ; then
return
fi
# Detect possible candidates
files=$(ls $dir | egrep '^(ld|lib(d|c|m|pthread|rt|dl))-2.*.so' 2>/dev/null || true)
if test -z "$files" ; then
return
fi
for file in $files ; do
lib=$dir/$file
# Skip if it is a symlink (as installed by lsb-core)
if test -L "$lib" ; then
continue
fi
# Skip if it is the currently dynamic loader
if test "$lib" = "$ldfile" ; then
continue
fi
# See if the found libraries are compatible with the system ld.so;
# if they aren't, they'll be ignored. Check e_ident, e_type (which
# will just be ET_DYN), and e_machine. If a match is found, there
# is a risk of breakage.
libbytes=`head -c 20 $lib | od -c`
if test "$ldbytes" != "$libbytes" ; then
continue
fi
# Binaries owned packages are considered to do the right thing
# First try a quick lookup which should catch all cases on a
# normal system
if echo $libcfiles | grep -q "[ ^]$lib[ $]" ; then
continue
fi
# Slower lookup to confirm
if dpkg-query -S "$lib" >/dev/null 2>&1 ; then
continue
fi
# Output an error message and exit
echo
echo "A copy of the C library was found $msg:"
echo " '$lib'"
echo "It is not safe to upgrade the C library in this situation;"
echo "please remove that copy of the C library or get it out of"
echo "'$dir' and try again."
echo
exit 1
done
}
"A copy of the C library was found in an unexpected directory /UNIONFS/lib/libc-2.13.so..." And we are asked to remove it.
Code:
# Try to detect copies of the libc library in the various places
# the dynamic linker uses.
ldfile=$(readlink -e /lib/ld-linux.so.2)
ldbytes=$(head -c 20 /lib/ld-linux.so.2 | od -c)
libcfiles=$(dpkg-query -L $(package_name) 2>/dev/null)
dirs="/lib/i386-linux-gnu /lib /lib/tls /lib32 /lib64 /usr/local/lib /usr/local/lib32 /usr/local/lib64"
for dir in $dirs ; do
check_dir "in an unexpected directory" $dir
done
-
Is the "libc6_2.13-33_i386.deb" package corrupted on the Debian repository ?
Originally Posted by
Capricorny
Last week this recipe worked perfectly, but now it hangs... Is there any way to get around this ? ... For me, this is a very serious problem...
Hello Capricorny,
I don't have any problem using the script below:
Code:
#!/bin/sh
sudo apt-get update
sudo apt-get -y -d -t unstable install libc-bin libc-dev-bin libc6 libc6-dev gcc-4.6-multilib g++-4.6-multilib
sudo apt-get -y -t unstable --reinstall install libc-bin libc-dev-bin libc6 libc6-dev
sudo chroot /UNIONFS/ apt-get -y -t unstable -f install
sudo apt-get -y -t unstable --reinstall install gcc-4.6-multilib g++-4.6-multilib
After booting Knoppix 7.0.2 from the DVD and using the 64 bits kernel
I can compile and execute 64 bits libraries and applications such as Pi
cf: http://h2np.net/pi/pi_record_e.html
(after editing the start.sh script to add the "-m64" parameter on the two lines using "cc" to compile "v" and "pi")
That being said, during the install I get a very worrying error message:
Code:
apt-get -y -t unstable --reinstall install libc-bin libc-dev-bin libc6 libc6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 1453 not upgraded.
Need to get 0 B/10.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 430147 files and directories currently installed.)
Preparing to replace libc-bin 2.13-33 (using .../libc-bin_2.13-33_i386.deb) ...
Unpacking replacement libc-bin ...
Processing triggers for man-db ...
Setting up libc-bin (2.13-33) ...
(Reading database ... 430147 files and directories currently installed.)
Preparing to replace libc6:i386 2.13-33 (using .../libc6_2.13-33_i386.deb) ...
A copy of the C library was found in an unexpected directory:
'/UNIONFS/lib/i386-linux-gnu/libc-2.13.so'
It is not safe to upgrade the C library in this situation;
please remove that copy of the C library or get it out of
'/UNIONFS/lib/i386-linux-gnu' and try again.
dpkg: error processing /var/cache/apt/archives/libc6_2.13-33_i386.deb (--unpack):
subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.13-33_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
==> dpkg: error processing /var/cache/apt/archives/libc6_2.13-33_i386.deb (--unpack): <==
Is it possible that the "libc6_2.13-33_i386.deb" package be corrupted on the Debian repository ?
Even with that error, it looks like that I can still compile and execute 64 bits code...
BTW, did you try my patch yet ?
Best Regards,
Gilles
Last edited by ruymbeke; 06-24-2012 at 08:46 AM.
-
Hi Klaus,
This works great, thank you very much !
Would you consider adding these 64 bits packages in a future Knoppix DVD
such as this 64bits libraries and compile environment would be ready
to be used by the user when booting with the 64 bit kernel ?
Would you also consider adding the oprofile kernel module ?
Best Regards,
Gilles
PS: I noticed that the "libc" and "ld-linux" 64 bits libraries are now located into "/lib/i386-linux-gnu".
Shouldn't they be located into /lib64 instead (as it is on Knoppix 6.7.1) ?
Last edited by ruymbeke; 06-07-2012 at 09:17 AM.
-
Senior Member
I must confess I couldn't quite follow Klaus's explanation on booting 7.0.2 in 64-bit mode, especially since I have no experience in running 64-bit OSs. However, I tried booting with the "knoppix64" argument and when I do, System Monitor shows my PC as having 3.9GB of RAM available, whereas when booting normally, the utility is only showing 2.9GB of RAM. So I assume this means that the 64-bit kernel is working...
-
Hi otropogo,
Yes you are running a 64 bits kernel since you can see most of your RAM (3.9GB instead of 2.9GB with a 32 bits kernel).
You can also see that you are running a 64bits kernel by running the command "uname -a" from a shell console:
"Linux Microknoppix 3.3.7-64 #40 SMP PREEMPT Tue May 22 08:47:38 CEST 2012 x86_64 GNU/Linux"
As Klaus explained previously, besides the fact that a 64bits kernel allows you to use almost all of your RAM
as most 64 bits applications the 64 bits kernel is also more efficient (runs faster) but at a price of a larger footprint
which is not desirable for a CD/DVD (especially when speed does not really matter for most users and applications),
reason for Klaus to only have the 64 bits Kernel available on his great Knoppix distribution (and have all the libraries
and other applications only as 32 bits code, knowing that 32bits code can be used with a 64bits kernel).
Now if for some reason you really like or need 64 bits native code to run on that platform then you need to have
some extra libraries (as glibc) and other tools to create these 64 bits applications (as gcc) and this is exactly
these installation steps that Klaus explained previously. Hope this helps.
Best Regards,
Gilles
-
Senior Member
Originally Posted by
ruymbeke
Hi otropogo,
Yes you are running a 64 bits kernel since you can see most of your RAM (3.9GB instead of 2.9GB with a 32 bits kernel).
You can also see that you are running a 64bits kernel by running the command "uname -a" from a shell console:
"Linux Microknoppix 3.3.7-64 #40 SMP PREEMPT Tue May 22 08:47:38 CEST 2012 x86_64 GNU/Linux"
As Klaus explained previously, besides the fact that a 64bits kernel allows you to use almost all of your RAM
as most 64 bits applications the 64 bits kernel is also more efficient (runs faster) but at a price of a larger footprint
which is not desirable for a CD/DVD (especially when speed does not really matter for most users and applications),
reason for Klaus to only have the 64 bits Kernel available on his great Knoppix distribution (and have all the libraries
and other applications only as 32 bits code, knowing that 32bits code can be used with a 64bits kernel).
Now if for some reason you really like or need 64 bits native code to run on that platform then you need to have
some extra libraries (as glibc) and other tools to create these 64 bits applications (as gcc) and this is exactly
these installation steps that Klaus explained previously. Hope this helps.
Best Regards,
Gilles
Thanks Giles. If I've understood correctly now, the optional kernel allows one to use more than 3.GB of RAM, but not to run 64-bit applications. I gather there may also be some performance loss, when running 32-bit applications on the 64-bit kernel?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
HYNIX HMT31GR7BFR4C-H9 8GB PC3-10600R DDR3-1333MHZ 2Rx4 (LOT OF 8) DRAT-3
$94.00
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
Lot of 5 Major Brand 8 GB PC4-19200 (DDR4-2400) 1Rx8 DDR4 Laptop RAM
$35.96
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$22.45
EDGE SK Hynix 16GB (2 x 8GB) PC3L-12800S DDR3 SODIMM Laptop RAM NEW
$16.95
Team T-FORCE VULCAN Z 16GB (2 x 8GB) 288-Pin PC RAM DDR4 3200 (PC4 25600) Intel
$33.99
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$15.90
Dell 14" TOUCHSCREEN IntelQuadCore 16GB RAM up to 512GB SSD Fingerprint BT Win11
$235.00
Apple MacBook Pro 15.4-inch, Touch Bar, Core i7, 16GB RAM, 256GB SSD, Space Gray
$349.00