diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2001-08-17 11:13:59 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2001-08-17 11:13:59 +0000 |
commit | 7f3ab48125689ccbb4a6397690807b5a01a6ebdf (patch) | |
tree | ffcb571b539454fbc60b53088d2b9f4a5cbfb531 /share/man/man8/compat_freebsd.8 | |
parent | 2bb4d1993bd62fbee722668e509e26d6f2497b31 (diff) |
o) {Open,Net,Free}BSD -> .{O,N,F}x;
o) "start sentence on new line" issues;
o) minimal -mdoc improvements;
millert@ ok
Diffstat (limited to 'share/man/man8/compat_freebsd.8')
-rw-r--r-- | share/man/man8/compat_freebsd.8 | 238 |
1 files changed, 157 insertions, 81 deletions
diff --git a/share/man/man8/compat_freebsd.8 b/share/man/man8/compat_freebsd.8 index 231fbb34a84..3dd260d8d29 100644 --- a/share/man/man8/compat_freebsd.8 +++ b/share/man/man8/compat_freebsd.8 @@ -1,4 +1,4 @@ -.\" $OpenBSD: compat_freebsd.8,v 1.7 2001/08/09 05:35:44 jsyn Exp $ +.\" $OpenBSD: compat_freebsd.8,v 1.8 2001/08/17 11:13:58 mpech Exp $ .\" $NetBSD: compat_linux.8,v 1.1 1995/03/05 23:30:36 fvdl Exp $ .\" .\" Copyright (c) 1995 Frank van der Linden @@ -35,62 +35,108 @@ .Os .Sh NAME .Nm compat_freebsd -.Nd setup procedure for running FreeBSD binaries under emulation +.Nd setup procedure for running +.Fx +binaries under emulation .Sh DESCRIPTION -OpenBSD supports running FreeBSD binaries. Most binaries should work, -except programs that use FreeBSD-specific features. These include -i386-specific calls, such as syscons utilities, and audio devices. -.Pp -The FreeBSD compatibility feature is active for kernels compiled +.Ox +supports running +.Fx +binaries. +Most binaries should work, except programs that use FreeBSD-specific +features. +These include i386-specific calls, such as syscons utilities, and audio +devices. +.Pp +The +.Fx +compatibility feature is active for kernels compiled with the .Nm COMPAT_FREEBSD option enabled. .Pp A lot of programs are dynamically linked. This means, that you will -also need the FreeBSD shared libraries that the program depends on, and -the runtime linker. Also, you will need to create a "shadow root" -directory for FreeBSD binaries on your OpenBSD system. This directory -is named /emul/freebsd. Any file operations done by FreeBSD programs -run under OpenBSD will look in this directory first. So, if a FreeBSD -program opens, for example, /etc/passwd, OpenBSD will -first try to open /emul/freebsd/etc/passwd, and if that does not exist -open the 'real' /etc/passwd file. It is recommended that you install -FreeBSD packages that include configuration files, etc under /emul/freebsd, -to avoid naming conflicts with possible OpenBSD counterparts. Shared -libraries should also be installed in the shadow tree. -.Pp -Generally, you will need to look for the shared libraries that FreeBSD -binaries depend on only the first few times that you install a FreeBSD -program on your OpenBSD system. After a while, you will have a sufficient -set of FreeBSD shared libraries on your system to be able to run newly -imported FreeBSD binaries without any extra work. - +also need the +.Fx +shared libraries that the program depends on, and the runtime linker. +Also, you will need to create a "shadow root" directory for +.Fx +binaries on your +.Ox +system. +This directory is named /emul/freebsd. +Any file operations done by +.Fx +programs run under +.Ox +will look in this directory first. +So, if a +.Fx +program opens, for example, /etc/passwd, +.Ox +will first try to open /emul/freebsd/etc/passwd, and if that does not exist +open the 'real' /etc/passwd file. +It is recommended that you install +.Fx +packages that include configuration files, etc under /emul/freebsd, +to avoid naming conflicts with possible +.Ox +counterparts. +Shared libraries should also be installed in the shadow tree. +.Pp +Generally, you will need to look for the shared libraries that +.Fx +binaries depend on only the first few times that you install a +.Fx +program on your +.Ox +system. +After a while, you will have a sufficient set of +.Fx +shared libraries on your system to be able to run newly imported +.Fx +binaries without any extra work. .Ss Setting up shared libraries -How to get to know which shared libraries FreeBSD binaries need, and where -to get them? Basically, there are 3 possibilities (when following -these instructions: you will need to be root on your OpenBSD system to -do the necessary installation steps). - +How to get to know which shared libraries +.Fx +binaries need, and where to get them? +Basically, there are 3 possibilities (when following these instructions: +you will need to be root on your +.Ox +system to do the necessary installation steps). +.Pp .Bl -tag -width 123 -compact .It 1. -You have access to the OpenBSD +You have access to the +.Ox .Xr ports 7 -system. Install the port named +system. +Install the port named .Nm freebsd_lib in the .Nm emulators category. The .Nm freebsd_lib port contains the shared libraries, binaries, and other related files -necessary to run FreeBSD applications. +necessary to run +.Fx +applications. .Pp .It 2. -You have access to a FreeBSD system. In this case you can -temporarily install the binary there, see what shared libraries -it needs, and copy them to your OpenBSD system. Example: you have -just ftp-ed the FreeBSD binary of SimCity. Put it on the FreeBSD -system you have access to, and check which shared libraries it -needs by running `ldd sim': +You have access to a +.Fx +system. +In this case you can temporarily install the binary there, see what shared +libraries it needs, and copy them to your +.Ox +system. +Example: you have just ftp-ed the +.Fx +binary of SimCity. +Put it on the +.Fx +system you have access to, and check which shared libraries it needs by running +`ldd sim': .Pp .Bl -tag -width 123 -compact -offset indent .It me@freebsd% ldd /usr/local/lib/SimCity/res/sim @@ -106,7 +152,9 @@ needs by running `ldd sim': .Pp You would need go get all the files from the last column, and put them under /emul/freebsd. This means you eventually have -these files on your OpenBSD system: +these files on your +.Ox +system: .Pp .nf /emul/freebsd/usr/X11R6/lib/libXext.so.6.0 @@ -116,13 +164,14 @@ these files on your OpenBSD system: /emul/freebsd/usr/lib/libgcc.so.261.0 .fi .Pp -Note that if you already have a FreeBSD shared library with a -matching major revision number to the first column of the 'ldd' -output, you won't need to copy the file named in the last column -to your system, the one you already have should work. It is -advisable to copy the shared library anyway if it is a newer version, -though. You can remove the old one. So, if you have these libraries -on your system: +Note that if you already have a +.Fx +shared library with a matching major revision number to the first +column of the 'ldd' output, you won't need to copy the file named in the +last column to your system, the one you already have should work. +It is advisable to copy the shared library anyway if it is a newer version, +though. +You can remove the old one. So, if you have these libraries on your system: .Pp .nf /emul/freebsd/usr/lib/libc.so.2.0 @@ -144,10 +193,14 @@ you with: /emul/freebsd/usr/lib/libc.so.2.1 .fi .Pp -Finally, you must make sure that you have the FreeBSD runtime linker -and its config files on your system. You should copy these -files from the FreeBSD system to their appropriate place on your -OpenBSD system (in the /emul/freebsd tree): +Finally, you must make sure that you have the +.Fx +runtime linker and its config files on your system. +You should copy these files from the +.Fx +system to their appropriate place on your +.Ox +system (in the /emul/freebsd tree): .Pp .nf usr/libexec/ld-elf.so.1 @@ -157,10 +210,13 @@ var/run/ld.so.hints .fi .Pp .It 3. -You don't have access to a FreeBSD system. In that case, you -should get the extra files you need from various ftp sites. +You don't have access to a +.Fx +system. +In that case, you should get the extra files you need from various ftp sites. Information on where to look for the various files is appended -below. For now, let's assume you know where to get the files. +below. +For now, let's assume you know where to get the files. .Pp Retrieve the following files (from _one_ ftp site to avoid any version mismatches), and install them under /emul/freebsd @@ -175,13 +231,18 @@ usr/libexec/ld.so .fi .Pp ldconfig and ldd don't necessarily need to be under /emul/freebsd, -you can install them elsewhere in the system too. Just make sure -they don't conflict with their OpenBSD counterparts. A good idea -would be to install them in /usr/local/bin as ldconfig-freebsd and -ldd-freebsd. -.Pp -Run the FreeBSD ldconfig program with directory arguments in -which the FreeBSD runtime linker should look for shared libs. +you can install them elsewhere in the system too. +Just make sure they don't conflict with their +.Ox +counterparts. +A good idea would be to install them in /usr/local/bin as ldconfig-freebsd +and ldd-freebsd. +.Pp +Run the +.Fx +ldconfig program with directory arguments in which the +.Fx +runtime linker should look for shared libs. /usr/lib are standard, you could run like the following: .Pp .Bl -tag -width 123 -compact -offset indent @@ -196,17 +257,23 @@ mapped to /emul/freebsd/XXXX by OpenBSD's compat code, and should exist as such on your system. Make sure /emul/freebsd/var/run/ld.so.hints exists when you run FreeBSD's ldconfig, if not, you may lose OpenBSD's /var/run/ld.so.hints. - -FreeBSD ldconfig should be statically +.Pp +.Fx +ldconfig should be statically linked, so it doesn't need any shared libraries by itself. It will create the file /emul/freebsd/var/run/ld.so.hints. -You should rerun the FreeBSD version of the ldconfig program -each time you add a new shared library. -.Pp -You should now be set up for FreeBSD binaries which only need -a shared libc. You can test this by running the FreeBSD ldd -on itself. Suppose that you have it installed as ldd-freebsd, it -should produce something like: +You should rerun the +.Fx +version of the ldconfig program each time you add a new shared library. +.Pp +You should now be set up for +.Fx +binaries which only need a shared libc. +You can test this by running the +.Fx +ldd on itself. +Suppose that you have it installed as ldd-freebsd, it should produce +something like: .Pp .Bl -tag -width 123 -compact -offset indent .It me@openbsd% ldd-freebsd `which ldd-freebsd` @@ -216,11 +283,16 @@ should produce something like: .fi .El .Pp -This being done, you are ready to install new FreeBSD binaries. -Whenever you install a new FreeBSD program, you should check -if it needs shared libraries, and if so, whether you have -them installed in the /emul/freebsd tree. To do this, you run -the FreeBSD version ldd on the new program, and watch its output. +This being done, you are ready to install new +.Fx +binaries. +Whenever you install a new +.Fx +program, you should check if it needs shared libraries, and if so, +whether you have them installed in the /emul/freebsd tree. +To do this, you run the +.Fx +version ldd on the new program, and watch its output. ldd (see also the manual page for ldd(1)) will print a list of shared libraries that the program depends on, in the form -l<majorname> => <fullname>. @@ -228,13 +300,14 @@ form -l<majorname> => <fullname>. If it prints "not found" instead of <fullname> it means that you need an extra library. Which library this is, is shown in <majorname>, which will be of the form XXXX.<N> -You will need to find a libXXXX.so.<N>.<mm> on a FreeBSD ftp site, -and install it on your system. The XXXX (name) and <N> (major +You will need to find a libXXXX.so.<N>.<mm> on a +.Fx +ftp site, and install it on your system. +The XXXX (name) and <N> (major revision number) should match; the minor number(s) <mm> are less important, though it is advised to take the most recent version. .El - .Ss Finding the necessary files. .Nm Note: the information below is valid as of the time this @@ -242,8 +315,9 @@ document was written (Jun, 1995), but certain details such as names of ftp sites, directories and distribution names may have changed by the time you read this. .Pp -FreeBSD distribution is -available on a lot of ftp sites. Sometimes the files are unpacked, +.Fx +distribution is available on a lot of ftp sites. +Sometimes the files are unpacked, and you can get the individual files you need, but mostly they are stored in distribution sets, usually consisting of subdirectories with gzipped tar files in them. The primary ftp sites for the @@ -287,4 +361,6 @@ Extract the files from these gzipped tarfiles in your /emul/freebsd directory (possibly omitting or afterwards removing files you don't need), and you are done. .Sh BUGS -The information about FreeBSD distributions may become outdated. +The information about +.Fx +distributions may become outdated. |