Lowell Gilbert wrote:
Scott Bennett <benn...@cs.niu.edu> writes:
Why wouldn't OOo, once installed, simply use whatever were installed as /usr/local/bin/perl?Because perl doesn't tend to be backwards-compatible.
Untrue. perl as a language is generally very good at backwards compatibility. There is new syntax available in 5.10, but it's pretty much a superset of 5.8, so existing perl programs should "just work"(tm). In fact, I've not seen any problems on a swathe of machines I've updated. {{{ Aside:: The problem comes for applications that embed a perl interpreter. Meaning they dynamically link against libperl.so. OpenOffice doesn't do this as far as I can tell, but eg. snmpd does:happy-idiot-talk:~:% ldd /usr/local/sbin/snmpd /usr/local/sbin/snmpd:
libnetsnmpagent.so.16 => /usr/local/lib/libnetsnmpagent.so.16 (0x28082000) libnetsnmphelpers.so.16 => /usr/local/lib/libnetsnmphelpers.so.16 (0x280c5000) libnetsnmpmibs.so.16 => /usr/local/lib/libnetsnmpmibs.so.16 (0x280e6000) libwrap.so.5 => /usr/lib/libwrap.so.5 (0x2819b000) libnetsnmp.so.16 => /usr/local/lib/libnetsnmp.so.16 (0x281a2000) libcrypto.so.5 => /usr/local/lib/libcrypto.so.5 (0x2824f000) libelf.so.1 => /usr/lib/libelf.so.1 (0x28397000) libkvm.so.4 => /lib/libkvm.so.4 (0x283c0000) libdevstat.so.6 => /lib/libdevstat.so.6 (0x283c8000) libperl.so => /usr/local/lib/perl5/5.10.0/mach/CORE/libperl.so (0x283cd000) <<<<--**** libm.so.5 => /lib/libm.so.5 (0x284fd000) libcrypt.so.4 => /lib/libcrypt.so.4 (0x28512000) libutil.so.7 => /lib/libutil.so.7 (0x2852b000) libc.so.7 => /lib/libc.so.7 (0x28539000) libz.so.4 => /lib/libz.so.4 (0x2863b000) libthr.so.3 => /lib/libthr.so.3 (0x2864d000) That is dependent on the version of perl installed -- not just because the version number is embedded in the path to the shlib, but also because the ABI can change between different versions. In this case, you would have no alternative but to recompile the app to link against a different version of perl. }}} One way to fix the problem of dragging in an unwanted version of perl when using precompiled packages for OpenOffice is to do the following: 0) I'm assuming perl-5.10 is already installed i) Download the openoffice package you want to install. # setenv PKG_SITES 'ftp.freebsd.org other.site.org third.site.org' # pkg_fetch openoffice.org-3.1.0_2 ii) Install all required dependencies for OpenOffice /except/ for perl-5.8 for the package you downloaded: # pkg_info -qr ./openoffice.org-3.1.0_2.tbz | grep -v perl | \cut -d ' ' -f 2 | xargs portinstall
iii) Install the OpenOffice package without dependencies: # pkg_add -i ./openoffice.org-3.1.0_2.tbz iv) Use pkgdb to fix the dependency linkages: # pkgdb -F (when prompted, substitute perl-5.10 instead of the missing perl-5.8dependency)
However, this is quite an inelegant approach which involves spending far too much effort (It's also untested by me and quite possibly won't work at all...). You'ld have to do the same thing all over again if ever you need to upgrade OpenOffice. Chances are some of the dependencies you install at stage (ii) will have been updated in ports after the openoffice.org package was built: this should do no more than cause some warning messages and maybe make you do a bit more work at stage (iv). Or it could just make everything break horribly. Note: this *won't* work in the general case -- it relies on perl scripts being compatible across different versions. Using this approach to make arbitrary substitutions in the dependencies of a package will almost certainly end in tears before bedtime. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW
signature.asc
Description: OpenPGP digital signature