[csw-maintainers] Oddity with Runpath and GCC4 on Solaris 10 x86
Maciej (Matchek) Blizinski
maciej at opencsw.org
Sat Dec 4 07:28:57 CET 2010
No dia 4 de Dezembro de 2010 00:55, Geoff Davis <gadavis at opencsw.org> escreveu:
> According to http://www.opencsw.org/packages/CSWgcc4core/ that "64" link is
> part of gcc4core
> gcc4corert does not depend on gcc4core so I don't get that package on a
> barebones install, and therefore my 64-bit programs don't run.
> How do I fix this?
> Is this a bug in GCC4?
> Or, is this a bug in Gar? I think it set the RPATH to /opt/csw/gcc4/lib/64
> instead of /opt/csw/gcc4/lib/$(ISA)
I suspected it could be also the build of the software you were
compiling. But, I just checked 'gmake modenv', and GAR in fact sets
RPATH to use /64:
LDFLAGS = -L/opt/csw/gcc4/lib/64 -m64 -mcpu=v9 -L/opt/csw/lib/64
LD_OPTIONS = -R/opt/csw/gcc4/lib/64 -R/opt/csw/lib/$ISALIST
-R/opt/csw/lib/64
There's a rule, most of which is so obvious that we don't write it down:
"If a package requires a particular file in order to run, this file
should be provided by either the package itself, or one of its direct
dependencies."
The "direct" part is not obvious, but we have that explicitly stated
in the shared libraries documentation (somewhere under the standards/
pages), but not in general.
I wish checkpkg detected this failure mode. There's a technical
problem that in checkpkg, the /64 symlink gets silently resolved to
the /amd64 or /sparcv9 path, and checkpkg does not retain the
information that it had used the /64 path in the process. I'll see if
I can fix that.
> Or, is this a bug in my packaging where I need to somehow tweak the RPATH
> for the 64-bit builds to "Do The Right Thing"?
In either case, checkpkg should catch this, and suggest adding
gcc4core as a dependency. I will look into that once I finish working
on file collision detection.
By the way, thanks for the excellent report of this failure mode!
Maciej
More information about the maintainers
mailing list