Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

failed to install on macos #140

Closed
Closed

Description

@gregkonushev-okta

I have installed libxml2 from brew,
but pip install bblfsh fails with this error:

In file included from bblfsh/libuast/uast.cc:4:
bblfsh/libuast/uast_private.h:4:10: fatal error: 'libxml/tree.h' file not found
#include <libxml/tree.h>
         ^~~~~~~~~~~~~~~
1 error generated.
error: command 'g++' failed with exit status 1

Activity

  1. creachadair commented on Jan 17, 2019

    @creachadair
    Contributor

    I believe libxml2 is keg-only, because Homebrew doesn't want to introduce link-time conflicts with existing system libraries. You may need to tell pip where the Homebrew include and lib paths are, though, perhaps something like:

    env CFLAGS="-I$(brew --prefix)/opt/libxml2/include/libxml2" pip install bblfsh

    Edit: fix missing flag.

  2. juanjux commented on Jan 18, 2019

    @juanjux
    Contributor

    Yes, as explained in the Dependencies section of the readme, this client depends on having libxml2 headers installed.

    Next version will remove that requirement.

  3. creachadair commented on Jan 18, 2019

    @creachadair
    Contributor

    Yes, as explained in the Dependencies section of the readme, this client depends on having libxml2 headers installed.

    I think the problem was that they are installed, but Homebrew doesn't automatically link them to the default include path.

  4. gregkonushev-okta commented on Jan 18, 2019

    @gregkonushev-okta
    Author

    For Mojave MacOS I was able to solve this problem by installing command line tools from /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

  5. bzz commented on Jan 24, 2019

    @bzz
    Contributor

    Thank you for reporting workaround @gregkonushev-okta 🎉

    Will close this, if there no objections as a workaround is found AND a it's not worth documenting it elsewhere as @juanjux mentioned - a new version from #128 will not have this dependency at all.

  6. alichtman commented on Mar 21, 2019

    @alichtman

    I just ran into this same issue, and the command that fixed the problem for me was:

    env CFLAGS="-I$(brew --prefix)/opt/libxml2/include/libxml2" pip3 install bblfsh

    From @creachadair

    It would be helpful if this were added to the README. I do not think #128 fixed this issue.

  7. creachadair commented on Mar 22, 2019

    @creachadair
    Contributor

    I just ran into this same issue, and the command that fixed the problem for me was:

    env CFLAGS="-I$(brew --prefix)/opt/libxml2/include/libxml2" pip3 install bblfsh

    From @creachadair

    It would be helpful if this were added to the README. I do not think #128 fixed this issue.

    I believe #128 removes the dependency, but that the current release doesn't include it yet. We are planning to cut a release including these changes soon, and at that point this workaround should no longer be required. Sorry for the confusion about timing.

  8. bzz commented on Mar 25, 2019

    @bzz
    Contributor

    And v3.0.0 release is out now on pypi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions