docker-alpine icon indicating copy to clipboard operation
docker-alpine copied to clipboard

Question: how do one solve unsatisfiable constraints that require both *ssl* libs?

Open mluis opened this issue 8 years ago • 10 comments

EDIT (17h after): ~ # apk add openssl-dev qt-dev

ERROR: unsatisfiable constraints:
  openssl-dev-1.0.2k-r0:
    conflicts: libressl-dev-2.5.5-r0[pc:libcrypto=1.0.2k] libressl-dev-2.5.5-r0[pc:libssl=1.0.2k] libressl-dev-2.5.5-r0[pc:openssl=1.0.2k]
    satisfies: build-deps-0[openssl-dev]
  libressl-dev-2.5.5-r0:
    conflicts: openssl-dev-1.0.2k-r0[pc:libcrypto=2.5.5] openssl-dev-1.0.2k-r0[pc:libssl=2.5.5] openssl-dev-1.0.2k-r0[pc:openssl=2.5.5]
    satisfies: qt-dev-4.8.7-r6[libressl-dev]```

mluis avatar Oct 07 '17 22:10 mluis

Can you provide a reproducer?

This works for me...

Dockerfile:

FROM gliderlabs/alpine:3.6
RUN apk add --no-cache qt-dev

Build it:

$ docker build --rm -t qtdev .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM gliderlabs/alpine:3.6
 ---> 2a67891a149d
Step 2 : RUN apk add --no-cache qt-dev
-snip-
(121/121) Installing qt-dev (4.8.7-r6)
Executing busybox-1.26.2-r5.trigger
Executing glib-2.52.1-r0.trigger
No schema files found: doing nothing.
Executing ca-certificates-20161130-r2.trigger
OK: 325 MiB in 130 packages
 ---> b774b41fbf06
Removing intermediate container 7d54e2802d73
Successfully built b774b41fbf06

jumanjiman avatar Oct 08 '17 13:10 jumanjiman

Dockerfile:

FROM gliderlabs/alpine:3.6
RUN apk add --no-cache openssl-dev qt-dev

mluis avatar Oct 08 '17 16:10 mluis

alpine linux packages, including qt-dev related packages, are compiled with libressl, not openssl.

openssl-dev and libressl-dev provide many files that have the same path, therefore the two packages cannot be installed at the same time.

example for /usr/lib/libssl.so: https://pkgs.alpinelinux.org/contents?file=libssl.so&path=&name=&branch=v3.6&repo=&arch=x86_64

screenshot 2017-10-08 at 17 04 33

more info:

  • the issue to migrate from openssl to libressl is here.
  • It was also announced on the mailing list here.

hth.

jumanjiman avatar Oct 08 '17 21:10 jumanjiman

Nice! That's what I was looking for! About to test it.

mluis avatar Oct 10 '17 03:10 mluis

Can you give an example of what you are building that needs openssl-dev if this is not yet solved?

andyshinn avatar Oct 12 '17 17:10 andyshinn

@andyshinn sure. I'm building gr-gsm with PyBOMBS under Alpine. Basically a RUN that should go smooth like:

apk --update add --no-cache --virtual build-deps $DEPS 
printf "[list]\nformat=columns\n" >> /etc/pip.conf 
pip install PyBOMBS
pybombs auto-config
pybombs recipes add-defaults
pybombs prefix init ./gnur -a gnur
pybombs -p ./gnur install gr-gsm
ldconfig

mluis avatar Oct 15 '17 12:10 mluis

@jumanjiman regarding on the mailing list email I see "you will have to replace it with", since the objetive is to have /usr/lib/libssl.so didn't it makes sense to have some sort of meta-package linking with names for eg. libssl or libssl-dev ? That would increase redundancy and smooth-upgrading to future versions of Alpine.

ps: I don't know Apk nor Alpine's from a developer point of view, so I don't know if it's already implemented.

mluis avatar Oct 15 '17 12:10 mluis

Apk are giving me these errors also.

(310/312) Installing wxgtk-dev (3.0.2-r0)
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/bin/wxrc owned by wxgtk2.8-dev-2.8.12.1-r4.
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/bin/wx-config owned by wxgtk2.8-dev-2.8.12.1-r4.
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/share/bakefile/presets/wx_win32.bkl owned by wxgtk2.8-dev-2.8.12.1-r4.
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/share/bakefile/presets/wx.bkl owned by wxgtk2.8-dev-2.8.12.1-r4.
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/share/bakefile/presets/wx_unix.bkl owned by wxgtk2.8-dev-2.8.12.1-r4.
ERROR: wxgtk-dev-3.0.2-r0: trying to overwrite usr/share/aclocal/wxwin.m4 owned by wxgtk2.8-dev-2.8.12.1-r4.

mluis avatar Oct 15 '17 19:10 mluis

After 5 days on this I am tired of my CPU's performance already. This is the actual state of my gr-gsm.Dockerfile @andyshinn

mluis avatar Oct 15 '17 22:10 mluis

for anyone else running into issues building Python3.7 on alpine, eg:

Could not build the ssl module!
Python requires an OpenSSL 1.0.2 or 1.1 compatible libssl with X509_VERIFY_PARAM_set1_host().
LibreSSL 2.6.4 and earlier do not provide the necessary APIs, https://github.com/libressl-portable/portable/issues/381

make sure you update to the latest alpine release. if you have FROM alpine:3.8, you get a recent enough version of libressl-dev, and Python will build fine.

hjwp avatar Jul 09 '18 16:07 hjwp