Date: Wed, 22 Jul 2009 22:44:08 +0100 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: freebsd-ports@freebsd.org Cc: Scott Bennett <bennett@cs.niu.edu> Subject: Re: needing install OpenOffice.org without messing up perl Message-ID: <4A678828.6020306@infracaninophile.co.uk> In-Reply-To: <444ot4lb22.fsf@be-well.ilk.org> References: <200907221245.n6MCjCOU028926@mp.cs.niu.edu> <444ot4lb22.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig371B7C5153AFBE5D567F01EF Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Lowell Gilbert wrote: > Scott Bennett <bennett@cs.niu.edu> writes: >> Why wouldn't OOo, once installed, simply use whatever were >> installed as /usr/local/bin/perl? >=20 > Because perl doesn't tend to be backwards-compatible. Untrue. perl as a language is generally very good at backwards compatibility. The= re 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 problem= s on a swathe of machines I've updated. {{{ Aside:: The problem comes for applications that embed a perl interpreter. Meanin= g 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=20 /usr/local/sbin/snmpd: libnetsnmpagent.so.16 =3D> /usr/local/lib/libnetsnmpagent.so.16 (= 0x28082000) libnetsnmphelpers.so.16 =3D> /usr/local/lib/libnetsnmphelpers.so.= 16 (0x280c5000) libnetsnmpmibs.so.16 =3D> /usr/local/lib/libnetsnmpmibs.so.16 (0x= 280e6000) libwrap.so.5 =3D> /usr/lib/libwrap.so.5 (0x2819b000) libnetsnmp.so.16 =3D> /usr/local/lib/libnetsnmp.so.16 (0x281a2000= ) libcrypto.so.5 =3D> /usr/local/lib/libcrypto.so.5 (0x2824f000) libelf.so.1 =3D> /usr/lib/libelf.so.1 (0x28397000) libkvm.so.4 =3D> /lib/libkvm.so.4 (0x283c0000) libdevstat.so.6 =3D> /lib/libdevstat.so.6 (0x283c8000) libperl.so =3D> /usr/local/lib/perl5/5.10.0/mach/CORE/libperl.so = (0x283cd000) <<<<--**** libm.so.5 =3D> /lib/libm.so.5 (0x284fd000) libcrypt.so.4 =3D> /lib/libcrypt.so.4 (0x28512000) libutil.so.7 =3D> /lib/libutil.so.7 (0x2852b000) libc.so.7 =3D> /lib/libc.so.7 (0x28539000) libz.so.4 =3D> /lib/libz.so.4 (0x2863b000) libthr.so.3 =3D> /lib/libthr.so.3 (0x2864d000) That is dependent on the version of perl installed -- not just because th= e 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 whe= n 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=20 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 =20 (when prompted, substitute perl-5.10 instead of the missing perl-= 5.8 dependency)=20 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 al= l...). You'ld have to do the same thing all over again if ever you need to upgra= de OpenOffice. Chances are some of the dependencies you install at stage (i= i) will have been updated in ports after the openoffice.org package was buil= t: this should do no more than cause some warning messages and maybe make yo= u do a bit more work at stage (iv). Or it could just make everything break ho= rribly. Note: this *won't* work in the general case -- it relies on perl scripts = being compatible across different versions. Using this approach to make arbitr= ary substitutions in the dependencies of a package will almost certainly end = in tears before bedtime. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig371B7C5153AFBE5D567F01EF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkpniC8ACgkQ8Mjk52CukIwDXQCfUGejcNMuCUTV/0bDtAQv3jmG kdAAnR9fecVhCcZLO5qWY1eVzMinAB4h =KSIw -----END PGP SIGNATURE----- --------------enig371B7C5153AFBE5D567F01EF--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A678828.6020306>