-
Notifications
You must be signed in to change notification settings - Fork 32
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
import libarchive.public error AttributeError: dlsym(0xXXXXXXX, archive_read_support_filter_all): symbol not found #16
Comments
I solved this by compiling libarchive from source https://github.com/libarchive/libarchive rather than via brew. |
@rocky I hear that is dangerous. That's why homebrew doesn't fix the issue: it breaks other things on the mac. This needs to be elevated to bug, because the osx libarchive is out of date and this module ignores the LDFLAGS and CPPFLAGS required to point it to a newer version of the library (/usr/local/opt/libarchive for instance, the location used by homebrew). |
This library just imports whatever is available. How are compiler flags supposed to remedy that? We're not compiling anything. |
@dsoprea I flagged this for looking into it this evening. I figured it was a dlopen call, not a compiler call. |
@SkyLeach In the case of OSX having such an old version, I'm not sure there's a better way to point to a different version than to just set Thanks for bringing that reality to my attention. |
@dsoprea I wasn't aware of that environment variable (grepped for the more common LD_LIBRARY_PATH). Any reason why modding library.py to examine both might be a bad idea? In my experience, everyone just assumes the common environment variables. |
It was an oversight. Would you be able add a check for LD_LIBRARY_PATH
after the existing one?
…On Dec 15, 2016 6:18 PM, "Matt Gregory" ***@***.***> wrote:
@dsoprea <https://github.com/dsoprea> I wasn't aware of that environment
variable (grepped for the more common LD_LIBRARY_PATH).
Any reason why modding library.py to examine both might be a bad idea? In
my experience, everyone just assumes the common environment variables.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArranq7DC0PmRpNG87g88-5n3Gnyr5Sks5rIcrXgaJpZM4KP7q8>
.
|
Ok, so I started looking at this. I'll issue a pull request when done if necessary, but I suspect the fault is actually in ctypes. |
Still looking at this, but the simple fix didn't work. |
Having the issue as well, let me know if you manage to find a fix @SkyLeach ! |
I have a fix, working the PR now |
PR #21 up. Please test. I did and it seems to work very well. |
I didn't see any specific reasons why we can't just check for |
If I'm not mistaken, this ONLY works during setup.
So I'm going to move the function out of the setup.py |
@SkyLeach Yes. If we're all convinced that this is the way to go, then it'd have to go in library.py. |
@dsoprea done |
@SkyLeach See my other inquiry from thirty-five minutes ago. |
@dsoprea sure we can, but it'll still only work for PyEasyArchive. If we tried to check LD_LIBRARY_PATH then we'd have to worry about it being set for everything else, but not libarchive since it doesn't get installed in the normal place. |
I need you to walk me through this. As I understand it, there is already a system-global I'm not concerned about discussing how Since this is an exclusive Brew/Mac problem, it's not appropriate to put conditional logic in the project that doesn't help anyone else, especially when that logic depends on third-party tooling. Rather, the proper method should be identified and then be added as a footnote in the documentation. |
@dsoprea this is an OS-specific issue. On OSX the libarchive shipped with the OS is required and old (doesn't work with PyEasyArchive and/or newer archives). You can't just replace it. Most mac users use homebrew. If not, then they will most likely have LD_LIBRARY_PATH set since they are doing something very custom. Simply setting LD_LIBRARY_PATH with a mac (default) or a mac (with homebrew) won't work, because of the above issues. Certainly it is possible to add to the documentation that all mac users need to do some esoteric stuff (basically what I just did) in order to support libarchive and PyEasyArchive. It can be done in .bash_profile (or .bashrc) using similar commands, although much more complicated with bash to strip the version number. Not using the specific installed version (that I pull with brew info --json) means it will not be found by the find_library function. Is this technically specific to mac + homebrew users? Yes. That crowd just happens to be 90% of mac users who do development, thus making it the lions share of anyone wishing to install PyEasyArchive on a mac. |
@SkyLeach (and everyone else) I'm suggesting that the affected individuals set the value into
I added a clause to the "Notes" section of the document as well as a script, based on your code, to print the path. Check it and then I'll merge. Everyone else: Does this help? Is this or isn't this sufficient? |
Looks good, but I'll need to test to be sure that the system library isn't found before/instead-of the environment library (which was one issue). |
Please do. Does this seem like a practical solution for the affected
population?
…On Wed, Feb 8, 2017 at 9:37 AM, Matt Gregory ***@***.***> wrote:
Looks good, but I'll need to test to be sure that the system library isn't
found before/instead-of the environment library (which was one issue).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#16 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArranOtUwfgifZZYCs6iU55-VIsl5T8ks5radMXgaJpZM4KP7q8>
.
|
@dsoprea it seems so, but doesn't work as intended. We may still need to tell users to use LA_LIBRARY_FILEPATH:
|
My test script btw (which is pretty simple):
please disregard the open fh then using fh.name, I was using it to test for os filelocks |
It goes back to my original suggestion. |
I just went ahead and merged. It's already been tested. Everyone: Please see if this makes it easier for you to cope with running under OS X. |
I tried running it and didn't work on mac High Sierra, libarchive v0.4.4
|
@devssh, did you try something like this?
|
It did not work, although I am unable to find the lib/libarchive.dylib as I am using Anaconda which might be another complication on top of MacOSX High Sierra
I'll get back to you if I find it |
Today, I was trying to use this lib as opposed to libarchive-c, and stumbled across this very issue again.
The only way I got it work was setting this (and only this) variable: LA_LIBRARY_FILEPATH . To launch Python with it:
Note that for libarchive-c (the other one project :) ) you need to set a different environment variable:
I suggest the instructions in the Readme.md get updated with the above for OS X users, and this bug gets closed? |
I’m on macOS and I can confirm that this I also used Homebrew’s LA_LIBRARY_FILEPATH=$(brew --prefix libarchive)/lib/libarchive.dylib |
Hi All,
I have installed libarchive using pip on Mac OS 10.11.6.
My Code:
When I run this I get this error
I have installed libarchive also using brew.
Is this library supported on Mac ?
The text was updated successfully, but these errors were encountered: