Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build OSX with Cmake #18

Merged
merged 21 commits into from
Jan 25, 2020
Merged

Build OSX with Cmake #18

merged 21 commits into from
Jan 25, 2020

Conversation

jaimergp
Copy link
Member

@jaimergp jaimergp commented Jan 20, 2020

Checklist

  • Used a fork of the feedstock to propose changes
  • Bumped the build number (if the version is unchanged)
  • Reset the build number to 0 (if the version changed)
  • Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
  • Ensured the license file is being packaged.

Changelog

  • gfortran and cmake have a small issue in osx (submitted here). We are using a hack provided in dftd4. Let's see if this works!
  • OSX_DEPLOYMENT_TARGET was hardcoded to 10.7 for OSX+Clang. In conda-forge this must be 10.9. A patch has been added to fix this.
  • tk bundles some X11 libs in the osx package, clobbering our xorg-* dependencies. This is preventing us from building Xleap and other GUI-based components (although it did work on my local setup).
  • libopenblas must not be included-
  • xdrfile/VERSION has to be deleted so it doesn't interfere with the compilation process in osx.

@conda-forge-linter
Copy link

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.

@jaimergp
Copy link
Member Author

@conda-forge-admin, please rerender

@jaimergp
Copy link
Member Author

So that patch did fix the gfortran configuration issue, but we still see problems with missing libraries, I guess that's due to a missing path (the sysroot seems to be missing). I will need to debug this locally and keep you posted.

@jaimergp
Copy link
Member Author

I am optimistic about this commit. Turns out the CMake project was manually specifying a deployment target (10.7) instead of respecting the currently defined one (10.9 for CF). The key was this chat exchange at gitter.

@jaimergp
Copy link
Member Author

Woohoo, that made some progress!

However, it seems we are now hitting the same bug we saw in the other osx PR #11, as described here. The build log is no longer available, though. Again, this will require some local testing :)

@jaimergp
Copy link
Member Author

I can't believe I had to comment out a non-code file to workaround that issue, but it worked 🤣 I can't decide if I am excited or terrified.

Now we are stuck at 90%, with errors related to X:

In file included from /usr/local/miniconda/conda-bld/ambertools_1579827830300/work/AmberTools/src/leap/src/Wc/WcActCB.c:25:
In file included from /usr/local/miniconda/conda-bld/ambertools_1579827830300/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/X11/IntrinsicP.h:51:
In file included from /usr/local/miniconda/conda-bld/ambertools_1579827830300/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/X11/Intrinsic.h:53:
/usr/local/miniconda/conda-bld/ambertools_1579827830300/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/X11/Xlib.h:1686:1: error: unknown type name '_X_DEPRECATED'
_X_DEPRECATED
^
/usr/local/miniconda/conda-bld/ambertools_1579827830300/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/X11/Xlib.h:1687:14: error: expected ';' after top level declarator
extern KeySym XKeycodeToKeysym(
             ^
/usr/local/miniconda/conda-bld/ambertools_1579827830300/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pl/include/X11/Xlib.h:3571:3: error: expected function body after function declarator

Maybe we don't need X11 in OSX and can use the libraries in OSX_DEPLOYMENT_TARGET?

@jaimergp
Copy link
Member Author

This might be the reason: conda-forge/tk-feedstock#15

@jaimergp
Copy link
Member Author

Looks like freecad does not need the X11 libs on osx. Let's see if we need that.

recipe/meta.yaml Outdated Show resolved Hide resolved
@jaimergp
Copy link
Member Author

For some reason I can build locally now, and I am supposedly using the same settings as in the CI. Only thing I can think of is that the CI is headless and might be missing some X libs? No clue, to be honest.

@jaimergp
Copy link
Member Author

Unsurprisingly, we can build osx without Xleap. Is that enough?

@simonbray
Copy link
Member

I'm not a macOS user, but it's surely better than no OSX build at all.

Great work, thanks a lot!

@jaimergp
Copy link
Member Author

Fine, we'll leave that for another PR. I'll create an issue to make sure we don't forget.

I have also bumped up the build number. After the new builds are done, I'd say we can merge!

@simonbray simonbray merged commit c92a235 into conda-forge:master Jan 25, 2020
This was referenced Jan 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants