conda-forge / ctng-compilers-feedstock

A conda-smithy repository for ctng-compilers.
BSD 3-Clause "New" or "Revised" License
12 stars 28 forks source link

ENH swap openmp #7

Closed beckermr closed 4 years ago

beckermr commented 4 years ago

Checklist

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

beckermr commented 4 years ago

@conda-forge-admin, please rerender

beckermr commented 4 years ago

This build is failing for some reason that appears to be unrelated to this PR. @isuruf any ideas?

beckermr commented 4 years ago

Is this section suspicious?

2020-01-01T19:08:55.3703102Z Version of gcc
2020-01-01T19:08:55.3703593Z > 1. 9.2.0 (GCC_V_9)
2020-01-01T19:08:55.3703712Z   2. 8.3.0 (GCC_V_8)
2020-01-01T19:08:55.3703917Z   3. 7.4.0 (GCC_V_7)
2020-01-01T19:08:55.3704000Z   4. 6.5.0 (GCC_V_6)
2020-01-01T19:08:55.3704080Z   5. 5.5.0 (GCC_V_5)
2020-01-01T19:08:55.3704183Z   6. 4.9.4 (GCC_V_4_9)
2020-01-01T19:08:55.3704269Z   7. 4.8.5 (OBSOLETE) (GCC_V_4_8)
beckermr commented 4 years ago

OHHHHHH. I think this is a problem with the crosstool-ng dep. We cannot use 1.24 I think.

beckermr commented 4 years ago

The section from the config above now has 7.3.0 in it and it is selected properly.

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

beckermr commented 4 years ago

@conda-forge-admin, please rerender

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

beckermr commented 4 years ago

@conda-forge-admin, please rerender

beckermr commented 4 years ago

@conda-forge-admin, please rerender

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

beckermr commented 4 years ago

@conda-forge-admin, please rerender

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-webservice.

I tried to re-render for you, but it looks like there was nothing to do.

beckermr commented 4 years ago

I guess the host trick will help this one as well @isuruf. Will fix!

beckermr commented 4 years ago

Note to self. This linking failure is rather odd. I am not sure if it is related to the PR.

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

beckermr commented 4 years ago

We’re also going to need a mechanism to avoid mixing versions of libgcc-ng that don’t have libgomp split out from the llvm version of openmp_impl. Otherwise code will seem to compile but will be silently linked to the wrong openmp.

There is more than one way to do this, including another mutex package or run_constrained. We will need repo data patches too as well I think.

conda-forge-linter commented 4 years ago

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipe) and found some lint.

Here's what I've got...

For recipe:

beckermr commented 4 years ago

Well the paths when gfortran is invoked look wrong:

2020-01-05T17:05:35.9394864Z lrwxrwxrwx 1 conda conda   16 Jan  5 17:05 $PREFIX/lib/libgomp.so -> libgomp.so.1.0.0
2020-01-05T17:05:35.9395921Z lrwxrwxrwx 1 conda conda   16 Jan  5 17:05 $PREFIX/lib/libgomp.so.1 -> libgomp.so.1.0.0
2020-01-05T17:05:35.9396538Z -rwxrwxr-x 1 conda conda 808K Jan  5 16:56 $PREFIX/lib/libgomp.so.1.0.0

Someone, somewhere is resetting the links.

They appear correct when libgcc-ng is built

2020-01-05T16:57:24.9984656Z debug the links...
2020-01-05T16:57:24.9985928Z + echo 'debug the links...'
2020-01-05T16:57:24.9992857Z + ls -lah /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1.0.0
2020-01-05T16:57:25.0032196Z lrwxrwxrwx 1 conda conda  272 Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so -> /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1
2020-01-05T16:57:25.0033355Z lrwxrwxrwx 1 conda conda  276 Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1 -> /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1.0.0
2020-01-05T16:57:25.0034087Z -rwxr-xr-x 1 conda conda 808K Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1.0.0
2020-01-05T16:57:25.0042184Z + ls -lah /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so.1 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so.1.0.0
2020-01-05T16:57:25.0060901Z lrwxrwxrwx 1 conda conda 270 Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so -> /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so
2020-01-05T16:57:25.0062210Z lrwxrwxrwx 1 conda conda 272 Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so.1 -> /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1
2020-01-05T16:57:25.0063489Z lrwxrwxrwx 1 conda conda 276 Jan  5 16:57 /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/x86_64-conda_cos6-linux-gnu/sysroot/lib/libgomp.so.1.0.0 -> /home/conda/feedstock_root/build_artifacts/ctng-compilers_1578240153460/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeh/lib/libgomp.so.1.0.0
beckermr commented 4 years ago

Note to self for later, I need to check the links after conda build has packaged and then installed libgcc-ng. This could be a conda build / conda bug I suppose. I should also make all of the links relative right away so that conda doesn’t mess with them.

beckermr commented 4 years ago

Alright, now all of the symlinks look correct except this one when gfortran is running its tests

lrwxrwxrwx 1 conda conda   29 Jan  6 13:53 $PREFIX/powerpc64le-conda_cos7-linux-gnu/sysroot/lib/libgomp.so.1 -> ../../../lib/libgomp.so.1.0.0
beckermr commented 4 years ago

Alright, I checked all three compilers the links like this appear wrong.

lrwxrwxrwx 1 conda conda 29 Jan  6 14:56 $PREFIX/powerpc64le-conda_cos7-linux-gnu/sysroot/lib/libgomp.so.1 -> ../../../lib/libgomp.so.1.0.0

I don't understand how these are getting reset. Once this aspect is fixed and I add the proper mutex, I think we will be done.

isuruf commented 4 years ago

Why is that link wrong? What's the expected output?

beckermr commented 4 years ago

It should link to libgomp.so.1 in PREFIX/lib.

beckermr commented 4 years ago

Otherwise it won’t get remapped when using llvm openmp

beckermr commented 4 years ago

It is also not what the build ever actually set that link to be as far as I can tell. This aspect is especially weird IIUIC.

isuruf commented 4 years ago

$PREFIX/powerpc64le-conda_cos7-linux-gnu/sysroot/lib/libgomp.so.1 is in openmp_impl right? If so, that's fine. We can have $PREFIX/powerpc64le-conda_cos7-linux-gnu/sysroot/lib/libgomp.so.1 -> $PREFIX/lib/libomp.so in llvm-openmp variant.

Btw, conda-build will change the symlinks from absolute to relative and will use realpath.

beckermr commented 4 years ago

So I wanted to avoid having llvm depend on the libgcc internals.

I think the absolute to relative thing is the issue. If I make all of the links relative it should preserve them as is.

beckermr commented 4 years ago

I also need to move that link to libgcc

isuruf commented 4 years ago

@beckermr, is this ready now?

beckermr commented 4 years ago

I want to merge the pinning and rerender first, but yeah otherwise I am happy.

isuruf commented 4 years ago

Thanks @beckermr for your work here.