bad link in octave when install package using pkg_add -p

John E Hein jhein at
Tue Sep 9 08:50:24 PDT 2003

Kris Kennaway wrote at 08:37 -0700 on Sep  9:
 > > >Description:
 > > 
 > > 	If you build a package for math/octave, then try to install
 > > 	the package to a non-default location using pkg_add -p (as
 > > 	you might if you were building a system under a different
 > > 	mount point, like a chroot), the lib/octave sym link will
 > > 	point to the wrong place.
 > This is not supported.  Many ports need to hard-code their
 > installation prefix within binaries, so there's no way in general to
 > make this work.

I'm not talking about building with a different prefix than that which
one runs the package with.

 - build package with PREFIX=/usr/local (default)

 - install to removable media whose root it mounted at /mnt using
   pkg_add -p /mnt

 - remove media; install on different system; run package
   installed in /usr/local

The simple fix suggested works in all cases, by the way.  And that
sort of sym link usage should almost always be used in preference to
linking to an absolute pathname.

As to pkg_add -p not being supported... I don't know what the party
line is, but we use pkg_add -p all the time in this manner, and it
normally works just fine.  Are you saying it's deprecated?

More information about the freebsd-ports mailing list