conda-forge / mesalib-feedstock

A conda-smithy repository for mesalib.
BSD 3-Clause "New" or "Revised" License
3 stars 16 forks source link

Rebuild for Python 3.7, GCC 7, R 3.5.1, openBLAS 0.3.2 #18

Closed xhochy closed 5 years ago

xhochy commented 5 years ago

Fixes #17

conda-forge-linter commented 5 years ago

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

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

xhochy commented 5 years ago

Updated to the latest mesa release and seeing what CI says.

doutriaux1 commented 5 years ago

@xhochy thanks for this!

xhochy commented 5 years ago

We probably need to switch to meson as a build system; that's what all other distributions have done.

doutriaux1 commented 5 years ago

@xhochy I'm not familiar with meson do you have a link please?

doutriaux1 commented 5 years ago

got it: https://mesonbuild.com/ I will look into it if i get time. But feel free to go ahead 😉

henryiii commented 5 years ago

Is the only failure an invalid certificate chain on the Travis worker? Would rerunning that worker fix the problem? Edit: Nevermind, the other worker built and had a problem.

croth1 commented 5 years ago

Could it be that the OSX error is due to clock_gettime not being defined before sdk 10.12, but CF is using 10.9? See e.g. https://github.com/zeromq/libzmq/issues/2175

croth1 commented 5 years ago

Should we skip macOS here and try to fix it later?

croth1 commented 5 years ago

@conda-forge/core @conda-forge/mesalib, any idea how to continue here?

isuruf commented 5 years ago

My suggestion is to build 17.3.9 as in master and worry about the new version later

doutriaux1 commented 5 years ago

it doesn't look like it is picking up the -std=c11 flag

../include/c11/threads_posix.h:391:9: error: implicit declaration of function 'clock_gettime' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

According to: https://clang.llvm.org/compatibility.html it might be worth using the following on OSX:

Compile in the GNU C89 dialect by adding -std=gnu89 to the set of Clang options. This option is only recommended if the program source cannot be changed or if the program also relies on additional C89-specific behavior that cannot be changed.
jakirkham commented 5 years ago

It looks like it is picking up the -std=c11 flag fine as it appears to have found the C11 headers. 😕

IIUC macOS doesn't define clock_gettime (and some other things here). Please see this old blog post. So the error being raised is mesalib tried using clock_gettime on macOS, but it isn't defined on macOS. So the build failed with some complaints about missing definitions.

Sounds like a bug in their detection code during the build. Maybe they have a patch upstream or in one of the other macOS package distributions? Alternatively we can roll our own.

FWIW this is what they have done historically for macOS, which works fine. That said IDK how well it applies to their thread use case.

jakirkham commented 5 years ago

Should we add a version branch in case there are people still wanting the latest version as well?

croth1 commented 5 years ago

It seems like this is currently stale due to time constraints of the contributors. At some point in the commit history we had a version that built for linux, but not for macOS.

Is it an option to go back to this commit, and unblock by skipping the macOS build for now? If I am not mistaken, the macOS sdk has the headers/libraries for mesa anyway, so we could build against native headers instead (correct me if I am wrong!)

hmaarrfk commented 5 years ago

18 fixes the builds for Linux. DOn't know about OSX. PR submitted to xhonchy's https://github.com/xhochy/mesalib-feedstock/pull/1

All I can see is: https://trac.macports.org/ticket/54638 , but there isn't a clear patch to use. And http://mac-os-forge.2317878.n4.nabble.com/mesa-17-1-6-build-failed-on-Snow-Leopard-td341884.html

hmaarrfk commented 5 years ago

Basically this patch makes it impossible to use mesalib with OSX https://gitlab.freedesktop.org/mesa/mesa/commit/af09b867329bcc5d50c22c2e634f5c5deb51e184

Tag 17.1 introduces the use of LRU cache eviction https://gitlab.freedesktop.org/mesa/mesa/blob/17.1/src/util/disk_cache.c

Therefore, the last build possible for OSX is 17.0 https://gitlab.freedesktop.org/mesa/mesa/blob/17.0/src/util/disk_cache.c

hmaarrfk commented 5 years ago

The immediate children are:

jakirkham commented 5 years ago

Disabling macOS builds of mesalib seems reasonable to me.

hmaarrfk commented 5 years ago

Hi All,

it seems that OSX 10.9 just isn't a supported platform for modern versions of mesa-lib. I was able to compile a 17.0 for OSX and 17.3 for linux in #20.

I had to disable the legacy compilers. All CIs now pass.

I think #20 should be merged in to keep the compiler upgrade going forward.

CC: @jakirkham, @conda-forge/mesalib

Mark

hmaarrfk commented 5 years ago

Nice work @xhochy

I managed to catch @mariusvniekerk at a good time to ask him to merge this!!!