AUTHOR: Ken Moffat DATE: 2006-12-01 LICENSE: MIT License SYNOPSIS: How I built working multilib desktops. DESCRIPTION: A list of what I used, with detailed comments on how to build some of it. PREREQUISITES: A multilib clfs system. HINT: Foreword ________ This is never going to be an official LFS hint, it's too tied in to the specific versions of the packages. These are mostly as in BLFS-svn as at October 2006, but for a few minor things I may be using old versions. Introduction (or 'why I'm writing this') ________________________________________ Until I started playing with ppc64, my only reason to build a multilib desktop was so that I could use firefox plugins. I tried multilib x86_64 once in late 2005, but my results were somewhat rough-and-ready. It was a lot simpler to just switch back to x86 if I needed the plugins. Meanwhile, I've started to use other software (particularly the Gimp, cups, and ufraw) and ppc64 is at last at a point where I can happily use it for my main desktop (a year ago, I couldn't even build konqueror on it - a lot has improved since then). So, before I move on to newer versions of gnome and kde, it's time to record versions that I know work, with notes on the special cases. One size does not fit all _________________________ The big question on multilib builds is "which size for which packages?". In the CLFS book we build all libraries in each size. On the desktop, this only makes sense if you are going to use the library in a particular size. For x86_64, I used to take the view that the only reasons for 32-bit builds were to use binary software, or convenience (e.g. lesstif can be built 64-bit but it's too much aggravation for such a minimal item). Now that I'm using ppc64 I can see that 32-bit is often preferable (smaller, and less cache-footprint, although I don't have figures to back this up). Also, there is a bug somewhere in gimp (or glib2) which shows up in be64 during gimp startup - it tries to (re)allocate gigabytes of memory while loading the brushes, and fails if it can't. I haven't managed to debug this yet, so for the moment I build it as 32-bit. Because I've got enough trouble keeping my buildscripts up to date, I've decided to build the same sizes on ppc64 and x86_64. The following sections match the order in which I build. What I don't use ________________ At the moment, I have no use for dbus (tried it once, but it didn't work, and I couldn't find out what was broken). No doubt I'll come back to it later, but if I present a new peripheral or CD to the system, I don't expect it to try to guess what I'm going to do. Also, I don't have any use for desktop icons, they just clutter it up and hide underneath the active windows. Similarly, menus - I've got a small menu in icewm, but mostly I know what I want to open so I use ctrl-alt-space to key its name on the icewm taskbar. For the pedantic, please note that I don't run tests on anything after clfs. So, people who insist on running tests may find that my uses of 'LDFLAGS='-L/lib -L/usr/lib' cause some of the tests not to execute. What I use regularly ____________________ These are the things I use from day to day, where I would expect to notice any breakage! (I've omitted a few other packages that don't really feature in this hint) abiword, alsa, audacious, cups, dhclient, dvdrtools, epiphany, firefox, the Gimp, gnumeric, gutenprint, icewm, konqueror, kmix, kpdf, nfs, ntp, ogg-vorbis, openssh (as a client), postfix, realaudio (on ppc64, video from realplayer doesn't work for me), strace, ufraw, urxvt, xine, xpdf. General comments for multilib _____________________________ For 32-bit, configure with CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}". For 64-bit on x86_64 and ppc64 we default to 64-bit (compare mips64) so there is no need to specify CC and CXX, but remember to pass --libdir=/usr/lib64 if any libraries are installed. If you are building on ppc64 and using your own choice of packages, you'll probably encounter more packages that don't build correctly. When looking at what distros do, remember that most of them default to 32-bit on this arch. I call a 'setup' script from my main build scripts - this exports USE_ARCH and PKG_CONFIG_PATH (/usr/lib64/pkgconfig on 64-bit), and also sets the symlink for tiffconf.h (on ppc64 the fields are not the same size as on 32-bit ppc). If I built Python as multilib, I'd need to do the same thing for its headers. On x86_64 the headers probably match across the two ABIs. I put everything in /usr - if you want to separate stuff like gnome, kde or qt you'll probably have to point things to the headers and libraries. My X build optionally allows me to run a 32-bit X-server at first, to check if everything is working. Because of this, I copy some of the 32-bit data and font files for 64-bit. You can probably get away with a lot less in the 32-bit X and still use 32-bit apps on a 64-bit X-server, but I haven't tried so I don't know for sure how much is really necessary. Multilib gtk2 _____________ This has always been a problem area, and there are various ways of trying to tackle it. What I offer here is 32-bit gtk2 and pango in /etc/32 using the multiarch_wrapper for some of the programs and a wrapper script for /usr/bin/gdk-pixbuf-query-loaders to run both sizes of it (discovered this in my first build - I had a 64-bit audacious working, then built 32-bit gnome stuff and discovered that the audacious graphic was trashed - librsvg had run gdk-pixbuf-query-loaders during its install). I also have to symlink some of the bonobo servers so that epiphany and yelp will run. This now works fine for me, but I won't be surprised if there are other parts of a full gnome desktop which need attention on multilib. Multilib kde ____________ I have no idea if this is even possible. Let's be honest - kde works fine as 64-bit, none of what I use from kde is speed-critical so there is no reason for me to try to build any of it as 32-bit on ppc64 (on x86_64, 64-bit ought to always be faster because of the extra registers). The one 'plugin' I care about is real audio and the 32-bit binary (non-plugin) works fine from 64-bit konqueror on ppc64 - there is no 'flash' plugin for ppc. What I will do in this hint is point out build-flags for kde in /usr/lib64. Things I build before booting the new system ____________________________________________ I don't intend to list everything that I build in this area, merely what is interesting. Also, I build a lot of this as straight 32-bit. gdb-6.5 A straight CMMI will build this as biarch. On ppc64, the 32-bit part works fine, but 64-bit is unusable and I haven't found a solution. On x86_64, needless to say, it all works fine. pcre-6.7 I build this early, and I built both sizes For 32-bit I have to pass LDFLAGS='-L/lib -L/usr/lib' to configure. As a UTF-8 user I of course pass --enable-utf8 Possibly, I don't actually need the 32-bit version! strace-4.5.14 A straight CMMI will build this as biarch. dvdrtools-0.3.1 A straight CMMI package (unlike cdrecord), symlink it as cdrecord for convenience. A downside to this is that it uses the old (GPL'd) code so it doesn't default to burning at fastest speed. openssl-0.9.8d-32bit Use the openssl-0.9.8c-fix_manpages-1.patch from blfs On ppc64 correct the settings for linux-ppc: sed -i /linux-ppc\"/'s/-O3/-m32 -O3/' Configure ./Configure linux-ppc --openssldir=/etc/ssl --prefix=/usr shared On x86_64 fix the settings for linux-elf which uses x86_gcc_opts: sed -i /\"linux-elf\"/'s/-O3/-m32 -O3/' Configure ./Configure linux-elf --openssldir=/etc/ssl --prefix=/usr shared Then make and install with MANDIR=/usr/share/man and copy the certs like the blfs book does. openssl-0.9.8d-64bit Use the manpages patch and openssl-0.9.8b-allow_lib64-2.patch For ppc64, correct the settings for linux-ppc64: sed -i -e 's/-fPIC:-bpowerpc64-linux:.so/-fPIC::.so/' \ -e 's/-bpowerpc64-linux/-m64/' Configure ./Configure linux-ppc64 --openssldir=/etc/ssl --prefix=/usr shared For x86_64, just run Configure: ./Configure linux-x86_64 --openssldir=/etc/ssl --prefix=/usr shared Then make and install with MANDIR=/usr/share/man and LIBDIR=lib64 (NOT /usr/lib64, this package uses perl to run its configure script) and finally copy the certs. All you ever wanted to know about Xorg ______________________________________ Ok, from now on I pretty much do need to list the full order in which I build things. I started on modular X by trying to build no more than we used to have in the old monolithic builds, and by testing it as soon as I could. So, I had a fully working 32-bit X including twm and some X applications. Unfortunately, the only way I could get xterm to work (this was before I installed TrueType fonts) was to build *all* the core fonts. This still seems excessive, and I'm fairly sure that one or two of the fonts at the end of the list are probably not needed. I've left these "let's see if it works" items in the list, in parentheses. Probably I'm still building a little more than I really need, but this works (except for switching resolutions with ctrl-alt-+ - I swear I had that working once with 7.1, but it disappeared again: the native resolution is fine, so no worries). Preliminaries: 32-bit expat-2.0.0 libpng-1.2.8 with blfs patch freetype-2.1.10 move freetype-config to -32 and link to multiarch_wrapper fontconfig-2.3.2 move fc-cache, fc-list, fc-match to -32 and link to multiarch_wrapper pkg-config-0.20 move pkg-config to -32 and use multiarch_wrapper repeat as 64-bit move freetype-config to -64 move fc-cache, fc-list, fc-match to -64 move pkg-config to pkg-config-64 Protocols, 32-bit - actually, either compiler will work, so I use the default version! bigreqsproto-X11R7.0-1.0.2 compositeproto-X11R7.1-0.3.1 damageproto-X11R7.0-1.0.3 dmxproto-X11R7.0-2.2.2 evieext-X11R7.0-1.0.2 fixesproto-X11R7.1-4.0 fontcacheproto-X11R7.0-0.1.2 fontsproto-X11R7.0-2.0.2 glproto-X11R7.1-1.4.7 inputproto-X11R7.0-1.3.2 kbproto-X11R7.0-1.0.2 printproto-X11R7.0-1.0.3 randrproto-X11R7.0-1.1.2 recordproto-X11R7.0-1.13.2 renderproto-X11R7.0-0.9.2 resourceproto-X11R7.0-1.0.2 scrnsaverproto-X11R7.1-1.1.0 trapproto-X11R7.0-3.4.3 videoproto-X11R7.0-2.2.2 xcmiscproto-X11R7.0-1.1.2 xextproto-X11R7.0-7.0.2 xf86bigfontproto-X11R7.0-1.1.2 xf86dgaproto-X11R7.0-2.0.2 xf86driproto-X11R7.0-2.0.3 xf86miscproto-X11R7.0-0.9.2 xf86rushproto-X11R7.0-1.1.2 xf86vidmodeproto-X11R7.0-2.2.2 xineramaproto-X11R7.0-1.1.2 xproto-X11R7.1-7.0.5 Utilities, 32-bit - these could probably use the 64-bit compiler xorg-cf-files-X11R7.0-1.0.1 imake-X11R7.0-1.0.1 gccmakedep-X11R7.0-1.0.1 makedepend-X11R7.0-1.0.0 util-macros-X11R7.1-1.0.2 Libraries, 32-bit xtrans-X11R7.0-1.0.0 with xtrans-1.0.0-setuid.diff libXau-X11R7.1-1.0.1 libXdmcp-X11R7.1-1.0.1 libX11-X11R7.1-1.0.1 with libX11-1.0.1-setuid.diff libXext-X11R7.1-1.0.1 libICE-X11R7.1-1.0.1 libSM-X11R7.1-1.0.1 libXt-X11R7.1-1.0.2 libXmu-X11R7.1-1.0.1 libXpm-X11R7.1-3.5.5 libXp-X11R7.0-1.0.0 libXfixes-X11R7.1-4.0.1 libXrender-X11R7.1-0.9.1 libfontenc-X11R7.1-1.0.2 libxkbfile-X11R7.1-1.0.3 libXv-X11R7.0-1.0.1 libdmx-X11R7.1-1.0.2 libFS-X11R7.0-1.0.0 liblbxutil-X11R7.1-1.0.1 libXaw-X11R7.1-1.0.2 with libXaw-1.0.2-libtool_no_ed.patch libXcomposite-X11R7.1-0.3 libXcursor-X11R7.1-1.1.6 libXdamage-X11R7.1-1.0.3 libXevie-X11R7.1-1.0.1 libXfont-X11R7.1-1.1.0 configure with LDFLAGS='-L/lib -L/usr/lib' libXfontcache-X11R7.1-1.0.2 libXft-X11R7.0-2.1.8.2 configure with LDFLAGS='-L/lib -L/usr/lib' libXi-X11R7.1-1.0.1 libXinerama-X11R7.0-1.0.1 libxkbui-X11R7.1-1.0.2 libXrandr-X11R7.1-1.1.1 libXres-X11R7.1-1.0.1 libXScrnSaver-X11R7.1-1.1.0 libXTrap-X11R7.0-1.0.0 libXtst-X11R7.0-1.0.1 libXvMC-X11R7.1-1.0.2 libXxf86dga-X11R7.1-1.0.1 libXxf86misc-X11R7.1-1.0.1 libXxf86vm-X11R7.1-1.0.1 libdrm-2.0.1 Mesa, 32-bit MesaLib-6.5 with MesaDemos-6.5 and MesaGLUT-6.5 seds as in blfs target linux-dri-x86 for x86_64 for ppc64, I use a patch to create a linux-ppc32 target I move glxinfo and glxgears to -32 NB my patch builds, but I don't have acceleration, my card is from nvidia, nobody on ppc has acceleration with these. Bitmaps, 32-bit xbitmaps-X11R7.0-1.0.1 X Apps, 32-bit appres-X11R7.0-1.0.0 bdftopcf-X11R7.0-1.0.0 iceauth-X11R7.0-1.0.1 listres-X11R7.0-1.0.1 mkfontdir-X11R7.1-1.0.2 mkfontscale-X11R7.0-1.0.1 rgb-X11R7.1-1.0.1 sessreg-X11R7.0-1.0.0 (setxkbmap-X11R7.1-1.0.2) (twm-X11R7.0-1.0.1) viewres-X11R7.0-1.0.1 xauth-X11R7.0-1.0.1 (xcalc-X11R7.0-1.0.1) (xclock-X11R7.1-1.0.2) xcursorgen-X11R7.1-1.0.1 xdm-X11R7.1-1.0.4 with xdm-1.0.4-setuid.diff xdpyinfo-X11R7.0-1.0.1 xdriinfo-X11R7.1-1.0.1 xev-X11R7.0-1.0.1 xf86dga-X11R7.0-1.0.1 with xf86dga-1.0.1-setuid.diff xfontsel-X11R7.0-1.0.1 xfs-X11R7.1-1.0.2 (xgamma-X11R7.0-1.0.1) xhost-X11R7.1-1.0.1 (xinit-X11R7.1-1.0.2 with xinit-1.0.2-setuid.diff) xkbcomp-X11R7.1-1.0.2 This is needed for xkbdata, Because I only build that once, I need this here. (xkbevd-X11R7.1-1.0.2) (xkbutils-X11R7.0-1.0.1 ) (xkill-X11R7.0-1.0.1) (xlsclients-X11R7.0-1.0.1) (xlsfonts-X11R7.0-1.0.1) (xmodmap-X11R7.1-1.0.1) (xprop-X11R7.0-1.0.1) xrandr-X11R7.1-1.0.2 xrdb-X11R7.1-1.0.2 xrefresh-X11R7.1-1.0.2 xset-X11R7.1-1.0.2 xsetroot-X11R7.0-1.0.1 xsm-X11R7.0-1.0.1 xstdcmap-X11R7.0-1.0.1 xvidtune-X11R7.0-1.0.1 xvinfo-X11R7.0-1.0.1 32-bit data: xcursor-themes-X11R7.0-1.0.1 xkbdata-X11R7.0-1.0.1 At this point, I now fix the thinko for the greek keyboard: (different files contain a mix of gr and el references) ln -s gr /usr/lib/X11/xkb/symbols/pc/el Core fonts: as 32-bit - I started with what I thought I needed, then added more in three further sets, but it was only after I'd added all of them that I got xterm to work. This seems to be more than were built in 6.9.0 so all I can really say is that the first group aren't sufficient, and at least one of the last group is needed. encodings-X11R7.0-1.0.0 font-util-X11R7.1-1.0.1 font-adobe-100dpi-X11R7.0-1.0.0 font-alias-X11R7.0-1.0.1 font-bh-100dpi-X11R7.0-1.0.0 font-bh-lucidatypewriter-100dpi-X11R7.0-1.0.0 font-bh-ttf-X11R7.0-1.0.0 font-bitstream-100dpi-X11R7.0-1.0.0 font-cursor-misc-X11R7.0-1.0.0 font-ibm-type1-X11R7.0-1.0.0 font-misc-meltho-X11R7.0-1.0.0 font-misc-misc-X11R7.0-1.0.0 font-xfree86-type1-X11R7.0-1.0.0 font-adobe-utopia-type1-X11R7.0-1.0.1 font-bh-type1-X11R7.0-1.0.0 font-bitstream-type1-X11R7.0-1.0.0 font-bitstream-speedo-X11R7.0-1.0.0 font-adobe-75dpi-X11R7.0-1.0.0 font-adobe-utopia-75dpi-X11R7.0-1.0.1 font-bh-75dpi-X11R7.0-1.0.0 font-bh-lucidatypewriter-75dpi-X11R7.0-1.0.0 font-bitstream-75dpi-X11R7.0-1.0.0 font-adobe-utopia-100dpi-X11R7.0-1.0.1 font-arabic-misc-X11R7.0-1.0.0 font-cronyx-cyrillic-X11R7.0-1.0.0 font-daewoo-misc-X11R7.0-1.0.0 font-dec-misc-X11R7.0-1.0.0 font-isas-misc-X11R7.0-1.0.0 font-jis-misc-X11R7.0-1.0.0 font-micro-misc-X11R7.0-1.0.0 font-misc-cyrillic-X11R7.0-1.0.0 font-misc-ethiopic-X11R7.0-1.0.0 font-mutt-misc-X11R7.0-1.0.0 font-schumacher-misc-X11R7.0-1.0.0 font-screen-cyrillic-X11R7.0-1.0.0 font-sony-misc-X11R7.0-1.0.0 font-sun-misc-X11R7.0-1.0.0 font-winitzki-cyrillic-X11R7.0-1.0.0 now I set up the X11-OTF and X11-TTF symlinks from /usr/share/fonts (luit-X11R7.0-1.0.1 with luit-1.0.1-race-1.patch Nothing links against this, but for a 32-bit xterm using this, I built it here. I now use urxvt which doesn't need luit. The 32-bit X server xorg-server-X11R7.1-1.1.0 32-bit drivers possibly, only needed for a working 32-bit X. xf86-input-evdev-X11R7.1-1.1.2 xf86-input-keyboard-X11R7.1-1.1.0 xf86-input-mouse-X11R7.1-1.1.0 video driver as appropriate xf86-video-ati-X11R7.1-6.6.0 on my x86_64 xf86-video-nv-X11R7.1-1.1.1 on my G5 (xterm for me, --enable-luit --with-wide-chars At this point, if you intend to test the 32-bit X you can configure it and then run whater tests. 64-bit core fonts: mkdir -p /usr/lib64/X11 && ln -s ../../lib/X11/fonts /usr/lib64/X11/fonts From here on, configure X with --datadir=/usr/lib64 --libdir=/usr/lib64. 64-bit prototypes: Repeat all the prototypes. The headers will overwrite, but the .pc files will go into /usr/lib64/pkgconfig this time. 64-bit libraries: Repeat all the libraries. 64-bit Mesa: MesaLib-6.5 with MesaDemos-6.5 and MesaGLUT-6.5 target is linux-dri-x86-64 or linux-ppc64 (latter needs my patch) seds, but referencing lib64 also sed -i 's%\(\$1/lib\)%\164%' bin/installmesa 64-bit Bitmaps: Repeat xbitmaps 64-bit X apps: Repeat All the Apps, including any which are in (parentheses) on 32bit. For xcursor-themes and xkbdata ln -sv ../lib/icons /usr/lib64/icon ln -sv ../../lib/X11/xkb /usr/lib64/X11/xkb The 64-bit server: Repeat xorg-server 64-bit drivers: Repeat all the drivers appropriate to your hardware. 64-bit terminal: xterm-215 optionally --enable-luit --with-wide-chars or urxvt-8.0 --prefix=/usr --libdir=/usr/lib64 and optionally make xterm a symlink for this, if your .xinitrc or anything else reference xterm. You can now configure X. More (TTF) fonts: The are nominally built as 64-bit, but they aren't actually compiled, and they install into /usr/share/fonts/ freefont-ttf-20060126 dejavu-ttf-2.4 don't forget to edit local.conf for this. fireflysung-1.3.0 kochi-substitute-2030628 baekmuk-ttf-2.2 After this, I run fc-cache-32 on these directories, I don't know if that is necessary. Now back to 32-bit: lesstif-0.94.4 I only build this so that I can use mwm for the next part of the build (I find it a little more useful than twm), and for xpdf. I have done this as 64-bit in /usr/lib64 in the past, but it needed a certain amount of experiment to get it all to build and install in the proper place, so for the current version I just go with 32-bit.) This provides mwm, which I find slightly less-unusable than twm. Note that you can happily use a 32-bit window manager on your 64-bit desktop, so I can now build on the desktop instead of in a console. Basic tools and my preferred window manager ___________________________________________ First some stuff using the default compiler: unzip552 with the blfs patches make linux_noasm make prefix=/usr install zip231 make prefix=/usr -f unix/Makefile generic_gcc install -v -m 0755 zip zipnote zipsplit zipcloak /usr/bin install -v -m 0644 man/zip.1 /usr/share/man/man1 CharisSIL4.0.02.r1 (a zipped font, I find it helps for phonetic symbols) XML-Parser-2.34 Due to the wonders of multiarch_wrapper, this builds modules for the 64-bit version. It's position here dates back to when we only had one size of perl (which, for me, is more than enough perl ;-) 32-bit: jpegsrc.v6b with Ryan's jpegsrc.v6b-update_configury-1.patch configure with LDFLAGS='-L/lib -L/usr/lib' libtiff-3.8.2 configure with LDFLAGS='-L/lib -L/usr/lib' cairo-1.0.4 sed from blfs configure with LDFLAGS='-L/lib -L/usr/lib' glib2-2.10.3 configure with --host=${CLFS_TARGET32} is required on x86_64 popt-1.10.4 The Makefile author is convinced this should be in lib64 even though it correctly works out the option to pass to ld for 32-bit when called with a 32-bit compiler. So start with the blfs sed sed -i -e "/*origOptString ==/c 0)" popt.c and follow with sed -i -e "s/@MARK64@//" Makefile.a and then autoreconf -f -i pango-1.12.3 pass --sysconfdir=/etc/32 to configure after installing, mv -v /usr/bin/pango-querymodules{,-32} ln -sv multiarch_wrapper /usr/bin/pango-querymodules atk-1.11.4 gtk+-2.8.18 pass --sysconfdir=/etc/32 to configure after installing, mv -v /usr/bin/gdk-pixbuf-csource{,-32} mv -v /usr/bin/gdk-pixbuf-query-loaders{,-32} mv -v /usr/bin/gtk-query-immodules-2.0{,-32} ln -svf multiarch-wrapper /usr/bin/gdk-pixbuf-csource ln -svf multiarch_wrapper /usr/bin/gtk-query-immodules-2.0 >>$LOG 2>&1 You will observe that gdk-pixbuf-query-loaders is NOT linked to the multiarch_wrapper. This is because it can be run by other programs during their install (e.g. librsvg). What we need is a way of making sure that the loaders for both sizes are available at runtime. This will be addressed after we have installed the 64-bit version. libIDL-0.8.6 libidn-0.6.3 firefox-2.0-source Start with the basic BLFS instructions for 1.5 without a system nss. On ppc64, you can probably use 1.5 if you really want to, but you will need to use the (newer) separate nss, the nss/nspr code in 1.5 doesn't build on ppc64. Visibility is broken everywhere except on x86, so echo "ac_cv_visibility_pragma=no" >>.mozconfig Sed it to correctly link against X (I got this from Jim, but had to change the delimiters from '!' because bash on one of my systems didn't like it). sed -i "s%@MOZ_GTK2_LIBS@%@MOZ_GTK2_LIBS@ -L/usr/lib -lX11 -lXrender%g" \ config/autoconf.mk.in The following are from the cblfs wiki: echo "CC=\"gcc ${BUILD32}\"" >>.mozconfig echo "CXX=\"g++ ${BUILD32}\"" >>.mozconfig echo "ac_add_options --host=$CLFS_TARGET32" >>.mozconfig echo "ac_add_options --build=$CLFS_TARGET32" >>.mozconfig echo "mk_add_options CONFIG_GUESS=$CLFS_TARGET32" >>.mozconfig For x86_64 build this with make -f client.mk OS_TEST=x86 build make -f client.mk OS_TEST=x86 install For ppc64 build with make -f client.mk OS_TEST=ppc build make -f client.mk OS_TEST=ppc install Follow with the blfs install -d and symlink for the default icon. At this point I fix up the 32-bit pangorc: cat >/etc/32/pangorc << "EOF" [Pango] ModuleFiles = /etc/32/pango/pango.modules [PangoX] AliasFiles = /etc/32/pango/pangox.aliases EOF gcc-3.3.6 This is only necessary if you have binary software linked to libstdc++.so.5, such as realplayer. This no longer builds on ppc64, the only solution is to build on 32-bit ppc and then copy libstdc++.so.5.0.7, which sucks mightily. The bz for this is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23158 Experimentation shows that gcc-4.1.1 can build 4.0.3 on ppc64, but even 4.0.3 cannot build 3.3.6 (I haven't tried to see if 4.0.3 can build 3.4.6, I gave up). The following build method is taken from gentoo, but avoiding the hoops they have to jump through to fit in with their install process. This is an "unsupported" way of building, but since gcc-3.3 is no longer supported, and because gcc-3.3.6 doesn't build on ppc64 even using the recommended 'make bootstrap', I do this to save time. From a gcc-build directory, ../gcc-3.3.6/configure --disable-nls --enable_threads=posix \ --enable-languages=c,c++ For my usage, I don't need ay other build options. make all-target-libstdc++-v3 install -m 0755 -v \ x86_64-unknown-linux-gnu/32/libstdc++v3/src/.libs/libstdc++.so.5.0.7 \ /usr/lib ln -sv libstdc++.so.5.0.7 /usr/lib/libstdc++.so.5 ldconfig (if you tried to install libstdc++.so.5, which is a symlink in the .libs/ directory, you would end up with a copy of the binary and ldconfig would complain that it wasn't a symlink) lcms-1.15 I only build this as 32-bit because ufraw (plugin for the Gimp) needs it, and I can't yet build a working 64-bit gimp on ppc64. XML-Parser-2.34 tucked on at the end, like all perl it doesn't need extra options, multiarch_wrapper fixes it all up. 64-bit: (don't forget --libdir) (if I was starting from scratch, I'd build XML-Parser here) jpegsrv.v6b with jpegsrc.v6b-update_configury-1.patch libtiff-3.8.2 giflib-2.10.3 lcms-1.15 libmng-1.0.9 This is for konqueror, which knows about .mng graphics. Use a sed to take out /usr/local, use lib64, and fix the resulting bogus lib64mng (the 'obvious' sed only changing /lib64$ didn't work when I tried it, YMMV). sed -e 's%/local%%' -e 's%/lib%/lib64%' -e 's%lib64mng%libmng%' \ makefiles/makefile.linux On x86_64 this need to use -fPIC sed -i 's%-O3%-O3 -fPIC%' Makefile You can now just 'make' using the Makefile created by the first sed. cairo-1.0.4 again with the blfs sed glib-2.10.3 popt-1.10.4 I now get rid of the MARK64 rubbish before running the sed and autoreconf sed -i -e "s/@MARK64@//" Makefile.am sed -i -e "/*origOptString ==/c 0)" popt.c autoreconf -f -i Now configure, remembering --libdir=/usr/lib64 pango-1.12.3 after installing, mv -v /usr/bin/pangoquerymodules{,64} ln -svf multiarch_wrapper /usr/bin/pango-querymodules atk-1.11.4 gtk+-2.8.18 For ppc64, this needs to be configured with ./configure CFLAGS='-O2 -mminimal-toc' as well as the normal options. after installing, mv -v /usr/bin/gdk-pixbuf-csource{,-64} mv -v /usr/bin/gdk-pixbuf-query-loaders{,-64} mv -v /usr/bin/gtk-query-immodules-2.0{,-64} ln -svf multiarch-wrapper /usr/bin/gdk-pixbuf-csource ln -svf multiarch_wrapper /usr/bin/gtk-query-immodules-2.0 Now that we've installed the second gdk-pixbuf-query-loaders and then moved it to {-64} we can create the multilib script to run both versions. If we did this earlier, it would get overwritten when we installed the 64-bit gtk+. cat >/usr/bin/gdk-pixbuf-query-loaders << "EOF" #!/bin/bash # run both sizes of gdk-pixbuf-query-loaders whenever it is run if [ -x /usr/bin/gdk-pixbuf-query-loaders-32 ]; then /usr/bin/gdk-pixbuf-query-loaders-32 fi if [ -x /usr/bin/gdk-pixbuf-query-loaders-64 ]; then /usr/bin/gdk-pixbuf-query-loaders-64 fi EOF chmod +x /usr/bin/gdk-pixbuf-query-loaders libIDL-0.8.6 qt-x11-free-3.3.7 this needs specific configure options, note they are specified with a single dash. I assume you have read the licence offer already - if not, omit the "echo 'yes' |" so you can read and accept it. echo 'yes' | ./configure -prefix /usr -docdir /usr/share/doc/qt \ -libdir /usr/lib64 -platform linux-g++-64 \ -headerdir /usr/include/qt -plugindir /usr/lib64/qt/plugins \ -datadir /usr/share/qt -translationdir /usr/share/qt/translations \ -sysconfdir /etc/qt -qt-gif -system-zlib -system-libmng \ -no-exceptions -thread -plugin-imgfmt-png \ -system-libjpeg -system-libpng Now follow with a lib64 variant of the BLFS sed find -type f -name Makefile | xargs sed -i "s@-Wl,-rpath,/usr/lib64@@g" bc-1.06 with the blfs patches I only build this for xscreensaver which comes a lot later, all my calculations use awk (and yes, I do still record my build times and space, although I don't think the times are repeatable to closer than a few seconds). This doesn't need --libdir. libidn-0.6.3 icewm-1.2.28 This is my preferred wm, I build it here. I configure with --without-imlib which means I have to use .xpm files for icons. This doesn't install any libraries. I can now install the realplayer binary. More tools __________ These have been deferred to a separate script so that I can use icewm while I build them. Sizing here is sometimes arbitrary - tcl/tk are of minimal interest to me nowadays, and Python is only for gnome to use if it must. Cups needs to be built in both sizes to provide the libraries, and gutenprint has to be the same size as the Gimp because it links to it for the print plugin (it also provides drivers for cups - these are xml files, so either size would work for those). 32-bit: libart_lgpl-2.3.17 cups-1.2.7-source Exceptionally, this needed --libdir=/usr/lib otherwise the main libraries go into /usr/lib64 with everything else in /usr/lib/cups. That might have been fixed by now, but at worst it seems to do no harm. espgs-8.15.2-source a2ps-4.13b xpdf-3.01 with the patch to pl2 tcl8.4.12-src I've had difficulties in the past with tcl, which caused me to move away from what was in the blfs book. Because I'm using what is now an old version, I'll spell out the details for tcl, tk, and expect. First fix the configure script so that bash is happy: sed -i "s/relid'/relid/" configure configure and make as normal: CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \ ./configure --prefix=/usr --enable-threads && make now run some more seds, I think the first batch were in blfs: sed -i "s:${DIR}/unix:/usr/lib:" tclConfig.sh sed -i "s:${DIR}:/usr/include/tcl${V}:" tclConfig.sh sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',\ TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh and another to get tk to build, this one from gentoo: sed -i "s,^TCL_SRC_DIR=.*,TCL_SRC_DIR=/usr/lib/tcl${V}/include," \ tclConfig.sh then install and fix up the headers, again I think this is from blfs: make install install -d /usr/include/tcl8.4/unix install -m644 *.h /usr/include/tcl8.4/unix/ install -d /usr/include/tcl8.4/generic install -c -m644 ../generic/*.h /usr/include/tcl8.4/generic/ rm -f /usr/include/tcl8.4/generic/{tcl,tclDecls,tclPlatDecls}.h ln -nsf ../../include/tcl8.4 /usr/lib/tcl8.4/include ln -sf libtcl8.4.so /usr/lib/libtcl.so ln -sf tclsh8.4 /usr/bin/tclsh tk8.4.12-src Again, I think these instructions were in blfs. configure and make as normal: DIR=$PWD cd unix CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \ ./configure --prefix=/usr --enable-threads make now fix up tkConfig.sh: sed -i "s:${DIR}/unix:/usr/lib:" tkConfig.sh sed -i "s:${DIR}:/usr/include/tk${V}:" tkConfig.sh and install and fix the headers: make install install -d /usr/include/tk8.4/unix install -m644 *.h /usr/include/tk8.4/unix/ install -d /usr/include/tk8.4/generic install -m644 ../generic/*.h /usr/include/tk8.4/generic/ rm -f /usr/include/tk8.4/generic/{tk,tkDecls,tkPlatDecls}.h ln -nsf ../../include/tk8.4 /usr/lib/tk8.4/include ln -sf libtk8.4.so /usr/lib/libtk.so ln -sf wish8.4 /usr/bin/wish Python-2.4.2 with the gdbm and db44 patches from blfs - the patch for multilib isn't needed because I only build this as 32-bit. expect-5.43.0 with the LFS patch I pass --with-tclinclude=/usr/include/tcl8.4 to configure. dejagnu-1.4.4 libxml2-2.6.22 libxslt-1.1.15 aspell-0.60.4 configure with LDFLAGS='-L/lib -L/usr/lib' aspell6-de-20030222-1 (German dictionary) aspell6-en-6.-0 (English dictionary) aspell-fr-0.50.3 (French dictionary) libglade-2.5.1 configure with LDFLAGS='-L/lib -L/usr/lib' poppler-0.4.5 configure with LDFLAGS='-L/lib -L/usr/lib' libexif-0.6.13 gimp-2.2.12 configure with LDFLAGS='-L/lib -L/usr/lib' and --disable-print. on my x86_64 which I use for multilib (a SanDiego) I need to configure with --disable-mmx otherwise it won't build. ufraw-0.9.1 configure with --prefix=/usr --enable-extras Some cameras will need other dependencies. gutenprint-5.0.0 configure --with-gimp2 gamin-0.1.7 configure with LDFLAGS='-L/lib -L/usr/lib' and --disable-print. 64-bit: (don't forget --libdir) libart_lgpl-2.3.17 libexif-0.6.13 jhead-2.4 this is an old version, I had gcc-4 problems last time I tried the 2.5 version. make strip --strip-unneeded jhead install -m 0755 jhead /usr/bin install -m 0644 jhead.1.gz /usr/share/man/man1 cups-1.2.7-source just a straight ./configure this time follow with the cups bootscripts espgs-8.15.2-source ImageMagick-6.2.5-5 This is one of those packages with a new version appearing every week or thereabouts, often to fix vulnerabilities. libxml2-2.6.22 configure --without-python because it finds the headers from the install of the 32-bit Python - on ppc64 these headers don't match the 64-bit definitions and anyway the libraries are absent. libxslt-1.1.5 similarly, configure --without-python curl-7.15.1 gamin-0.1.7 yet again, configure --without-python libglade-2.5.1 poppler-0.4.5 This needs a sed to tell it to look in /usr/lib64 for the QT libs sed -i '/^qt_libdirs=/s%/lib%/lib64%g' configure xscreensaver-4.21 No libraries, but configure with --libexecdir=/usr/lib64 foomatic-filters-3.0.2 There is a slight doubt about whether I really need these to print regular text and web pages, but they don't do any harm. ghostscripts-fonts-std-8.11 gnu-gs-fonts-other-6.0 Audiovideo __________ Here, I get sound working (and DVDs playing) working. This stuff is all 64-bit, I couldn't see a reason to build any of it as 32-bit. The --libdir option is needed for all the libraries. audiofile-0.2.6 libao-0.8.6 libogg-1.1.3 libvorbis-1.1.2 libmad-0.15.1b id3lib-3.8.3 libdvdcss-1.2.9 libdvdread-0.8.6 a52dec-0.7.4 for x86_64 pass CFLAGS="$CFLAGS -fPIC" in configure taglib-1.4 xine-lib-1.1.2 configure with --with-xv-path=/usr/lib64 mpeg2dec-0.4.0b (libmpeg2) configure with --disable-accel-detect libid3tag-0.15.1b if my memory is correct, this is for kaffeine mpg321-0.2.10 with the mpg321-0.2.10-useragent.patch from gentoo not in BLFS, but a straight CMMI package licensed under the GPL and maintained until recently - compare mpg123. vorbis-tools-1.0.1 configure with --enable-vcut lame-3.96.1 configure with --enable-mp3rtp cdparanoia-III-alpha9.8.src with blfs patches cdrdao-1.2.2 audacious-1.1.1 ffmpeg-0.4.9-p20060302 I apply the sed from blfs transcode-1.0.2 with a transcode-types.patch.bz2 from gentoo which is needed on ppc64 (they apply it to all architectures). NB - I don't know if this package works, I haven't found a reason to use it yet. I made an effort to ensure that all the relevant options are selected. So, my full configure is ./configure --prefix=/usr --libdir=/usr/lib64 \ --with-lame-libs=/usr/lib64 --with-libjpeg-libs=/usr/lib64 \ --with-libdvdread-libs=/usr/lib64 \ --enable-freetype2 --with-freetype2-libs=/usr/lib64 \ --enable-ogg --with-ogg-libs=/usr/lib64 \ --enable-vorbis --with-vorbis-libs=/usr/lib64 \ --enable-a52 --with-a52-libs=/usr/lib64 \ --enable-imagemagick --with-imagemagick-libs=/usr/lib64 \ --enable-libxml2 --with-libxml2-libs=/usr/lib64 xine-ui-0.99.4 Gnome-related _____________ Since I wanted to try a bi-arch gnome, I decided to go with a 32-bit gecko and a 32-bit abiword. I decided to use 64-bit gdm and gnumeric. 32-bit: intltool-0.34.2 Actually, this is just a set of scripts so it is ABI-neutral. libcroco-0.6.1 configure with LDFLAGS='-L/lib -L/usr/lib' hicolor-icon-theme-0.9 shared-mime-info-0.17 From here on, export XDG_DATA_DIRS=/usr/share:/etc/gnome/xdg The BLFS book makes a great effort to allow gnome to be placed in other than /usr, and to put its /etc files into a version-specific directory. No doubt that makes sense if you want to try multiple versions of gnome, or if you rebuild the desktop packages more often than you rebuild the system. I take a different view - gnome is in /usr, and sysconfdir is /etc/gnome ORBit2-2.14.0 configure with LDFLAGS='-L/lib -L/usr/lib' libbonobo-2.14.0 configure with LDFLAGS='-L/lib -L/usr/lib' GConf-2.14.0 configure with LDFLAGS='-L/lib -L/usr/lib' desktop-file-utils-0.11 configure with LDFLAGS='-L/lib -L/usr/lib' gnome-mime-data-2.4.2 gnome-vfs-2.14.2 configure with LDFLAGS='-L/lib -L/usr/lib' libgsf-1.14.1 configure with LDFLAGS='-L/lib -L/usr/lib' libgnome-2.14.1 configure with LDFLAGS='-L/lib -L/usr/lib' libgnomecanvas-2.14.0 configure with LDFLAGS='-L/lib -L/usr/lib' libbonoboui-2.14.0 configure with LDFLAGS='-L/lib -L/usr/lib' gnome-icon-theme-2.14.2 gnome-keyring-0.4.9 configure with LDFLAGS='-L/lib -L/usr/lib' libgnomeui-2.14.1 configure with LDFLAGS='-L/lib -L/usr/lib' Back to ABI-independent stuff: docbook-xml-4.4 Resume 32-bit: scrollkeeper-0.3.14 configure with LDFLAGS='-L/lib -L/usr/lib' gnome-doc-utils-0.6.1 gnome-desktop-2.14.2 configure with LDFLAGS='-L/lib -L/usr/lib' libgnomecups-0.2.2 configure with LDFLAGS='-L/lib -L/usr/lib' libgnomeprint-2.12.1 configure with LDFLAGS='-L/lib -L/usr/lib' libgnomeprintui-2.12.1 configure with LDFLAGS='-L/lib -L/usr/lib' startup-notification-0.8 configure with LDFLAGS='-L/lib -L/usr/lib' yelp-2.14.2 configure with LDFLAGS='-L/lib -L/usr/lib' librsvg-2.14.4 configure with LDFLAGS='-L/lib -L/usr/lib' This will install its plugins to /usr/lib/mozilla/plugins so move them to /usr/lib/firefox-2.0/plugins and remove the spurious mozilla directory. gtksourceview-1.6.1 configure with LDFLAGS='-L/lib -L/usr/lib' gedit-2.14.3 configure with LDFLAGS='-L/lib -L/usr/lib' gcalctool-5.8.16 configure with LDFLAGS='-L/lib -L/usr/lib' gucharmap-1.6.0 configure with LDFLAGS='-L/lib -L/usr/lib' This is a handy tool when you are getting to grips with UTF-8 but it may be less useful in non-UTF-8 locales. iso-codes_0.49.orig As in blfs epiphany-1.8.3 I deliberately use an old version here to avoid the overhead of having to run dbus and all the things BLFS shows it depending on. configure with LDFLAGS='-L/lib -L/usr/lib' enchant-1.2.6 configure with LDFLAGS='-L/lib -L/usr/lib' fribidi-0.10.7 goffice-0.2.1 configure with LDFLAGS='-L/lib -L/usr/lib' abiword-2.4.6 configure with LDFLAGS='-L/lib -L/usr/lib' 64-bit: (with --libdir for libraries) libcroco-0.6.1 ORBit2-2.14.0 libbonobo-2.14.0 Now that we have both sizes of libbonobo, anything trying to access the server files will only find them in the directories for the second version, that is, in /usr/lib64. Your guess is as good as mine why epiphany and yelp need to find their own server files, but we've just broken them! Fix them with the following two symlinks: ln -s ../../../lib/bonobo/servers/GNOME_Epiphany_Automation.server \ /usr/lib64/bonobo/servers/ ln -s ../../../lib/bonobo/servers/GNOME_Yelp.server \ /usr/lib64/bonobo/servers/ There is also a server file from abiword, but the application runs fine without making a symlink (that might not be true on a full gnome desktop). GConf-2.14.0 gnome-vfs-2.14.2 libgsf-1.14.1 libgnome-2.14.1 libgnomecanvas-2.14.0 libbonoboui-2.14.0 gnome-keyring-0.4.9 libgnomeui-2.14.1 scrollkeeper-0.3.14 gnome-doc-utils-0.6.1 libgnomecups-0.2.2 libgnomeprint-2.12.1 libgnomeprintui-2.12.1 librsvg-2.14.4 This time, the plugins are in /usr/lib64/mozilla/plugins where they won't do any harm. gdm-2.14.9 This finds the headers from my 32-bit tcp-wrappers, but there are no 64-bit libraries for this on my system. I don't need tcp-wrappers because I don't allow remote login to my desktops. So, I configure --with-tcp-wrappers=no fribidi-0.10.7 goffice-0.2.1 gnumeric-1.6.3 KDE ___ As noted earlier, this is all 64-bit. The dependencies have already been built. So, add the following line to configure for each of these: --with-qt-libraries=/usr/lib64 --enable-libsuffix=64 --libdir=/usr/lib64 arts-1.5.5 kdelibs-3.5.5 kdebase-3.5.5 kdemultimedia-3.5.5 Actually, I only build kmix from this, so after configure cd kmix make make install cd ../ kdegraphics-3.5.5 kdeutils-3.5.5 kaffeine-0.8.2 This is missing a couple of possible dependencies, so configure --without-dvb --without-gstreamer ACKNOWLEDGEMENTS: _________________ The blfs team for the basic instructions and dependency info. The other members of the clfs team, particularly Jim and Joe for their help with multilib issues, and Ryan for initially indicating how to build a lot of the blfs packages on multilib. Debian, fedora, and gentoo for patches and occasional indications of which configure options are useful. CHANGELOG: __________ 2006-12-01 Released.