tech-pkg archive

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

Re: configure finding "nonfunctional" c++ compiler



Am Fri, 28 Jun 2019 23:24:11 -0500
schrieb Jason Bacon <outpaddling%yahoo.com@localhost>:

> I tried to work with home grown "base" compilers years ago and found the 
> process fraught with too many problems.

While I can confirm that working with external Intel compiler is
currently broken for me (Fortran is, C/C++ seems to work), I continue
to build my pkgsrc trees using GCC+binutils installations I prepared
myself (most recently GCC 8.3.0 on CentOS 7.6).

The essential should be an innocent-looking bootstrap …

	./bootstrap --compiler=gcc --prefix=/path/to/pkgsrc/prefix --unprivileged --workdir=/path/to/workdir

(I do have the GCC environment module loaded that, sets PATH and
friends to use my GCC and binutils.)

… and (most of) these settings in mk.conf:

PKGSRC_COMPILER=gcc
CC=gcc
CXX=g++
FC=gfortran
GCCBASE=/sw/compiler/gcc-8.3.0
USE_NATIVE_GCC=yes
TOOLS_PLATFORM.cpp=/sw/compiler/gcc-8.3.0/bin/cpp
TOOLS_PLATFORM.ld=/sw/compiler/gcc-8.3.0/bin/ld
TOOLS_PLATFORM.readelf=/sw/compiler/gcc-8.3.0/bin/readelf
TOOLS_PLATFORM.strip=/sw/compiler/gcc-8.3.0/bin/strip
CFLAGS+= -I/sw/env/gcc-8.3.0/openmpi/3.1.4/include -I/sw/compiler/gcc-8.3.0/include
FFLAGS+=-O3 -march=native
FCFLAGS=${FFLAGS}
LDFLAGS+=  -L/sw/env/gcc-8.3.0/openmpi/3.1.4/lib/openmpi -L/sw/env/gcc-8.3.0/openmpi/3.1.4/lib -L/sw/compiler/gcc-8.3.0/lib64 -L/sw/compiler/gcc-8.3.0/lib
LDFLAGS+=  -Wl,-R/sw/env/gcc-8.3.0/openmpi/3.1.4/lib/openmpi -Wl,-R/sw/env/gcc-8.3.0/openmpi/3.1.4/lib -Wl,-R/sw/compiler/gcc-8.3.0/lib64 -Wl,-R/sw/compiler/gcc-8.3.0/lib
BUILDLINK_PASSTHRU_DIRS+= /sw/env/gcc-8.3.0/openmpi/3.1.4/lib/openmpi /sw/env/gcc-8.3.0/openmpi/3.1.4/lib /sw/compiler/gcc-8.3.0/lib64 /sw/compiler/gcc-8.3.0/lib /sw/env/gcc-8.3.0/openmpi/3.1.4/include /sw/compiler/gcc-8.3.0/include
BUILDLINK_PASSTHRU_RPATHDIRS+= /sw/env/gcc-8.3.0/openmpi/3.1.4/lib/openmpi /sw/env/gcc-8.3.0/openmpi/3.1.4/lib /sw/compiler/gcc-8.3.0/lib64 /sw/compiler/gcc-8.3.0/lib

You see that I have to battle pkgsrc a bit to force it to use the
toolchain libraries. I'd welcome a more elegant way, but as long as
this works, I don't mind each time my build script creates these
entries.

It has been discussed before that I might be better off hacking the gcc
installation to force its own libraries via spec files.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index