-
-
Notifications
You must be signed in to change notification settings - Fork 563
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
Configuring on Alpine Linux wants to build bitarray from source #1262
Comments
My preliminary |
Inside the Docker container
So I'm wondering why ScanCode doesn't use |
This is partly addressed by #1263. With that merged, I get
|
@sschuberth @znerd started to work on an Alpine Dockerfile in #636 FWIW There is no documentation yet on how to port to a new Linux distro or OS but at a high level here is what is needed:
That's what is likely the case here with Alpine. See pypa/packaging-problems#69 and pypa/manylinux#37
|
Now this means that in all cases you are likely to need to compile things from sources to get a container working and that means having either pre-built outside of the Dockerfile OR building in the Dockerfile. In the later case since you likely want to remove all the build tools, compiler, etc... the way would likely be to have a single line Dockerfile instruction that install the build environment, install scancode and removes the build env files , all at once. This is a tad ugly but I see this commonly done in Dockerfiles. |
@sschuberth for a start, what do you get in Alpine if you were to run these?
|
@sschuberth btw, why Alpine vs Debian or else? is this really smaller and faster? |
@sschuberth also what is the $SCANCODE_VERSION you are using? |
Indeed. Please see #1263.
Smaller, yes.
Usually 2.9.2, but right now I'm using my custom branch based on |
I believe that's exactly what multi-stage builds are for. I'll probably give them a look anyway. |
@sschuberth thx... I was not aware of multi-stage builds and this seems an ok way to deal with the issue (vs. the older ways). Here I do not see how to work around building from sources on Alpine |
@sschuberth some pointers to build the non-wheel binaries from sources:
... should be the scripts to build these. |
Improve build scripts to work without bash This is to support building an Alpine-based Docker image See aboutcode-org/scancode-toolkit#1262 Signed-off-by: Philippe Ombredanne <[email protected]>
For now these contain placeholder empty .so/.exe Signed-off-by: Philippe Ombredanne <[email protected]>
For now these contain placeholder empty .so/.exe Signed-off-by: Philippe Ombredanne <[email protected]>
Signed-off-by: Philippe Ombredanne <[email protected]>
Thanks. So even if that would be done, am I correct to assume that we'd still need to find a way to build the binaries for the wheels that contain native code? If so, how would that need to be done? Is there a straight-forward way to mostly automate that? Edit: Looking back at my own original post it looks like |
By now I believe the better approach is to simply install |
I'm trying to create a minimal Docker image based on Alpine Linux to run ScanCode. In particular, I do not want to build any native packages required by ScanCode from source (as the Docker base image does not contain
gcc
, and I do not want to use Docker multi-stage builds). Thus, I'm not installing ScanCode viapip
, but from the release archive which comes with pre-built binaries for several platforms.For some reason, running
./configure etc/conf
when creating the image does not seem to pick up thebitarray
binaries but wants to build them from source:Any idea why that is?
PS: I've been reading through several related issues like #636 but these do not seem to provide a final solution.
The text was updated successfully, but these errors were encountered: