-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
How to make it work on Windows? #29
Comments
Sorry that I dropped the ball on the related #8 and #16 tickets.... I have prebuilt Windows binaries for another project here: The corresponding source code is there: https://github.com/nexB/scancode-thirdparty-src The way scancode loads the library is a tad more engaged since it is the same code for Win/Linux/mac. |
Thanks for replay I'll see if I can make it work :) |
I also posted a reply at http://stackoverflow.com/questions/37165002/using-libarchive-in-python-on-windows I assume that this is you on both places. ;) |
Any possibility/plan of getting a pip install setting it all up to work without any additional manual steps on Windows ? |
@Zitrax Yes, someone just has to step up and do the work. I'm busy and I don't use Windows so it probably won't be me (except perhaps if someone proposes to pay me to get it done). |
404... 😢 |
@pombredanne Thanks for that. I still can't figure out how to make it work. I assume I need the libarchive.dll file, so I've tried adding that to my
What am I doing wrong? |
It is kinda hard to figure out short of looking at your code. Is this public? And FWIW, the build I listed above needs ALL the DLLs, not just libarchive.dll. |
From your development branch I see: Windows 64-bit libraries: https://github.com/nexB/scancode-toolkit/tree/develop/plugins/extractcode-libarchive-win_amd64/src/extractcode_libarchive/lib Windows 32-bit libraries: https://github.com/nexB/scancode-toolkit/tree/develop/plugins/extractcode-libarchive-win32/src/extractcode_libarchive/lib
Well, I get the same error and I'm using Windows 10 x64 to try this out, and I've tried both libraries (that are in their folders with all the related libraries) |
Oh. @pombredanne, the full contents of the Looking at the other library folders, The This is all as seen on the https://github.com/nexB/scancode-toolkit/tree/develop/plugins |
Well, almost three hours later and I finally built a version of the |
@pombredanne Would it be possible for you to include you build scripts to this project's setup.py? So that whenever somebody do a This would help with using external build system like azure-pipelines or appveyor. |
Here is a guide I wrote in some other issue for some other project regarding how to compile libarchive on Windows: I will now explain how to compile libarchive.dll, so that one can install this python libarchive package.
I'm not sure you need to do this to install python-libarchive-c, as this was from a post on a different project that needed libarchive in PATH for the installer
Alternatively, install python-libarchive-c and the put the .dll files into your program/script folder where you need libarchive:
|
All and @HatScripts and @MartinFalatic in particular: sorry for missing some of the discussions and your messages in this tickets! FWIW, the way I did build the natives has always been there on my side https://github.com/nexB/scancode-thirdparty-src/blob/master/libarchive/build.sh#L57 and there are build bits for each in https://github.com/nexB/scancode-thirdparty-src This has always been painfully manual and it would be awesome to have these bakes in a setup.py of sorts : this is feasible though it will hard |
Also I now have separate wheels built for scancode in https://github.com/nexB/scancode-toolkit/tree/develop/plugins-builtin that was contributed to help supporting Debian packaging and similar. We could very much extract that entirely of ScanCode and make it a reusable wheel(s) for everyone to reuse. From experience, that's not trivial to get right and is serious and complex work to get these kind of builds working. If someone is a student willing to participate to the Google Summer of Code under scancode/aboutcode I would be willing to sponsor and mentor that FWIW! |
@MartinFalatic re:
yes that was... my bad there. I am tackling the rebuild on all OS now. |
I did find that downloading the appropriate zip file from https://github.com/libarchive/libarchive/releases and putting the |
I think it would be cleaner to make a separate package for people who want to install a copy of libarchive via |
@Changaco I quite like the idea - the only downside would be that the libarchive-binary would do nothing on its own - the upside would be that potentially it could contain the various different builds of libarchive (dll/etc) to support platforms other than Windows that may not have it installed or even when the system libarchive is outdated but cannot be updated. |
This comment has been minimized.
This comment has been minimized.
https://github.com/libarchive/libarchive/releases https://wiki.openssl.org/index.php/Binaries put |
Hi,
I want to use this in my code but getting problems to make it work on windows with python 3.4
I've installed it with pip without a problem but whenever I use import libarchive it fails with:
OSError: [WinError 126] The specified module could not be found
This is coming from ffi.py from the code below:
I've never used ctypes before but if I understand correctly it is looking for external DLL. I found and installed http://gnuwin32.sourceforge.net/packages/libarchive.htm also I've added C:\Program Files (x86)\GnuWin32\bin to my %PATH% in environmental variables but it still cannot load the module. As it does not give me the name of the module, I'm not sure what module it is looking for. What am I missing?
The text was updated successfully, but these errors were encountered: