Differences between revisions 61 and 62
Revision 61 as of 2014-04-11 23:10:39
Size: 13065
Editor: ?ChrisBainbridge
Comment: Jessie warning
Revision 62 as of 2015-06-18 07:11:19
Size: 13525
Editor: ?ChrisBainbridge
Comment: How to install Acroread on Jessie
Deletions are marked like this. Additions are marked like this.
Line 46: Line 46:
   /!\ this step does not work on Jessie (''Package has no installation candidate'')    /!\ this step does not work on Jessie (''Package has no installation candidate'') For Jessie see instructions below
Line 82: Line 82:


== Q: How to install Acroread on Jessie / AMD64? ==
    wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.tar.bz2
    tar -jxvf AdbeRdr9.5.5-1_i486linux_enu.tar.bz2
    # INSTALL script installs to /opt/Adobe by default
    apt-get install libgdk-pixbuf2.0-0:i386 libgtk2.0-0:i386

Some parts of this FAQ can be highly out of date or even wrong. Please either ask in IRC channel if unsure or refer to the The Debian GNU/Linux AMD64 HOW-TO for a more up-to-date manual.

[DebianAMD64|Debian on AMD64] FAQ

   This page holds the frequently asked questions regarding 
   the Debian port to amd64.

   If there are unanswered questions the best thing you can do is 
   to add the Q's at the bottom of this page.

Q: Is this port only for AMD 64-bit [[CPUs]]?

A: No. "AMD64" is the name chosen by AMD for their 64-bit extension to the Intel x86 instruction set. Before release, it was called "x86-64" or "x86_64", and some distributions still use these names. Intel refers to its AMD64 implementation as "?Intel64" previously named "?EM64T". The architecture is AMD64-compatible and Debian AMD64 will run on AMD and Intel processors with 64-bit support. Because of the technology paternity, Debian uses the name "AMD64".

Q: How do I install Acrobat Reader?

A: At least for testing as of March 2012, the ‘official’ .deb packages available from Adobe’s FTP servers (version 9.4.7) work just fine, provided that one installs using

dpkg --force-architecture -i AdbeRdr9.4.7-1_i386linux_enu.deb

The package will be installed in /opt with a shell-script in /usr/bin, a manpage in /usr/share/man and a bash-completion snippet /etc/bash_completion.d/acroread.sh.

Note that you still will need to install the ia32-libs and ia32-libs-gtk packages.

If that does not work for you, either try the chroot approach described in the HOWTO or, if you absolutely want to avoid using a chroot, follow these instructions as an alternate way:

1. In Etch and later, install ia32-libs and ia32-libs-gtk. Do

   apt-get install ia32-libs ia32-libs-gtk
  • /!\ this step does not work on Jessie (Package has no installation candidate) For Jessie see instructions below

2. Get the acroread (e.g. acroread_7.0.8-0.0_i386.deb) debian package from http://www.deb-multimedia.org/pool/main/a/acroread/ and install it with

   dpkg -i --force-architecture acroread_7.0.8-0.0_i386.deb

It won't go without force, because it is the wrong architecture. While you are at it, you may also get the extra plugins.

3. Edit /usr/bin/acroread. Towards the end, there is a line

   exec "$ACRO_EXEC_CMD" ${1+"$@"}


   GCONV_PATH=/usr/lib32/gconv LD_PRELOAD=/usr/lib32/libpangohack.so.0.0 GDK_PIXBUF_MODULE_FILE=/etc/gtk-2.0/gdk-pixbuf.loaders32

at the beginning of this line, before exec.

Not sure if it is required -- AlexanderVlasov

4. Copy /etc/gtk-2.0/gdk-pixbuf.loaders to /etc/gtk-2.0/gdk-pixbuf.loaders32, and replace all references to /usr/lib/ with /usr/lib32/:

   sed 's:/usr/lib/:/usr/lib32/:' < /etc/gtk-2.0/gdk-pixbuf.loaders > /etc/gtk-2.0/gdk-pixbuf.loaders32

Not sure if it is required -- AlexanderVlasov

acroread should work now.

5. To prevent the warning during the loading of the PPK module, remove it:

   rm /usr/lib/Adobe/Acrobat7.0/Reader/intellinux/plug_ins/["PPKLite"].api

You cannot start any other program from Acrobat Reader (such as a web browser), because the special settings do not work for other applications. Hopefully someday this will all be easier.

Q: How to install Acroread on Jessie / AMD64?

    wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.tar.bz2
    tar -jxvf AdbeRdr9.5.5-1_i486linux_enu.tar.bz2
    # INSTALL script installs to /opt/Adobe by default
    apt-get install libgdk-pixbuf2.0-0:i386 libgtk2.0-0:i386

Q: Does Wine work?

A: Yes.

Q: What about Flash?

A1: You can install the flashplugin-nonfree package which is in the Debian repositories.

A2: The proprietary Adobe Flash plugin is known to produce undesired audio distortions (artifacts) on 64-bit systems: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=620901. This can be fixed by applying a patch provided on Adobe's bugtracker https://bugs.adobe.com/jira/browse/FP-5739. After installing "flashplugin-nonfree", do:

   wget -O /tmp/memcpy- https://bugs.adobe.com/jira/secure/attachment/70204/memcpy-
   sudo aptitude -Ry install bsdiff
   sudo bspatch /usr/lib/flashplugin-nonfree/libflashplayer.so /usr/lib/flashplugin-nonfree/libflashplayer.so.new /tmp/memcpy-
   sudo mv /usr/lib/flashplugin-nonfree/libflashplayer.so.new /usr/lib/flashplugin-nonfree/libflashplayer.so
   rm /tmp/memcpy-

A3: You can also use Gnash, which is free software and runs fine on AMD64, but which as of June 2010 plays very few flash files on the web correctly.

A4: If everything else fails, you can use nspluginwrapper to install the 32 bit official plugin from Adobe. Download the .tar.gz version from http://get.adobe.com/flashplayer/ and do

   tar -zxvf install_flash_player_10_linux.tar.gz #unpacks libflashplayer.so
   mv /full/path/to/libflashplayer.so /permanent/location
   sudo aptitude install nspluginwrapper ia32-libs ia32-libs-libnss3 ia32-libs-gtk
   nspluginwrapper -v -i /permanent/location/libflashplayer.so

Deb-multimedia needs to be in /etc/apt/sources.list for this to work because it has some necessary packages. If you have a Mozilla based browser the flashplayer-mozilla package needs to be installed as well. Remember to use the full absolute path to libflashplayer.so when using the nspluginwrapper command; otherwise it failed for me. Doing

   ldd libflashplayer.so

is sometimes helpful to show if some shared library is missing.

Adobe had released a pre-release version of Flash Player 10 for 64-bit browsers, available from version 1:2 of the flashplugin-nonfree package. This package is currently disabled because Adobe pulled the 64 bit version after the beta.

Q: How do I build i386 debs on AMD64?

A: use the linux32 command to fake uname and limit memory size inside your i386 chroot. Package is linux32.

The following solution is based on the Debian-AMD64 Howto 'Running applications inside the chroot' Section:

 Simplest way to build i386 packages out of the box on AMD64 is to use dchroot and a simple wrapper script 
 such as the following example for dpkg-buildpackage:

   dchroot -c i386 "cd $rpath && linux32 dpkg-buildpackage -ai386 $@"

 Save it under /usr/local/bin/ia32-dpkg-buildpackage, make it executable and change the chroot name
 according to your environment.

 You will need to have your home directory available under the chroot.

 Now you can build i386 packages using ia32-dpkg-buildpackage like dpkg-buildpackage. for example:

   $ ia32-dpkg-buildpackage -rfakeroot

 Remember to install the build-depends for the package inside the chroot.

Better approach: use -vserver kernel and create 32-bit vserver; build anything you want instide it.

Q: Is there a quick rundown on the changes you've made to apt/dpkg command-line syntax anywhere?

A: There are two new scripts that were added to dpkg.

dpkg-libinfo was added by Gerhard Tonn. It was originally written for the s390x and sparc64 ports. It allows debian/rules files to figure out if /lib or /lib64 should be used. See --help, or the usage of dpkg-libinfo in the zlib source.

dpkg-subarchitecture was added by Bart Trojanowski. The main goal of dpkg-subarchitecture is to allow for the concurrent installation of packages that were compiled for different CPU types, but can still be executed on the local host. As you may already know, on AMD64 hardware you can install and run software compiled for k8, k7, i686, i586, i486, and i386. That relationship is captured in /usr/share/dpkg/subarchtable; or see http://www.jukie.net/~bart/debian/amd64/files/dpkg/subarchtable. Note that this feature can also be used to build i686 optimized modules.

Along with the scripts, the dpkg architecture name was changed to 'amd64'. Thus the names of 64-bit packages are named *_amd64.deb.

Apt's /etc/apt/sources.list has a new feature, too: You can specify what architecture apt should pull from a given distribution mirror. Below is an example that instructs apt to use the binary-i386 part of the testing distribution. If the "(i386)" is omitted, the default binary-amd64 would be used.

  deb http://ftp.debian.org/debian/ testing(i386) main non-free contrib

In addition, apt now uses the dpkg-subarchitecture script to determine whether certain packages are subarchitectures of amd64. The -s flag requests a list of compatible architectures that can be installed. The actual call that apt makes is

  $ dpkg-subarchitecture -s -aamd64
  i686 i586 i486 i386 all

There are a few other features that still need to be added to apt and dpkg. The next one that has been requested is a test for library ?ABIs. Basically, binaries of any architecture can depend on applications of any other architecture, but for binaries that depend on libraries, apt would have to make sure that the ABI of both packages is compatible. For example, an i386 and i686 package have compatible ABI, but amd64 and ia64 do not. Again, this information is captured in the subarchtable file previously mentioned.

Q: How do I port a debian package to AMD64?

A: There should be no porting necessary, so just use the standard commands:

  apt-get source package
  cd package-version
  dpkg-buildpackage -us -uc -rfakeroot

If everything works (i.e., there are no problems in the code that affect building it on a 64-bit system), you should have a package-version_amd64.deb.

Q: Ok, so what do I have to do to port a library package to AMD64?

A: With biarch, that used to be a pain, but with pure64 building a library should be no different from building an ordinary package.

Q: How do I build my first amd64 binaries?

A: With pure64, it is a simple as

 gcc hello.c. 

gcc will automatically target a 64-bit system. You can add -m32 to get a 32-bit executable.

== Q: Lots of us don't care about 32-bit compatibility -- we don't run anything proprietary. We just want a native 64-bit port. Shouldn't that be simple to put together? ==

A: Yes, and that is what pure64 gives you.

Q: How do I bootstrap a 64-bit system?

A: There are many ways.

You can just download the installer and create a new 64-bit installation. You can also use debootstrap from a running system. Remember that you will need a 64-bit kernel for a 64-bit system. Using the 64-bit kernel for a 32-bit system may work, but there will probably be problems with loadable modules.

You can also recompile the system from source yourself:

 following the debian-amd64-howto, I have found the following differences:

  when compiling the kernel I had to 

  1) remove the ARCH:=  line from the makefile and 

  2) use the command

    ARCH="x86_64" make HOSTCC="gcc -m32" CC="gcc -m64" LD="ld -m elf_x86_64" bzImage

Note: When using an MSI SCSI board, compile the kernel with SCSI and SCSI_DEV and MPT FUSION.

Q: How do I build a 64bits GNU/Linux kernel on a 32bits machine using the kernel-package tools?

A: The following command will use fakeroot to simulate root privileges when neccesary (need for building packages), it will tell Linux build system that it's cross compiling and the Debian packaging system that the destination architecture will be AMD64. It will also prepare the package to generate an initrd image (needed on most systems) when the kernel package is installed.

make-kpkg --rootcmd fakeroot --cross-compile - --arch=amd64 --initrd kernel_image

But I want to add some patches, configure it and use my own versioning...

make-kpkg --rootcmd fakeroot --cross-compile - --arch=amd64 --initrd --revision=0.5 --append-to-version=-p64 --added-patches tuxonice --config xconfig kernel_image

This one will use 0.5 as the package version, it will add -p64 to the Linux kernel image name, patch the Linux source with the tuxonice patch and use xconfig as configuration frontend that will be fired before the actual building.

For Debian linux-source-2.6.24-4, this would create the package: linux-image-2.6.24-p64_0.5_i386.deb

Q. Cross-compiling a 32-bit (i386) Linux binary on 64-bit Machine (amd64)

Short answer, depending of the tool you use, you can use one of:

linux32 make
linux32 dpkg-buildpackage
linux32 git-buildpackage