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

Add Eigen #205

Merged
merged 15 commits into from
Apr 1, 2016
Merged

Add Eigen #205

merged 15 commits into from
Apr 1, 2016

Conversation

jakirkham
Copy link
Member

Adds a recipe to build Eigen. This is based off of the recipe in conda-recipes, but has been cleaned up a bit. Also, did a really rough Windows attempt, which needs help (probably).

This will be needed for OpenCV ( #189 ).

@jakirkham jakirkham mentioned this pull request Mar 25, 2016
@jakirkham
Copy link
Member Author

cc @patricksnape

source:
fn: eigen-{{ version }}.tar.gz
url: http://bitbucket.org/eigen/eigen/get/{{ version }}.tar.gz
sha1: 96709ff139c80861e7b2cf65a9dfca8a8cc46eeb
Copy link
Contributor

Choose a reason for hiding this comment

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

I get 574b0732f7e04ecfa91597afb2f69bc44f3387e6 as the correct SHA1.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops, copypasta. Corrected. Thanks. 😄

@patricksnape
Copy link
Contributor

Ah great - I was literally just working on this but the tests are failing on my Mac 😖 Thanks!

@jakirkham
Copy link
Member Author

Oh, sorry, wasn't trying to steal your thunder. You could PR your changes. Maybe we get a better Windows portion out of it. 😉

cd build

cmake -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target INSTALL --config Release
Copy link
Member Author

Choose a reason for hiding this comment

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

Does this do the right thing for install? I copied this from somewhere else. So, I don't know. 😕

Copy link
Member

Choose a reason for hiding this comment

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

Eigen is header-only, right? What is this stuff doing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct it is header only. I copied it from the conda wiki. 😆 Admittedly, it is probably not appropriate. How should it look?

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it just sets some defines and then copies the files. It depends on if you want to build and run the tests - they obviously require building.

For reference, my Eigen recipe on Windows looks like:

mkdir build
cd build

set CMAKE_CONFIG="Release"

if "%PY_VER%" == "3.4" (
    set GENERATOR=Visual Studio 10 2010
) else (
    if "%PY_VER%" == "3.5" (
        set GENERATOR=Visual Studio 14 2015
    ) else (
        set GENERATOR=Visual Studio 9 2008
    )
)

if %ARCH% EQU 64 (
    set GENERATOR=%GENERATOR% Win64
)

cmake .. -G"%GENERATOR%"             ^
 -DCMAKE_BUILD_TYPE=%CMAKE_CONFIG%   ^
 -DINCLUDE_INSTALL_DIR=%LIBRARY_INC% ^
 -DLIB_INSTALL_DIR=%LIBRARY_LIB%     ^
 -DBIN_INSTALL_DIR=%LIBRARY_BIN%

cmake --build . --config %CMAKE_CONFIG% --target ALL_BUILD
cmake --build . --config %CMAKE_CONFIG% --target INSTALL

But I honestly can't remember if the LIB_INSTALL_DIR stuff is necessary. Obviously we should use the black magic rather than my generator logic.

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, tests must be built, but ctest should do that, no? Admittedly, there may be a bit of configuration needed here. Honestly, I almost question doing tests here at all given no libraries are distributed. Though making sure things were defined correctly is important.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for the Windows pointers.

Copy link
Member Author

Choose a reason for hiding this comment

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

So, I have copied your script @patricksnape and pushed that instead. Maybe @msarahan can tell us what black magic is required here.

@@ -0,0 +1,3 @@
cl test.cc

test.exe
Copy link
Member Author

Choose a reason for hiding this comment

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

No clue if this is right. Based on my googling in order to reproduce run_test.sh for Windows, this is what I came up with, but I feel I need to specify the includes somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

This appears to be wrong as it causes AppVeyor to fail.

@jakirkham
Copy link
Member Author

On my Mac, I am seeing the follow failures in the test suite, gmres_2 and levenberg_marquardt. Circle CI sees only the levenberg_marquardt failure also. Is this the same for you @patricksnape?

@jakirkham
Copy link
Member Author

Also, the Mac Travis CI build is definitely timing out. Circle CI ran for ~80mins, but also had a test failure so would take even longer with packaging included. We need to figure out how to make the test suite faster, run less of it, or perhaps drop it entirely.

@patricksnape
Copy link
Contributor

@jakirkham Yup - that's what I was seeing too - but I didn't find any bugs related to those failures. Looks like we made need to raise them upstream on Eigen. Perhaps we skip testing for now?

@jakirkham
Copy link
Member Author

Initially, I was only seeing bug reports for gmres_2, but now I have found the ticket that is closest to ours. Though they have an additional test failure that I am not seeing. Maybe you are seeing this?

-DBIN_INSTALL_DIR=%LIBRARY_BIN%

cmake --build . --config %CMAKE_CONFIG% --target ALL_BUILD
ctest
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently, this won't make the tests run. Maybe it needs to after the last cmake call.

@jakirkham
Copy link
Member Author

Perhaps we skip testing for now?

Agreed. I don't really see anyway around this. The test suite is just way to long. That or we try to increase the number of cores for testing up to some limit. Though I don't know if it is worth the effort if we are only going to see known test failures. Plus, it may just make the CIs crash for different reasons.


if %ARCH% EQU 64 (
set GENERATOR=%GENERATOR% Win64
)
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we still need all this generator stuff if we aren't doing testing? Does this affect how things are configured by Eigen?

@jakirkham jakirkham force-pushed the add_eigen branch 2 times, most recently from d209561 to b05845a Compare March 26, 2016 00:51
@@ -0,0 +1,3 @@
C:\MinGW\bin\g++ -I%LIBRARY_INC% -o test test.cc
Copy link
Member Author

Choose a reason for hiding this comment

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

Could someone explain to me how to get this compiled? Either through g++ or some standard Windows mechanism. As it's just a test, it shouldn't matter which one is picked as long as it does compile.

Copy link
Member

Choose a reason for hiding this comment

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

Question: Here we are using AppVeyor's MinGW, but there is also a mingw package in the default channel. Which one should we use/recommend? Or it does not matter?

@pelson pelson changed the title Add Eigen WIP: Add Eigen Mar 26, 2016
Build the 7 basic tests. Remove the MinGW testing for now because I'm
not sure building with MingGW really proves anything if some tests pass
and then files are where we expect them.
Wrong filename and testing syntax
Small number of tests - seems sensible.
@patricksnape
Copy link
Contributor

OK I put a PR up against your fork that shows how the fix might look - then we can merge it (if you like it) and check it actually works!

This has been a good exercise in creating a solid build and we should sort this issue, however, ironically, it turns out that we only actually need one build...

Fix Appveyor VS9 Express x64 builds
@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly conda-forge-admin automated user.

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

@jakirkham
Copy link
Member Author

Merged @patricksnape's changes from this PR ( jakirkham#6 ). Thanks @patricksnape.

Let's discuss them, see how this works, and figure out how we want to integrate this. 😄

@jakirkham
Copy link
Member Author

OK I put a PR up against your fork that shows how the fix might look - then we can merge it (if you like it) and check it actually works!

Absolutely! Let's see indeed. 😄

This has been a good exercise in creating a solid build and we should sort this issue, however, ironically, it turns out that we only actually need one build...

Not too surprised by that response, honestly. Though it seemed like this was the best place to try out the modifications that you had in mind as it literal has no effect other than the tests.

@jakirkham
Copy link
Member Author

The previous build in the matrix that was failing is now passing. Thoughts about incorporation, @pelson?

@jakirkham
Copy link
Member Author

Passing on all CIs with these build infrastructure fixes. Thoughts about their incorporation into staged-recipes and conda-smithy?

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly conda-forge-admin automated user.

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

@conda-forge-admin
Copy link
Contributor

Hi! This is the friendly conda-forge-admin automated user.

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

@jakirkham
Copy link
Member Author

Thanks again for your changes, @patricksnape. We have split them into the CI infrastructure with this PR ( #251 ). I have also merged that PR into this one (Eigen's) so that we can clean that stuff out of the recipe. Right now, we are testing it to make sure the structure works correctly and then will merge it into staged-recipes and propose similar logic for conda-smithy. Will keep you apprised. Feedback welcome.

@jakirkham jakirkham changed the title WIP: Add Eigen Add Eigen Mar 31, 2016
@jakirkham
Copy link
Member Author

Still passing the relevant case. Though want to wait until AppVeyor finishes.

@jakirkham
Copy link
Member Author

Integration of the VS 2008 64-bit workaround by @patricksnape is proposed in this PR ( conda-forge/conda-smithy#107 ).

@jakirkham
Copy link
Member Author

Saving this to test conda-smithy changes if/when they are released.

@patricksnape
Copy link
Contributor

Right - now - although this was a good test bed for Appveyor - the guys on the Eigen mailing list replied and confirmed that we actually don't need all the Windows builds 😆. We just need one build as all CMake does is copy the files! I will put a PR up for that this evening.

@jakirkham
Copy link
Member Author

Well, I plan on merging to test the conda-smithy stuff so maybe hold off on a PR until it is a feedstock. Want to make sure we really have solved this in our infrastructure.

@jakirkham
Copy link
Member Author

Alright, think I will do the re-rendering manually.

@jakirkham jakirkham merged commit a3ad28d into conda-forge:master Apr 1, 2016
@jakirkham jakirkham deleted the add_eigen branch April 1, 2016 13:33
@jakirkham
Copy link
Member Author

Thanks everyone for your helpful reviews. Also, thanks @patricksnape and @msarahan for your help in getting Windows working here and tracking down relevant issues.

@jakirkham
Copy link
Member Author

🎉 It's in! 🎉

Thanks @patricksnape for putting the Windows stuff together.

Mac and Linux builds are released. Windows is pending. Also, @patricksnape, you will be asked if you would like to join conda-forge. In particular, you will be added to the eigen team, which gives commit privileges on this feedstock/repo. This is useful for making tweaks, new releases, merging suggested changes, and the like to eigen feedstock, which will contain these recipes. All of the CI stuff is automatically maintained (may need to merge a PR to update though). If you have any questions, please let me know.

Also, I have re-rendered the feedstock with a development version conda-smithy to get your nice fixes for VC2008 support of 64-bit compilation. If I haven't added a typo, I expect this will go smoothly and generate Windows binaries.

@patricksnape
Copy link
Contributor

Great work @jakirkham! Thanks for the conda-forge invite 😄

@jakirkham
Copy link
Member Author

Great work @jakirkham!

Thank you for all the hard work on Windows. This will be very helpful. 👍

Thanks for the conda-forge invite 😄

You'll have to thank our bot. 😆

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.

6 participants