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

New conda-forge recipe for climlab #2708

Merged
merged 19 commits into from
Apr 7, 2017
Merged

Conversation

brian-rose
Copy link
Contributor

This is a recipe for the climlab packge, which is a climate modeling toolkit written in Python with some underlying numerics in Fortran.

climlab builds against numpy using numpy.distutils to compile Fortran extension modules.

I have tested this recipe on OSX and linux and posted the resulting binaries to https://anaconda.org/brian-rose/climlab.

I would love to get climlab integrated into conda-forge going forward for easier deployment.

Thanks.

@conda-forge-linter
Copy link

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 (recipes/climlab) and found some lint.

Here's what I've got...

For recipes/climlab:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form.

@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 (recipes/climlab) and found it was in an excellent condition.


requirements:
build:
- python 2.7*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add another skip statement above like: # [win or not py2k] instead of pinning the python version here.

- numpy x.x
- toolchain
- gcc
- libgfortran
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gcc brings libgfortran so there is no need to specify it here. (It is a run time dependency only.)

@brian-rose
Copy link
Contributor Author

Thanks @ocefpaf for these suggestions!

The build is still failing on circleci and I'm not sure why.

@ocefpaf
Copy link
Member

ocefpaf commented Apr 1, 2017

Usually Linux (CircleCI) is easier than OS X 😄

Do you know how to run the docker image locally? (http://conda-forge.github.io/docs/testing.html#run-docker-tests-locally-for-feedstock) That can help you debug it.

If Linux is not mandatory for you now just add another skip condition so we can merge this and you can work on fixing it in the feedstock.

@brian-rose
Copy link
Contributor Author

The linux build is failing with linker errors:

/staged-recipes/build_artefacts/climlab_1491269046894/_b_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.5/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status

I am struggling with this. Anyone have suggestions? I encounter the same type of error when running conda-build with this recipe on my local linux system.

On the other hand, the package will build without complaint by manually running python setup.py install using the default ifort compiler on my linux system.

@ocefpaf
Copy link
Member

ocefpaf commented Apr 4, 2017

On the other hand, the package will build without complaint by manually running python setup.py install using the default ifort compiler on my linux system.

I don't have time to look at it right now but you probably need to either adapt the Fortran code or some compiler flag that will make it work with gfortran on Linux.

For now I recommend you to skip the build on Linux and open an issue in the feedstock.

Need to solve a gfortran linking problem that is causing the linux build to fail.
@brian-rose
Copy link
Contributor Author

Thanks @ocefpaf. I am skipping linux build for now.

@ocefpaf
Copy link
Member

ocefpaf commented Apr 4, 2017

Thanks @ocefpaf. I am skipping linux build for now.

When you create the issue in the feedstock ping me and I will take a look. Maybe it is something simple that we are missing now.

Copying directly from conda-forge recipe from scipy, which also needs to build fortran code using numpy.distutils.
We are trying agin to get the linux build working, with yum_requirements.txt copied from scipy.
@brian-rose
Copy link
Contributor Author

Build is now working on OSX and linux!

I mimicked the scipy recipe as closely as possible. The trick for building on linux seems to be the inclusion of yum_requirements.txt

@brian-rose
Copy link
Contributor Author

Anything else needed before this cam be merged?

@brian-rose
Copy link
Contributor Author

brian-rose commented Apr 6, 2017

I should mention that building climlab on Windows is definitely on my wish-list (this is educational software designed for wide deployment on students' laptops).

But from what I can gather, building Fortran extensions for Windows is not yet possible on conda-forge, and probably won't be until there's a working conda-forge recipe for numpy on Windows, discussed here: conda-forge/numpy-feedstock#46

@brian-rose
Copy link
Contributor Author

ping @ocefpaf

@ocefpaf ocefpaf merged commit 305bced into conda-forge:master Apr 7, 2017
@brian-rose brian-rose deleted the master branch September 20, 2021 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants