Added support for installing i386 4.x libraries on the amd64 architecture. It is done like in the misc/compat5x port putting libs in the ${PREFIX}/lib32/compat directory. With this commit, PR amd64/76176 should be closed. How-To-Repeat: Try to install this port on the FreeBSD/amd64: cd /usr/ports/misc/compat4x && make install
Responsible Changed From-To: freebsd-ports-bugs->lesi Grab.
There's one smallish problem: the last line of pkg-plist.freebsd5 would try to remove LOCALBASE/lib directory on architectures other than amd64. That's not good since that directory is claimed by mtree so it should not be removed by port. The easy solution that I tried out is just to hardcode %D/lib32 there like this: @comment Hardcode lib32 since we should not remove lib. @unexec rmdir %D/lib32 2>/dev/null || true On amd64, this will remove LOCALBASE/lib32 and on other architectures it will just silently fail since lib32 does not exist. Does this look reasonable?
Reasonable to me. %D/lib32 is also used by misc/compat5x port. Removing it if empty (misc/compat5x is also using it) should be OK. With submitted patch misc/compat4x when installed gets a package name like compat4x-i386-5.3_2 instead of compat4x-amd64-5.3_2. I'm not sure which one is the right to use. misc/compat5x port that installs both i386 and amd64 libs is named compat5x-amd64. Ports depending on this port with: LIB_DEPENDS+= c.4:${PORTSDIR}/misc/compat4x only search for libc.so.4 in %D/lib, but not in %D/lib32, so to those it looks like compat4x port is not installed. This could be solved by: a) linking %D/libc*.so.4 to %D/libc*.so.4 b) incorporate detection logic in /usr/ports/Mk/* files. __________________________________________ Yahoo! DSL Something to write home about. Just $16.99/mo. or less. dsl.yahoo.com
LIB_DEPENDS does not work (without reboot), because LDCONFIG_DIRS adds lib/compat to ldconfig hints, but we should do that for lib32/compat as well. There is currently no LDCONFIG32_DIRS analogue to this as far as I know. The line in compat5x/pkg-plist takes care of that like this: %%AMD64%%@exec %%LDCONFIG_LIB32%% -m %D/lib32/compat and the accompanying snippet in Makefile: .if ${ARCH} == amd64 PLIST_SUB+= AMD64="" PLIST_SUB+= LDCONFIG_LIB32="${LDCONFIG} -32" .else PLIST_SUB+= AMD64="@comment " .endif Should we go with something along this lines?
That doesn't solve LIB_DEPENDS issue. I don't think it could be solved just in the port itself. __________________________________ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs
You're right of course. I'm being silly. LIB_DEPENDS would only look for native 64bit libraries on amd64 - it uses 'ldconfig -r' to find them and it should use 'ldconfig -r -32' to find 32bit ones (regardless of location or link of libc.so.4) - which would be b) from your previous mail. I agree that this can't be changed in this port. I'm curious though if you have any particular port in mind that would depend on these 32bit compat libraries. The ldconfig line is needed in any case (so it's run right after install instead of waiting for reboot so rc script kicks in). About the name - since this port installs only i386 libraries, compat4x-i386-5.3_2 seems fine to me. Here's a diff with above changes for this port.
State Changed From-To: open->closed Committed. Thanks!