-
-
Notifications
You must be signed in to change notification settings - Fork 5
Add osx #4
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 osx #4
Conversation
|
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 ( |
|
@conda-forge-admin, please rerender |
|
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 ( Here's what I've got... For recipe:
|
|
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 ( |
|
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 ( Here's what I've got... For recipe:
|
|
@conda-forge-admin, please lint |
|
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 ( |
|
@conda-forge-admin, please rerender |
1 similar comment
|
@conda-forge-admin, please rerender |
|
Hi @ramtingh, I appreciate all the work you have put in so far, and wondered if there has been any progress on this? I'm using VMTK for multiple projects of my own and am very eager to see it being released on conda-forge. Tell me if I can assist in any way. What seems to be the problem when deploying to osx? |
|
Windows/linux builds are already available on conda-forge. I'm not quite sure what is going with osx, it compiles correctly and then runs into segmentation fault when testing. I don't have much experience with osx so I haven't gotten around to figuring out why that is. |
|
@ramtingh I see. I am mostly working on osx at the moment, although my experience with compilation and segfaults on mac is lacking. Do the logs give any insight; any indication at what point during testing it fails? Also, are you able to re-run the build on Azure? Seems like the previous error logs have been deprecated. |
|
Hi! This is the friendly automated conda-forge-linting service. I was trying to look for recipes to lint for you, but it appears we have a merge conflict. Please ping the 'conda-forge/core' team (using the @ notation in a comment) if you believe this is a bug. |
|
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 ( |
|
@conda-forge-admin, please rerender |
|
@hkjeldsberg no particular error that I can see, just "Segmentation fault: 11" when trying to import anything from vtkvmtk ( along with a lot of ELF warnings that as far as I know can be ignored). At some point I will need to pinpoint exactly what script is causing that |
|
@ramtingh Yeah, I also think the ELF warnings can be ignored. Seems like the segfault occurs during the call to I can try to build this locally (osx) and see if I'm able to reproduce the error, or if it is something Azure specific. |
|
Update: the build fails locally at the same point. Here is the last output before segfault: Note that line 12 in my |
|
@hkjeldsberg Thanks! If you get a chance can you also try it without the patch I added? (I assume remove line 13/14 in meta.yaml) |
|
@ramtingh I tried without the patch locally, but it resulted in termination errors during compilation. Seems like your patch is necessary for it to build VMTK successfully. Here is the last output during compilation: |
|
@hkjeldsberg Fair enough, thanks for the help. Yeah I think that patch is necessary with conda compilers otherwise it overrides important settings. I will be able to look into this in more detail over the next couple of weeks, until then I'd appreciate any ideas of what might be going on. Similar problems on windows ended up being slightly different hdf5 settings between the vtk and itk packages used, but as far as I've checked that shouldn't be a problem with the current versions |
|
I also would like this to work on macOS. I've never tried to use the conda-forge stuff before, so apologies for any misunderstandings there. I've built this branch using the Inspecting the dylib shows: which reveals that the VMTK dylib has not been linked correctly: load command 9 should point to |
|
Setting |
|
OK - something is messed up in the python/libpython binaries installed by the build system. Debugger shows that the segfault occurs in However! Note that the version of that function is inside the libpython dylib. The python executable provided by conda does NOT link against that library. Indeed setting a breakpoint on So, I'm not surprised this is dying when the interpreter is using one set of functions while the extension module is using another |
|
I had another look at this just now. The problem is that the target_link_libraries(${MY_KIT_NAME}Python
PRIVATE
${MY_KIT_NAME}
${VTK_PYTHON_LIBRARIES} #error
VTK::WrappingPythonCore
VTK::Python
)Any link that is needed should be picked up through the link against Since this is an external dependency, I will make a PR there. When accepted (I realise that Slicer may have requirements making this harder...) we can update VMTK's CMake/CMakeLists.txt to point to that and then this recipe should work as-is. EDIT: PR is Slicer/vtkAddon#27 in case anyone here is also maintainer over there? |
|
Thanks! this looks very promising. That is the exact opposite of what I was expecting; I thought as the code works fine for slicer builds it couldn't be anything upstream related, but I don't have nearly enough osx/cmake experience to figure out what is going on. I guess there's three levels this could be fixed at, either the slicer repository, patched in vmtk's git repository or as a patch in this repository (as @rupertnash has already added). @lassoan I think that depends on your preference. |
|
@conda-forge-admin, please rerender |
|
@conda-forge-admin, please rerender |
…nda-forge-pinning 2022.04.13.14.53.36
|
@rupertnash After some minor fixes to the test script, your changes seem to work very well. Only 1 out of 542 tests is failing on osx. For some reason vmtkcentrelinesnetwork hangs on osx+python 3.8/3.9, I strongly suspect joblib is running into an issue and stalling, but I think the worst case scenario if I can't figure out what is going wrong is I'll just disable joblib on osx for now (This test has historically been very finicky anyway). I'll wait for the disucussion in Slicer/vtkAddon#27 to figure out what is the best way of addressing this. Logistically I'd be perfectly happy patching it here to avoid too much disruption to other build systems. |
|
Great! |
|
@conda-forge-admin, please rerender |
…nda-forge-pinning 2022.04.13.14.53.36
|
@rupertnash In the interest of not delaying this too much, I'm thinking of merging it as is so osx packages are available on conda-forge and once vtkAddon is updated it can be fixed for future builds. I can't think of any issues that can cause (besides some technical debt I'd have to fix later), do you think I should wait? |
|
Aye, you're probably right. Suggest creating an issue here to track the TODO. Thanks! |
|
@rupertnash Fair enough, I appreciate all the work you've done to make this work! I'll merge this for now |
Checklist
0(if the version changed)conda-smithy(Use the phrase@conda-forge-admin, please rerenderin a comment in this PR for automated rerendering)