On Fri, Sep 21, 2018 at 10:33 AM Toon Moene <t...@moene.org> wrote: > On 09/20/2018 10:01 PM, Thomas Koenig wrote: > > > Hi Damian, > > > >> On a related note, two Sourcery Institute developers have attempted to > >> edit > >> the GCC build system to make the downloading and building of > OpenCoarrays > >> automatically part of the gfortran build process. Neither developer > >> succeeded. > > > > We addressed integrating OpenCoarray into the gcc source tree at the > > recent Gcc summit during the gfortran BoF session. > > > > Feedback from people working for big Linux distributions was that they > > would prefer to package OpenCoarrays as a separate library. > > (They also mentioned it was quite hard to build.) > > Well, Linux distributors have to fit the build of OpenCoarrays into > *their* build system, which might be just as complicated as we trying it > to force it into *gcc's* build system ... > > For an individual, OpenCoarrays is not hard to build, and the web page > www.opencoarrays.org offers multiple solutions: > > "Installation via package management is generally the easiest and most > reliable option. See below for the package-management installation > options for Linux, macOS, and FreeBSD. Alternatively, download and > build the latest OpenCoarrays release via the contained installation > scripts or with CMake." > > I choose the cmake based one, because I already had cmake installed to > be able to build ECMWF's (ecmwf.int) eccodes package. It probably helped > that I also already had openmpi installed. From my command history: > > 1754 tar zxvf ~/Downloads/OpenCoarrays-2.2.0.tar.gz > 1755 cd OpenCoarrays-2.2.0/ > 1756 ls > 1757 less README.md > 1758 cd .. > 1759 mkdir opencoarrays-build > 1760 cd opencoarrays-build > 1761 (export FC=gfortran; export CC=gcc; cmake ../OpenCoarrays-2.2.0/ > -DCMAKE_INSTALL_PREFIX=$HOME/opencoarrays) > 1762 make > 1763 make test > 1764 make install >
FWIW, this didn't work for me, as I want to use my own build of gfortran trunk. It did correctly use the correct gfortran binary as specified by the FC env. variable, but it still insists on linking against libgfortran.so.4 (installed by the system package manager) and not the libgfortran.so.5 from my own gfortran installation (found both on LD_RUN_PATH and LD_LIBRARY_PATH). I tried -DCMAKE_PREFIX_PATH=... but that didn't work any better. Gah, I hate cmake.. Any ideas? -- Janne Blomqvist