Slackware for x86_64 - multilib packages & build instructions
=============================================================

Slackware for the x86_64 architecture (or Slackware64 for short) is a pure
64-bit Operating System, but by design it is "multilib-ready".  This means,
that is it is possible to add a layer of software that will allow you to run
32bit software without changes to either Slackware64 or these 32bit packages.
Furthermore, the multilib-enabled Slackware64 can compile 32bit binaries,
if you add the right software to it.

This README contains instructions on how to use the packages in this
directory to create a multilib Slackware64.

The exciting thing about Slackware64, is that you do not have to compile
all these basic 32-bit packages from scratch.  You simply take them from the
32-bit Slackware package tree!  Further down, I will explain how you can take
a 32-bit Slackware package (say, the "mesa" package) and strip/re-package its
content into a "mesa-compat32" package that you can install straight away.


Enabling multilib
=================

Fast-track (examples assume slackware64-13.1 ... change to your needs):

* In the location where you found this README, download the subdirectory with
  the name that corresponds to the Slackware version you are running.  For
  Slackware64 13.1 for instance, you would run the following command:
  "lftp -c 'open http://slackware.com/~alien/multilib/ ; mirror 13.1'"
  and then change into the new "13.1" directory.
* First, upgrade your 64bit Slackware gcc and glibc packages to their multilib
  versions by running the command:
  "upgradepkg --reinstall --install-new *.t?z"
  in the directory you just changed to (the "13.1" directory in our case).
  This will upgrade gcc and glibc packages, and also install a new package
  called "compat32-tools".
* You are now going to install 32-bit compatibility packages to support all
  the 32-bit programs you may want to run (roughly 60 MB of packages, not all
  that much really!).  To do so, change to the subdirectory called
  "slackware64-compat32" which you also downloaded with the "lftp" command
  shown above.  Run this command:
  "upgradepkg --install-new *-compat32/*.t?z"
* This procedure will also work if you already had a multilib setup and have
  upgraded your Slackware to a newer release (new compat32 packages will be
  installed and existing ones will be upgraded).
* Done!

In more detail:

The following packages are replacements for - not additions to - standard
Slackware packages.  You use the "upgradepkg" program to upgrade to my
multilib versions of gcc and glibc.  You will need these in order to run,
and build, 32-bit software on your 64-bit Slackware computer:

==Slackware64 13.0==

* The gcc compiler suite:
  - gcc-4.3.3_multilib-x86_64-4alien.txz
  - gcc-g++-4.3.3_multilib-x86_64-4alien.txz
  - gcc-gfortran-4.3.3_multilib-x86_64-4alien.txz
  - gcc-gnat-4.3.3_multilib-x86_64-4alien.txz
  - gcc-java-4.3.3_multilib-x86_64-4alien.txz
  - gcc-objc-4.3.3_multilib-x86_64-4alien.txz

* The GNU libc libraries:
  - glibc-2.9_multilib-x86_64-5alien_slack13.0.txz
  - glibc-i18n-2.9_multilib-x86_64-5alien_slack13.0.txz
  - glibc-profile-2.9_multilib-x86_64-5alien_slack13.0.txz
  - glibc-solibs-2.9_multilib-x86_64-5alien_slack13.0.txz
  - glibc-zoneinfo-2.9_multilib-noarch-5alien_slack13.0.txz

==Slackware64 13.1==

* The gcc compiler suite:
  - gcc-4.4.4_multilib-x86_64-1alien.txz
  - gcc-g++-4.4.4_multilib-x86_64-1alien.txz
  - gcc-gfortran-4.4.4_multilib-x86_64-1alien.txz
  - gcc-gnat-4.4.4_multilib-x86_64-1alien.txz
  - gcc-java-4.4.4_multilib-x86_64-1alien.txz
  - gcc-objc-4.4.4_multilib-x86_64-1alien.txz

* The GNU libc libraries:
  - glibc-2.11.1_multilib-x86_64-5alien_slack13.1.txz
  - glibc-i18n-2.11.1_multilib-x86_64-5alien_slack13.1.txz
  - glibc-profile-2.11.1_multilib-x86_64-5alien_slack13.1.txz
  - glibc-solibs-2.11.1_multilib-x86_64-5alien_slack13.1.txz
  - glibc-zoneinfo-2.11.1_multilib-noarch-5alien_slack13.1.txz

==Slackware64 13.37==

* The gcc compiler suite:
  - gcc-4.5.2_multilib-x86_64-2alien.txz
  - gcc-g++-4.5.2_multilib-x86_64-2alien.txz
  - gcc-gfortran-4.5.2_multilib-x86_64-2alien.txz
  - gcc-gnat-4.5.2_multilib-x86_64-2alien.txz
  - gcc-java-4.5.2_multilib-x86_64-2alien.txz
  - gcc-objc-4.5.2_multilib-x86_64-2alien.txz

* The GNU libc libraries:
  - glibc-2.13_multilib-x86_64-3alien.txz
  - glibc-i18n-2.13_multilib-x86_64-3alien.txz
  - glibc-profile-2.13_multilib-x86_64-3alien.txz
  - glibc-solibs-2.13_multilib-x86_64-3alien.txz
  - glibc-zoneinfo-2.13_multilib-noarch-3alien.txz

==Slackware64 current==

* The gcc compiler suite:
  - gcc-4.7.1_multilib-x86_64-1alien.txz
  - gcc-g++-4.7.1_multilib-x86_64-1alien.txz
  - gcc-gfortran-4.7.1_multilib-x86_64-1alien.txz
  - gcc-gnat-4.7.1_multilib-x86_64-1alien.txz
  - gcc-go-4.7.1_multilib-x86_64-1alien.txz
  - gcc-java-4.7.1_multilib-x86_64-1alien.txz
  - gcc-objc-4.7.1_multilib-x86_64-1alien.txz

* The GNU libc libraries:
  - glibc-2.15_multilib-x86_64-7alien.txz
  - glibc-i18n-2.15_multilib-x86_64-7alien.txz
  - glibc-profile-2.15_multilib-x86_64-7alien.txz
  - glibc-solibs-2.15_multilib-x86_64-7alien.txz
  - glibc-zoneinfo-2012f_2012f_multilib-noarch-7alien.txz


=======================================================================

There is one more package (compat32-tools); you install it using the
"installpkg" program:

* A "32-bit toolkit" (scripts that facilitate the creation of 32bit packages)
  - compat32-tools-2.1-noarch-11alien.tgz

* The above packages cover the essentials for getting ready to run and compile
  32-bit software on Slackware64.  But in order to be able to actually run
  software, you need a "layer" of additional 32-bit support libraries as well.
  These libraries are taken from standard Slackware 32-bit packages using the
  scripts that are part of my "compat32-tools" package.
* You use the "massconvert32.sh" script for this conversion; suppose you have
  a local copy of 32-bit Slackware available in the directory:
    /home/ftp/pub/slackware/slackware-13.1
  then you run the command:
  "massconvert32.sh -i /home/ftp/pub/slackware/slackware-13.1/slackware"
  and the result is a number of subdirectories in your current directory,
  containing "compat32" packages which you can install directly (they will not
  conflict with your 64-bit packages).
* You can also tell the script to download everything needed from an external
  Slackware mirror, if you do not have a local copy:
  "massconvert32.sh -u http://slackware.mirrors.tds.net/pub/slackware/slackware-13.1/slackware"
* Or if you are lazy you just download the "slackware64-compat32" directory
  in which I provide all these converted packages for you; it is a subdirectory
  of the one containing the multilib gcc and glibc packages.

NOTE:
  Slamd64 had separate 64bit and 32bit gcc/glibc multilib packages.
  However, I decided that it is cleaner to keep these essential multilib
  packages undivided.  Just like Slackware64's own binutils, which has
  64-bit and 32-bit multilib capability bundled into one package too.


Adding 32-bit programs
======================

The scripts in the "compat32-tools" package need some explanation.
The package installs a detailed 'README' in the /usr/doc/compat32-tools-*/
directory that will help you on your way.  Basically, you get three scripts
to run:
  - /etc/profile.d/32dev.sh
    This is the same script that also comes with Slamd64 and which configures
    an environment that you need for compiling 32-bit software (by preferring
    the 32-bit compilers and libraries over their 64-bit versions)
  - convertpkg-compat32
    This script takes a 32-bit Slackware package and converts it to a
    '-compat32' package that you can install (using "installpkg") on
    Slackware64, alongside a 64-bit version of the same software.
  - massconvert32.sh
    This script has an internal list of an essential set of 32-bit Slackware
    packages. It uses the previous "convertpkg-compat32" script to grab
    every package that is on the internal package list, and convert that
    into '-compat32' packages. You will end up with about 60 MB of packages
    that you should install next, using "installpkg", to form a pretty
    complete 32-bit compatibility layer on top of Slackware64.  Of course,
    you must have a local 32-bit Slackware package tree available or this
    conversion process won't work!  The script takes the pathname for your
    local package tree as its argument, and optionally you can specify an
    output directory other than your current directory.


Running 32-bit programs
=======================

Running a 32-bit program is easy after the above system preparation - just
download, install and start it.  You may find that you still miss a 32-bit
Slackware library; in that case, use the "convertpkg-compat32" program to
convert the original 32-bit Slackware package and install the resulting
32bit compatibility package on Slackware64.


Compiling 32-bit programs
=========================

In case you need to compile a 32-bit program (wine and grub are two examples
of open source programs that are 32-bit only) you first configure your
shell environment by running the command:

  . /etc/profile.d/32dev.sh

Note the 'dot' in front of the filename - that is actually part of the
commandline!  It will change or create several environment variables so
that 32-bit versions of binaries are preferred.

You will be able to use standard SlackBuilds to build 32-bit packages for
Slackware64.  There are two things to keep in mind:
(1) You will have to define the ARCH variable as 'x86_64' even though you
    are compiling a 32-bit program!
(2) You will have to edit the SlackBuild and if it wants to use 'lib64/'
    directories for "$ARCH = x86_64", you will have to force it to use 'lib/'
    directories instead.  Usually, this is accomplished by finding a definition
    like:
      LIBDIRSUFFIX="64"
    and change this line to
      LIBDIRSUFFIX=""


Acknowledgements
================

A lot of thanks should go to Fred Emmott, who created Slamd64, the original
unofficial 64-bit fork of Slackware.  Although Slackware64 was not based
on Fred's work, I still learnt most of what I know about setting up the
32-bit part of a multilib Linux from his writings that are found in Slamd64.

Cross Linux From Scratch. The CLFS Wiki
(http://trac.cross-lfs.org/wiki/read#ReadtheCrossLinuxFromScratchBookOnline)
is a 'must-read' if you want to understand how to port Linux to a new
architecture. I took several ideas, concepts and patches from them when
creating Slackware64 from scratch, and again when I created my multilib
gcc/glibc packages from scratch (my README on this multilib-from-scratch
is available in the ./source directory).


Have fun!

Eric

=============================================================================
Eric Hameleers <alien@slackware.com> 18-sep-2012
[ICO]NameLast modifiedSizeDescription

[DIR]Parent Directory  -  
[DIR]source/29-Sep-2012 02:45 -  
[DIR]current/22-May-2013 05:13 -  
[   ]README18-Sep-2012 00:52 11K 
[   ]PACKAGES.TXT.gz22-May-2013 05:16 78K 
[TXT]PACKAGES.TXT22-May-2013 05:15 466K 
[   ]MANIFEST.bz222-May-2013 05:15 1.2M 
[   ]GPG-KEY24-Mar-2011 11:52 11K 
[TXT]FILELIST.TXT22-May-2013 05:16 453K 
[   ]ChangeLog.txt.gz27-Feb-2013 11:07 5.6K 
[TXT]ChangeLog.txt22-May-2013 05:09 34K 
[   ]ChangeLog.rss22-May-2013 05:09 13K 
[TXT]CHECKSUMS.md5.gz.asc22-May-2013 05:16 198  
[   ]CHECKSUMS.md5.gz22-May-2013 05:16 96K 
[TXT]CHECKSUMS.md5.asc22-May-2013 05:16 198  
[TXT]CHECKSUMS.md522-May-2013 05:16 411K 
[DIR]14.0/22-May-2013 05:12 -  
[DIR]13.37/22-May-2013 05:11 -  
[DIR]13.1/22-May-2013 05:10 -  
[DIR]13.0/22-May-2013 05:10 -  

Apache/2.2.22 Server at www.slackware.com Port 80