compat4x broken in FreeBSD 8.1-RELEASE?

Devin Teske dteske at vicor.com
Wed Sep 22 20:22:02 UTC 2010


On Tue, 2010-09-21 at 23:01 -0400, Steve Polyack wrote:
>   Is anyone else having issues using compat4x / running FreeBSD 4 
> binaries on 8.1-RELEASE?

At our shop, we're currently running 150+ 4.11-compiled i386 binaries on
FreeBSD-8.1 amd64. No problems found yet, but there were gotchas (keep
reading).


>   The requisite package is installed

I assume you're talking about the "compat4x" package (specifically
compat4x-i386-5.3_9).

You might interested to know that if you're trying to fully support 4.x
binaries on 8.1, you should also install the following package:

	compat5x-amd64-5.4.0.8_11

We've noticed here in our shop that not all 4.x shared-libraries are
available in the compat4x package. To get all the shared-libraries that
we were linking against in 4.x, we also had to install the compat5x
package.

Specifically, we found these 4.x shared-libraries were missing from
compat4x (at minimum; I'm sure there is more but the below list
encompases the ones that we ourselves needed):

/usr/local/lib32/compat/libcam.so.2
/usr/local/lib32/compat/libsbuf.so.2
/usr/local/lib32/compat/libz.so.2


> $ grep -ir compat /usr/src/sys/amd64/conf/PFSYNC-MFIB
> options         COMPAT_43TTY            # BSD 4.3 TTY compat (sgtty)
> options         COMPAT_IA32             # Compatible with i386 binaries
> options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
> options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
> options         COMPAT_FREEBSD6         # Compatible with FreeBSD6
> options         COMPAT_FREEBSD7         # Compatible with FreeBSD7

Here's our list:

[dteske at oos0a /]$ config -x `sysctl -n kern.bootfile` | grep -i compat | grep -v '^#'
options         COMPAT_43TTY            # BSD 4.3 TTY compat (sgtty)
options         COMPAT_FREEBSD32        # Compatible with i386 binaries
options         COMPAT_FREEBSD4         # Compatible with FreeBSD4
options         COMPAT_FREEBSD5         # Compatible with FreeBSD5
options         COMPAT_FREEBSD6         # Compatible with FreeBSD6
options         COMPAT_FREEBSD7         # Compatible with FreeBSD7
device          pty             # BSD-style compatibility pseudo ttys
device          ubsa            # Belkin F5U103 and compatible serial adapters
options         COMPAT_43       # Compatible with BSD 4.3 [KEEP THIS!]

Hmmm....

You're missing "COMPAT_43" ... that seems serious and likely to be the
cause of your "Exec format" error (below).

NOTE: I presume that the kernel config that you used does NOT include
"GENERIC" as all the COMPAT_* options that are in our kernel (shown
above) were actually there because we included the GENERIC config and
then used `nodevice'/`nooptions' to disable things we didn't like in
GENERIC and `device'/`options' to enable things that were missing from
GENERIC. I think that's a much safer route to go if you're not an
experienced kernel configurator.



> Interestingly enough, the compat4 libraries themselves don't seem to be 
> recognized:
> $ ldd /usr/local/lib32/compat/libfetch.so.2
> ldd: /usr/bin/ldd32: Exec format error

Here it is on our system:

[dteske at oos0a /]$ uname -a
FreeBSD oos0a.vbsd.vicor.com 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Fri Aug  6 14:52:42 UTC 2010     dteske at oos0a.vbsd.vicor.com:/usr/src/sys/amd64/compile/FIS-amd64  amd64

[dteske at oos0a /]$ ldd /usr/local/lib32/compat/libfetch.so.2
/usr/local/lib32/compat/libfetch.so.2:

Again, I think it's because your lack of "COMPAT_43" in your kernel.


> 
> Compat5x libraries do not appear to be affected:
> $ ldd /usr/local/lib/compat/libfetch.so.3
> /usr/local/lib/compat/libfetch.so.3:
>          libssl.so.3 => /usr/local/lib/compat/libssl.so.3 (0x800c00000)
>          libcrypto.so.3 => /usr/local/lib/compat/libcrypto.so.3 
> (0x800d3a000)

Same on our system.


> Has anyone else ran into this issue? I realize trying to use things 
> built for FreeBSD 4 may be like beating a dead horse at this point, I'm 
> just surprised that the compatibility was broken during a minor release 
> upgrade.

During the upgrade process, I think your kernel config lost something
(COMPAT_43).



> Thanks,
> 
> Steve Polyack
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
-- 
Cheers,
Devin Teske

-> CONTACT INFORMATION <-
Business Solutions Consultant II
FIS - fisglobal.com
510-735-5650 Mobile
510-621-2038 Office
510-621-2020 Office Fax
909-477-4578 Home/Fax
devin.teske at fisglobal.com

-> LEGAL DISCLAIMER <-
This message  contains confidential  and proprietary  information
of the sender,  and is intended only for the person(s) to whom it
is addressed. Any use, distribution, copying or disclosure by any
other person  is strictly prohibited.  If you have  received this
message in error,  please notify  the e-mail sender  immediately,
and delete the original message without making a copy.

-> FUN STUFF <-
-----BEGIN GEEK CODE BLOCK-----
Version 3.1
GAT/CS d(+) s: a- C++(++++) UB++++$ P++(++++) L++(++++) !E--- W++ N? o? K- w O
M+ V- PS+ PE Y+ PGP- t(+) 5? X+(++) R>++ tv(+) b+(++) DI+(++) D(+) G+>++ e>+ h
r>++ y+ 
------END GEEK CODE BLOCK------
http://www.geekcode.com/

-> END TRANSMISSION <-



More information about the freebsd-questions mailing list