Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
multilib vs. single-lib64
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message

Joined: 14 Aug 2011
Posts: 18
Location: Berlin (Germany)

PostPosted: Thu Dec 03, 2015 12:31 pm    Post subject: multilib vs. single-lib64 Reply with quote

Attempting to build icedtea7 (openjdk) in 64-bit form on a gentoo/sparc/multilib installation I realized that it is no longer possible to use the simple approach described in my last post of

icdetea7 has much more library dependencies than icedtea6 and I didn't got them all compiled in 64-bit form on this multilib installation. Hence I tried another way, a way which usually is strongly discouraged by the sparc community: create a single-lib64-installation, an installation which has only 64-bit libraries and executables. Usually considered a no go.

How to arrive there?

1. On the initial multilib installation (CHOST="sparc-unknown-linux-gnu") I set the ROOT environment variable for portage and emerged all packages which I found on the 32-bit (multilib) stage3-image for CHOST="sparc64-unknown-linux-gnu" and added "-m64" to CFLAGS and CXXFLAGS. These are only the most important steps, there are several others but for the sake of shortness I skip them here. The aim was to build a stage3-image for further installation. This part was the most horrible of the whole story but at the end I've got such a basic stage3-image for CHOST="sparc64-unknown-linux-gnu".

2. I used this basic stage3-image for a new installation based on the well known gentoo/sparc installation guide.

3. I added device tree and other missing files from the 32-bit livecd or a 32-bit stage3-image.

4. silo enforces 32-bit code. Use any other 32-bit gentoo or linux installation for running silo or copy the 32-bit silo binaries to the new 64-bit installation. Both works.

5. Now I could boot the new single-lib64 installation.

6. Resolve minor problems with the new installation.

7. Reemerging all packages 2/3 times now from a native 64-bit host

8. Done. The machine is running stable with a performance loss of ~ 20-40% with respect to a 32-bit host

Once the very difficult transition from CHOST="sparc-unknown-linux-gnu" to CHOST="sparc64-unknown-linux-gnu" is done, only very few ebuilds create problems when emerged. Most ebuilds generate clean 64-bit output and are unaware of m64/m32 problems. They can be used without any modification. It was very easy to add X, an xfce desktop and alle required libraries for 64-bit-icedtea7.


# cat /etc/portage/make.conf
CFLAGS="-O2 -mcpu=ultrasparc3 -m64 -pipe"
USE="-systemd -gnome -kde -qt4 cdr dvd dvdr"

# ls -l /etc/portage/make.profile
lrwxrwxrwx 1 root root 51 Jul 30 19:51 /etc/portage/make.profile -> ../../usr/portage/profiles/default/linux/sparc/13.0

What are the remaining problems which need particular attention?

1. sys-apps/baselayout
The variable SYMLINK_LIB evaluates to "no" which means that /lib64 will be a symlink to /lib. It should be vice versa. This can be fixed by adding SYMLINK_LIB="yes" to the ebuild (-> overlay). Otherwise the system may suddenly get corrupt when emerging baselayout (symlink /lib will be replaced by an empty directory and /lib/ cannot be found anymore).

2. During emerge from time to time a SIGBUS error appears on my machines. These errors are not predictable. Solutions are: 'emerge --resume' or 'FEATURES=keepwork emerge --resume' after cleaning up potentially generated corrupt output files (zero-byte-files) in the build directory under (/var/tmp/portage).

3. As mentioned above, silo cannot be build for 64-bit environment.

4. I could not emerge sys-fs/udev (should be masked). Used sys-fs/eudev successfully.

5. I could not build dev-libs/elfutils (relocation error). This package should be masked as well, it is not really necessary for a basic installation.

6. systemd could not be emerged completely with all dependencies. Use openrc.

I have uploaded a tested (Sun-Blade 1500) stage3-image and 64-bit-icedtea6/7 to
User: gentoo@lariano
Password: java4sparc

for those who like to do experiments. This stage3-image is not the first basic one I used for the initial installation but a new one created later when the installation was completed. Installation should be straightforward using the gentoo/sparc installation guide and this stage3-image.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum