pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Installing and using pkgsrc with external compiler (in HPC environment) ... library path troubles.

Am Fri, 01 Aug 2014 09:06:25 +0900
schrieb "OBATA Akio" <>: 

> On Thu, 31 Jul 2014 22:07:06 +0900, Thomas Orgis 
> <> wrote:
> > LDFLAGS+= -Wl,-R /sw/compilers/gcc-4.8.2/lib64 -Wl,-R 
> > /sw/compilers/gcc-4.8.2/lib
> A space between '-R' and a path should be replaced with ',', or removed.

Gah! Did this really happen?! Actually I had -Wl,-rpath=... there
before and adjusted it to -R as I found pkgsrc using that itself. I
admit that I have trouble remembering on which compiler you need which
kind of RPATH flag (consistently -L/path -R/path everywhere would have
been too easy, right?).

But wait! With GCC, "-Wl,-R /path" does work! The difference between

        gcc -Wl,-R/path


        gcc -Wl,-R /path

is that the compiler fails in the latter case if /path does not exist.
If it is there, it is used normally. The first case goes through anyway.
GCC guesses that an existing directory given as argument should be
passed to the linker. This is documented behaviour, apparently. So, my
variant of the flags could be considered a safeguard for mistyping the
RPATH argument: The build should only work if it exists;-)

So ... it should have worked would pkgsrc not mangle the flags. I
can try if the build is more happy with the "more correct" flags. I have now

LDFLAGS+= -Wl,-R/sw/compilers/gcc-4.8.2/lib64
BUILDLINK_PASSTHRU_DIRS+= /sw/compilers/gcc-4.8.2/lib64
BUILDLINK_PASSTHRU_RPATHDIRS+= /sw/compilers/gcc-4.8.2/lib64

... and I do wonder what effect GCCBASE should have. It was a wild
assumption that this setting would trigger inclusion of the matching
runtime libraries. I wonder if this is different with ICCBASE.

Some addition to the pkgsrc guide regarding the works of these
variables would be nice. For LDFLAGS it's obviously not "any valid
flags to inlclude in build/link command lines"!

Alrighty then,


Dr. Thomas Orgis
Universität Hamburg
RRZ / Zentrale Dienste / HPC
Schlüterstr. 70
20146 Hamburg
Tel.: 040/42838 8826
Fax: 040/428 38 6270

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Home | Main Index | Thread Index | Old Index