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 on macintosh #179

Closed
kamakshidasan opened this issue Dec 30, 2018 · 10 comments
Closed

Build on macintosh #179

kamakshidasan opened this issue Dec 30, 2018 · 10 comments

Comments

@kamakshidasan
Copy link
Contributor

Undefined symbols for architecture x86_64:
"_PyUnicode_FromString", referenced from:
ttk::DimensionReduction::execute() const in libdimensionReduction.a(DimensionReduction.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@julien-tierny
Copy link
Collaborator

julien-tierny commented Dec 30, 2018 via email

@kamakshidasan
Copy link
Contributor Author

kamakshidasan commented Dec 30, 2018 via email

@jalevine
Copy link
Contributor

jalevine commented Jan 4, 2019

This sounds a lot like the DimensionReduction module cannot find python's libraries when compiling / linking.

What versions of python are you building against and how did you install it?

If you're using homebrew python, and want to recreate my setup, you may also have to add (as suggested by homebrew):

export PATH="/usr/local/opt/python/libexec/bin/:$PATH"

To your .bashrc (or similar shell startup script). This ensures that when you build ParaView with PARAVIEW_ENABLE_PYTHON=ON it selects the right one. TTK in turn takes the ParaView python information when running its cmake.

Are you explicitly trying to use this feature of TTK? If not, we might be able to do a workaround where you do not compile it. We're still debugging some of the DimensionReduction features on OSX.

@kamakshidasan
Copy link
Contributor Author

kamakshidasan commented Jan 4, 2019 via email

@kamakshidasan
Copy link
Contributor Author

@julien-tierny
Copy link
Collaborator

julien-tierny commented Jan 5, 2019 via email

@kamakshidasan
Copy link
Contributor Author

Thanks @julien-tierny, it worked :)

@jalevine
Copy link
Contributor

jalevine commented Jan 9, 2019

Looking closely at compile_commands.json, it does seem like there's an inconsistency.

When you're building core/base/dimensionReduciton you find python3.7 and use that. This is the only object that gets built with python3.7 (see lines 78, 79)

All other objects, in particular ttkDimensionReduction appear to be including and/or linking against python2.7 (see, for example, lines 368, 369).

It appears you have both pythons installed with homebrew. On my environment, I explicitly removed python@2 from homebrew (which is kind of recommended these days).

My guess is that either on the ParaView cmake or the TTK cmake commands, it found half of one python and half of the other. You may have to run ccmake instead and manually set up python to work correctly, my guess would be for the ParaView compilation. Can you confirm which version of python ParaView was compiled against?

It may also be related to if your installation of vtk was brewed with the "--without-python@2" formula. I found this is a bit tricky with the current version of homebrew in vtk, as some of the dependencies needed to installed in sequence with that flag (see step 2 of https://topology-tool-kit.github.io/installation-osx.html)

@kamakshidasan
Copy link
Contributor Author

My guess is that either on the ParaView cmake or the TTK cmake commands, it found half of one python and half of the other.

You're guess might be right. Paraview is against Python 2.7. I don't think I have updated it after TTK 0.9.1. I think VTK works fine, though.

I think I might have to install Paraview again with a newer version --- but this means I might have to migrate all my earlier TTK scripts :(

@julien-tierny
Copy link
Collaborator

julien-tierny commented Jan 9, 2019 via email

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

No branches or pull requests

3 participants