Skip to content

Iiboost recipe#2931

Closed
bluescarni wants to merge 37 commits intoconda-forge:masterfrom
bluescarni:iiboost
Closed

Iiboost recipe#2931
bluescarni wants to merge 37 commits intoconda-forge:masterfrom
bluescarni:iiboost

Conversation

@bluescarni
Copy link
Copy Markdown
Contributor

No description provided.

@conda-forge-linter
Copy link
Copy Markdown

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/iiboost) and found some lint.

Here's what I've got...

For recipes/iiboost:

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

@conda-forge-linter
Copy link
Copy Markdown

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/iiboost) and found it was in an excellent condition.

@jakirkham
Copy link
Copy Markdown
Member

Possibly of some interest to you, @stuarteberg.

Comment thread recipes/iiboost/meta.yaml Outdated
build:
- python
- toolchain
- libgcc # [linux]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not needed.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah this can just be gcc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I replaced libgcc with gcc in the build requirements and left libgcc in the run requirements. Is this ok?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes

Comment thread recipes/iiboost/meta.yaml Outdated
imports:
- iiboost
commands:
- python -c "import iiboost"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This command and the one on Line 43 does the same thing

Comment thread recipes/iiboost/meta.yaml
- itk 4.11.*
- boost 1.63.*
run:
- libgcc # [linux]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This one might be needed if they are using OpenMP as stock CentOS 6 doesn't include that library.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, okay. Is gcc needed as a build requirement?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, that's probably the best way to go.

@jakirkham
Copy link
Copy Markdown
Member

FWIW as we are not building on Windows, can just add [skip appveyor] to commit messages. This way AppVeyor won't bother trying to build this.

Comment thread recipes/iiboost/build.sh
-DIIBOOST_USE_OPENMP=$ENABLE_OPENMP \
..

make
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a make check or similar we can run?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There's a python test that can be run. I enabled it on the py2 builds only, as it uses pickled data which cannot be unpickled on py3.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It also segfaults on osx, so I disable it there as well.

https://travis-ci.org/conda-forge/staged-recipes/builds/229909874

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think setting pickle.DEFAULT_PROTOCOL to 0 should fix this issue on Python 3 and be a no-op for Python 2 as 0 appears to be the default on Python 2. Might be worth a try.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jakirkham Unfortunately it does not seem to help, I am getting the same error message.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How did you try this?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just tried to set the default protocol to zero on top of the test files. Is there something else I should've done? Perhaps some conversion tool? (sorry I am not that well versed with the pickle intricacies)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It might need to be set wherever pickle is imported. Initially I was looking for an environment variable for this, but didn't find one. Maybe this is more useful. Would raise this point for discussion in the Python 3 PR.

Copy link
Copy Markdown
Member

@jakirkham jakirkham May 22, 2017

Choose a reason for hiding this comment

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

I guess it is using joblib to do this. FWICT scikit-learn developers ran into the same problem and solved it by having separate files for Python 2 and 3.

xref: scikit-learn/scikit-learn#5355

Comment thread recipes/iiboost/meta.yaml

about:
home: https://github.com/cbecker/iiboost
license: GPL3
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please add license_file: LICENSE.txt.

Comment thread recipes/iiboost/meta.yaml Outdated

build:
number: 0
skip: True # [win]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Seems the CIs are running out of time with the different python and numpy requirements. Would recommend skipping NumPy 1.11 for now by changing win -> win or np!=112. Can remove this in the feedstock and re-render to get the older NumPy version into the build matrix.

@bluescarni
Copy link
Copy Markdown
Contributor Author

@isuruf running into issues with LF/CLRF conversion. There's a file in the source tree which uses Windows style line endings, and when I create a patch from it, it gets applied successfully on Windows but not on linux (because of the git automatic line-ending conversions I guess?).

Any idea on how to proceed?

This reverts commit 3855fdb.
@isuruf
Copy link
Copy Markdown
Member

isuruf commented May 9, 2017

Use the patch only on windows?

@bluescarni
Copy link
Copy Markdown
Contributor Author

I'll try that next :) Thanks.

@bluescarni
Copy link
Copy Markdown
Contributor Author

I have removed the windows build for the moment, as there seems to be a cmake issue in ITK. I have reported it here:

https://issues.itk.org/jira/browse/ITK-3545

Basically, it seems like the CMake support for the hdf5 submodule is broken on Windows, as it will try to link to the hdf5 libs with the wrong prefix (actually, no prefix at all). I'll wait a while to see what happens with the report, otherwise a possible fix is to build the internal version of hdf5 on Windows I guess?

pinging @blowekamp as well.

@bluescarni
Copy link
Copy Markdown
Contributor Author

Thanks @blowekamp, seems to be working now.

Comment thread recipes/iiboost/meta.yaml
- numpy x.x
- itk 4.11.*
- boost 1.63.*
- scikit-learn
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is this only a build requirement?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It is a build requirement in the sense that the tests run as part of the build script require scikit-learn.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tests should be run in the test section, not in the build script :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This raises a question that (I think) there isn't any good answer to. Many C++ libraries include tests that can be executed via make test or make check, etc. But those tests assume the binary hasn't been installed yet. They test it in-place. Conda-build's test step happens too late to run those checks. What is considered "best practice" in such cases? For now, I think simply running the tests as part of the build step is reasonable, but I'm open to suggestions.

Side note: It would be nice of conda-build exposed an environment variable (say, NO_TEST) within build.sh to indicate whether or not the user is building the recipe with the --no-test flag...

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, that is true @stuarteberg - I even maintain a bunch like that. But this package isn't in that situation, is my understanding :)

Comment thread recipes/iiboost/meta.yaml
patches:
- cmath_fixes.diff
- python3.diff
- msvc_fixes.diff
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please submit these patches upstream.

Also patching in Python 3 support for Python 2 only libraries has been frowned upon by other reviewers and core members in the past. Though I get that being stuck on an old Python because of a dependency is a bit of a drag especially for a few lines of code. Though I think we will have a good argument for doing this if upstream adds Python 3 support into master (potentially using a variant of this patch). Let's see what they say.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Some of the MSVC issues are solved in master already. I opened a PR for the remaining ones here:

cbecker/iiboost#24

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

And here's the python3 PR:

cbecker/iiboost#25

Comment thread recipes/iiboost/meta.yaml
- eigen
- numpy x.x
- itk 4.11.*
- boost 1.63.*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There seem to be a few other build and run requirements not included in this list. Looks like they may be transient requirements. For example, I'm seeing zlib, expat, hdf5, jpeg, libpng, gdcm just by looking at the linkages fixed on the Travis CI build. Would recommend adding these and pinning them. Also for any that don't have a pinning, it would be good to look into a reasonable pinning. We often turn to ABI Laboratory for this sort of thing. Here is the history on GDCM for example.

Note: This appears to be linking to the C++ interface of HDF5. ( cc @stuarteberg )

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

These sounds mostly like ITK dependencies. Having each project which use another project maintain the same list of build ( and runtime? ) dependencies seems rather problematic, error prone, burdensome and bound for failure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@jakirkham I thought these are transitive dependencies from ITK?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As noted above, these are being linked to by iiboost libraries directly. Hence why install_name_tool is fixing these linkages in iiboost's libraries. Feel free to peruse the log if you are not convinced. The thing is if we don't list them here, it is going to be more error prone than if we do.

For example, say the jpeg version that itk uses changes. Will that break iiboost? FWICT based on these linkages yes. So we will need to rebuild iiboost. However if we haven't been tracking jpeg in iiboost previously, and we merely bump the build number on iiboost, how can we be sure which package of itk, iiboost, and jpeg we get during an install. If we get the old itk package pinned to the old jpeg and a newer iiboost package, then iiboost will be broken. Similarly if we have the newer itk and jpeg, but an older iiboost. The only way to safeguard against these problems is to pin iiboost dependencies within its own recipe.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes, iiboost is directly being linked against these libraries even though it does not appear to directly need them. This is because it it using and linking against all ITK libraries in CMake:

https://github.com/cbecker/iiboost/blob/master/CMakeLists.txt#L100

It would be better practice to only specify the required ITK COMPONENTS (modules and IO) in the find_package(ITK). This should make these libraries be only "transitive" dependencies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That's really a discussion to have with upstream. Given we are just packaging this library, the best we can do is try to make sure things don't break when it is installed. Hence my recommendation of listing all of these dependencies explicitly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another option is to do something like, bluescarni#1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here's a log, https://travis-ci.org/isuruf/staged-recipes/builds/234882892
Note that only the ITK libs are linked here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice find @isuruf. Yeah that looks ok to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @isuruf!

Comment thread recipes/iiboost/meta.yaml
- python
- numpy x.x
- itk 4.11.*
- boost 1.63.*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If you want, you can drop boost here, because it doesn't seem to be linking to it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These pinnings may need to be updated

[skip appveyor] Use dylibs as-needed
@stale
Copy link
Copy Markdown

stale Bot commented Feb 13, 2020

Hi friend!

We really, really, really appreciate that you have taken the time to make a PR on conda-forge/staged-recipes! conda-forge only exists because people like you donate their time to build and maintain conda recipes for use by the community.

In an effort to maintain this repository and increase the signal-to-noise for open PRs, the maintainers of staged-recipes close excessively old PRs after six months. This PR will remain open for another month, and then will be closed.

If you'd like to keep it open, please comment/push and we will be happy to oblige! Note that very old PRs will likely need to be rebased on master so that they can be rebuilt with the most recent CI scripts. If you have any trouble, or we missed reviewing this PR in the first place (sorry!), feel free to ping the team using a special command in a comment on the PR to get the attention of the staged-recipes team.

Cheers and thank you for contributing to this community effort!

@stale stale Bot added the stale will be closed in 30 days label Feb 13, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Mar 14, 2020

Hi again! About a month ago, we commented on this PR saying it would be closed in another month if it was still inactive. It has been a month and so now it is being closed. Thank you so much for making it in the first place and contributing to the community project that is conda-forge. If you'd like to reopen this PR, please feel free to do so at any time!

Cheers and have a great day!

@stale stale Bot closed this Mar 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale will be closed in 30 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants