Difference between revisions of "64-bit FAQ"

From ArchWiki
Jump to navigation Jump to search
m (→‎Multilib repository: ld needs '-m32' too)
(title)
 
(35 intermediate revisions by 10 users not shown)
Line 1: Line 1:
[[Category:About Arch]]
+
#REDIRECT: [[Frequently asked questions#64-bit]]
[[ar:Arch64 FAQ]]
 
[[cs:Arch64 FAQ]]
 
[[el:Arch64 FAQ]]
 
[[es:Arch64 FAQ]]
 
[[it:Arch64 FAQ]]
 
[[ja:Arch64 FAQ]]
 
[[ru:Arch64 FAQ]]
 
[[sr:Arch64 FAQ]]
 
[[uk:Arch64 FAQ]]
 
[[zh-CN:Arch64 FAQ]]
 
Below is a list of frequently asked questions about Arch Linux on 64-bit.
 
 
 
== How do I determine if my processor is x86_64 compatible? ==
 
=== Linux users ===
 
Run the following command:
 
$ less /proc/cpuinfo
 
 
 
Look for the {{ic|flags}} entry. If you see the {{ic|lm}} flag then your processor is x86_64 compatible.
 
 
 
Or you can run this command:
 
$ grep -q "^flags.*\blm\b" /proc/cpuinfo && echo "x86_64" || echo "not x86_64"
 
 
 
=== Windows users ===
 
Using the freeware [http://www.cpuid.com/cpuz.php CPU-Z] you can determine whether your CPU is 64-bit compatible.
 
CPUs with AMD's instruction set "AMD64" or Intel's solution "EM64T" should be compatible with the x86_64 releases and binary packages.
 
 
 
== Should I use the 32 or 64 bit version of Arch? ==
 
If your processor is [[wikipedia:X86-64|x86_64]] compatible, you should use Arch64.
 
 
 
== How can I install Arch64? ==
 
Just use our [https://www.archlinux.org/download/ official installation ISO CD].
 
 
 
== How complete is the port? ==
 
The port is ready for daily use in a desktop or server environment.
 
 
 
== Will I have all the packages from my 32-bit Arch I am used to? ==
 
The repositories are ported and pretty much everything should work as expected.
 
 
 
Rarely, an old package in the [[Arch User Repository|AUR]] will only have {{ic|'i686'}} listed, but typically they work for 64-bit too. Just try adding {{ic|'x86_64'}}.
 
 
 
== Why 64-bit? ==
 
It is faster under most circumstances and as an added bonus also inherently more secure due to the nature of [[wikipedia:Address space layout randomization|Address space layout randomization (ASLR)]] in combination with [[wikipedia:Position-independent code|Position-independent code (PIC)]] and the [[wikipedia:NX Bit|NX Bit]] which is not available in the stock i686 kernel due to disabled PAE. If your computer is running 4 GB or more of usable RAM, 64-bit should be strongly considered as any additional RAM cannot be allocated by a 32-bit OS.
 
 
 
Programmers also increasingly tend to care less about 32-bit ("legacy") as "new" x86 CPUs typically support the 64-bit extensions.
 
 
 
There are many more reasons we could list here to tell you to avoid 32-bit, but between the kernel, userspace and individual programs it is simply not viable to list every last thing that 64-bit does much better these days.
 
 
 
For further details watch our [https://www.archlinux.org/packages/differences/ differences reports]. There you will find a list comparing 32-/64-bit package versions.
 
 
 
== What repositories should I set up for pacman to use? ==
 
All repositories are supported for the port.
 
 
 
== What will I miss in Arch64? ==
 
Nothing, really. Almost all applications support 64-bit by now or are in the transition to become 64-bit compatible.
 
 
 
The biggest problem are packages that are either '''closed source''' or contain x86-specific assembly that is cumbersome to port to 64-bit (typical for emulators).
 
 
 
These applications were previously problematic but are now available in the [[Arch User Repository|AUR]] and work fine:
 
* Acrobat Reader is not available in 64-bit, but you can run the 32-bit version in compatibility mode. There are also many other open source alternatives that can be used to read PDF files.
 
 
 
Everything else should work perfectly fine. If you miss any Arch32 package in our port and you know that it will compile on x86_64 (perhaps you have found it as native packages in another 64-bit distribution), just contact the developers or request a new package in the forums.
 
 
 
== Can I run 32-bit apps inside Arch64? ==
 
Yes! You can install {{ic|1=lib32-*}} packages from the [[multilib]] repository.
 
 
 
An alternative method is to create a 32-bit chroot (refer to [[Install bundled 32-bit system in Arch64]])
 
 
 
== Can I build 32-bit packages for i686 inside Arch64? ==
 
Yes. You can either use
 
*the [[Multilib]] versions of the relevant packages or
 
*an [[Install bundled 32-bit system in Arch64|i686 chroot]].
 
 
 
=== Multilib repository ===
 
 
 
To use the [multilib] repository, edit your {{ic|/etc/pacman.conf}} and uncomment following lines:
 
 
 
[multilib]
 
SigLevel = PackageRequired
 
Include = /etc/pacman.d/mirrorlist
 
 
 
upgrade your system with {{ic|pacman -Syu}} and install the {{Pkg|gcc-multilib}} package.
 
 
 
{{Note|
 
*If the system has the {{ic|base-devel}} package group installed, users must replace the [extra] versions with the [mutlilib] versions as shown below.
 
* {{Pkg|gcc-multilib}} is capable of building 32-bit and 64-bit code. You can safely install {{ic|multilib-devel}} to replace the packages shown below, but you still need {{ic|base-devel}} for the other packages it includes. See <nowiki>https://bbs.archlinux.org/viewtopic.php?id=102828</nowiki> for more information.
 
}}
 
 
 
{{hc|# pacman -S gcc-multilib|2=
 
resolving dependencies...
 
warning: dependency cycle detected:
 
warning: lib32-gcc-libs will be installed before its gcc-libs-multilib dependency
 
looking for inter-conflicts...
 
:: gcc-libs-multilib and gcc-libs are in conflict. Remove gcc-libs? [y/N] y
 
:: binutils-multilib and binutils are in conflict. Remove binutils? [y/N] y
 
:: gcc-multilib and gcc are in conflict. Remove gcc? [y/N] y
 
:: libtool-multilib and libtool are in conflict. Remove libtool? [y/N] y
 
 
 
Remove (4): gcc-libs-4.6.1-1  binutils-2.21.1-1  gcc-4.6.1-1  libtool-2.4-4
 
 
 
Total Removed Size:  87.65 MB
 
 
 
Targets (7): lib32-glibc-2.14-4  lib32-gcc-libs-4.6.1-1  gcc-libs-multilib-4.6.1-1  binutils-multilib-2.21.1-1
 
            gcc-multilib-4.6.1-1  lib32-libtool-2.4-2  libtool-multilib-2.4-2
 
 
 
Total Download Size:    25.04 MB
 
Total Installed Size:  108.27 MB
 
 
 
Proceed with installation? [Y/n]
 
}}
 
 
 
Compiling packages on x86_64 for i686 is as easy as adding the following lines to an alternate configuration file (e.g. {{ic|~/.makepkg.i686.conf}})
 
CARCH="i686"
 
CHOST="i686-pc-linux-gnu"
 
CFLAGS="-m32 -march=i686 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2"
 
CXXFLAGS="${CFLAGS}"
 
LDFLAGS="-m32 -Wl,-O1,--sort-common,--as-needed,-z,relro"                                                                                                         
 
 
 
 
 
and invoking makepkg via the following
 
$ linux32 makepkg -src --config ~/.makepkg.i686.conf
 
 
 
=== Chroot ===
 
See [[Install bundled 32-bit system in Arch64]]
 
 
 
== Can I upgrade/switch my system from i686 to x86_64 without reinstalling? ==
 
No. Strictly speaking any kind of migration implies that all packages or nearly all packages must be reinstalled for the newer architecture. However, it is possible to move your system without performing a fresh install, and even from within your current installation. A forum thread has been created [https://bbs.archlinux.org/viewtopic.php?id=64485 here] which outlines steps taken to successfully migrate an install from 32 to 64 bit without losing any configurations/settings/data.  Note: A large external hard drive was used for the transfer.
 
 
 
However, you can also start the system with the Arch64 installation CD, mount the disk, backup anything you may want to keep that is not a 32-bit binary (e.g: {{ic|/home}} & {{ic|/etc}}), and install.
 
 
 
You may also want to read [[Migrating Between Architectures Without Reinstalling]].
 

Latest revision as of 05:19, 6 March 2016