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 Mon, 04 Aug 2014 08:16:41 -0500
schrieb Jason Bacon <jwbacon%tds.net@localhost>:
>
> Nope.
>
> I can get it to work by manually adding
>
> CC=gcc47
>
> to mk.conf after bootstrapping is done. It would be nice if the full
> path of the default compiler could be specified during the bootstrap
> process, though.
I also have a two-stage process now. To clarify, this is my bootstrap:
build=$(dirname $0)
tree=$build/pkgsrc
compiler=gcc-4.8.2
compiler_prefix=/sw/compilers/$compiler
compiler_cc=$compiler_prefix/bin/gcc
bworkdir=/path/to/scratchspace/bootstrap
prefix=/sw/with-compiler/$compiler/$package-$version
cd $tree/bootstrap && env CC=$compiler_cc ./bootstrap --prefix $prefix
--unprivileged --workdir $bworkdir
Then, I install a prepared mk.conf fragment (included in main mk.conf
after defaults):
# Not really worth it, but we have many cores;-)
MAKE_JOBS=32
PKGSRC_COMPILER= gcc
CFLAGS+= -march=native -O2
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
WRKOBJDIR=/path/to/scratchspace/packages
#PKG_DEVELOPER=yes
# threads build broken
PKG_OPTIONS.hdf5 = szip
PKG_OPTIONS.openmpi = f90
PKG_OPTIONS.fftw = fftw-fortran
ACCEPTABLE_LICENSES+= szip-license
ACCEPTABLE_LICENSES+= acm-license
ACCEPTABLE_LICENSES+= vim-license
PKGSRC_COMPILER=gcc
#PKGSRC_FORTRAN=gfortran
# Does this do anything, really?
GCCBASE=/sw/compilers/gcc-4.8.2
USE_NATIVE_GCC=yes
PKGSRC_DEBUG_LEVEL=1
After that, the build just uses PATH (to find bmake, mainly --- or
only?):
PATH=$prefix/bin:$PATH
p=some/package
(cd $tree/$p && bmake && bmake install) 2>&1 | tee $p.log
One caveat ist that I still seem to have to fix up libtool-fortran. Can
someone confirm that?
badstring='-l -l -L-L'
ltf=$prefix/bin/libtool-fortran
if grep -q -- "$badstring" $ltf; then
perl -pi -e "s:$badstring:-L:" $ltf
fi
For some reason, $badstring ends up in some linker flags and breaks things.
This all is on a SLES 11.3 GNU/Linux system, x86-64. I'll see how the
process looks on another box.
Alrighty then,
Thomas
--
Dr. Thomas Orgis
Universität Hamburg
RRZ / Zentrale Dienste / HPC
Schlüterstr. 70
20146 Hamburg
Tel.: 040/42838 8826
Fax: 040/428 38 6270
Home |
Main Index |
Thread Index |
Old Index