From owner-freebsd-python@freebsd.org  Fri Feb 28 02:47:23 2020
Return-Path: <owner-freebsd-python@freebsd.org>
Delivered-To: freebsd-python@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 02A63257605
 for <freebsd-python@mailman.nyi.freebsd.org>;
 Fri, 28 Feb 2020 02:47:23 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org
 [IPv6:2610:1c1:1:606c::50:13])
 by mx1.freebsd.org (Postfix) with ESMTP id 48TDTk4sJpz43BX
 for <freebsd-python@freebsd.org>; Fri, 28 Feb 2020 02:47:22 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: by mailman.nyi.freebsd.org (Postfix)
 id 75471257604; Fri, 28 Feb 2020 02:47:22 +0000 (UTC)
Delivered-To: python@mailman.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.nyi.freebsd.org (Postfix) with ESMTP id 71C13257603
 for <python@mailman.nyi.freebsd.org>; Fri, 28 Feb 2020 02:47:22 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com
 [IPv6:2607:f8b0:4864:20::1042])
 (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
 server-signature RSA-PSS (4096 bits)
 client-signature RSA-PSS (2048 bits) client-digest SHA256)
 (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 48TDTh52ZPz438H
 for <python@freebsd.org>; Fri, 28 Feb 2020 02:47:20 +0000 (UTC)
 (envelope-from koobs.freebsd@gmail.com)
Received: by mail-pj1-x1042.google.com with SMTP id a18so632126pjs.5
 for <python@freebsd.org>; Thu, 27 Feb 2020 18:47:20 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:reply-to:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=In3QJmxaHpMjclE5waGBcwfTcRhkNRO4hMhO5P0G5cI=;
 b=ZRpp9CZK79xvuj2rTuKCdBOPtAAjy2ZfAepbKiQNYc8Fv1pw3tWeQesPXy/k3Mjpp1
 bFrYpTQsBJ3YkJ4UFe31bR/TF4nQS4HhrV0ULkWQgiLCPTgrkxHB3pBlw5FMt4d799iU
 yd/ai/LwM9oizSRBXP7xG36Cy2UO4V7IbmEa2s4xoOQRewUQ3jRi/HYreHdHtYDq2DWA
 pMgeGugi1UE04QN1ClTq46MyBVvR3utYc6a4wqty3o/Oyay5httJzg/SuWFGhRRrSt8K
 7oND8poGsTkYHwlkNxpw8ek0M6Jm8TL05H5sCKxa527twhxP5IOiW/zriQKUakEoRTy2
 KuAA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:reply-to:subject:to:references:from
 :message-id:date:user-agent:mime-version:in-reply-to
 :content-language:content-transfer-encoding;
 bh=In3QJmxaHpMjclE5waGBcwfTcRhkNRO4hMhO5P0G5cI=;
 b=ZcoF8B05TmjvNeFM3P6Wt52r3Bbi2Yn7mAN+xQz1hSK8SjGSBDientdC3ZQEv5L0ea
 simC/XBbCV2eNC79CTSOKEOlnbulSZO+/sJD5vKu//ShHxO/l9pqVrkAR+4KVz/g+gmr
 i+OHleznQtvfEJCrCgYtbCXQhJ1XKXY2fM5iGfy35bh0eEHrFVceAFnLkJ1Twid7Bysp
 YACTXt0RT7aoVrrGVQif9VMG2qaA3hMtiVM5SB2XXr0MaZ7v1eJ6DchsgKVeoFNBfBae
 8pEoUG80cncofchWakiXKK1hsh7YxnfHNqDJiYlcSdKxopZOcOoTGu2ScUp4s8T517p2
 ZP9w==
X-Gm-Message-State: APjAAAU0X1e44LDTTBiqBKP1lIyN2lAWcThwtoE/FGEaAXCP0KQrUCp6
 bQRxuKpoK2sgB5AGZV0ahwSWwOZb
X-Google-Smtp-Source: APXvYqwZtWqTcm2kBLN7AqSaEWl5tyc9OYFURqTfJBej/IFBhYbSrvv39ocFc44I6bECGaNBCvvCHQ==
X-Received: by 2002:a17:90a:d990:: with SMTP id
 d16mr2159110pjv.143.1582858038807; 
 Thu, 27 Feb 2020 18:47:18 -0800 (PST)
Received: from ?IPv6:2403:5800:7100:5d01:c9cd:e4e8:4814:521?
 (2403-5800-7100-5d01-c9cd-e4e8-4814-521.ip6.aussiebb.net.
 [2403:5800:7100:5d01:c9cd:e4e8:4814:521])
 by smtp.gmail.com with ESMTPSA id l37sm53669pjb.15.2020.02.27.18.47.17
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 27 Feb 2020 18:47:18 -0800 (PST)
Sender: Kubilay Kocak <koobs.freebsd@gmail.com>
Reply-To: koobs@FreeBSD.org
Subject: Re: Missing symbol under tox in openssl stuff
To: Willem Jan Withagen <wjw@digiware.nl>, python@freebsd.org
References: <94312df8-3d70-76e4-4e83-b57bf592a06d@digiware.nl>
From: Kubilay Kocak <koobs@FreeBSD.org>
Message-ID: <3fe14206-cdbe-53e8-41e5-e471e78c6fec@FreeBSD.org>
Date: Fri, 28 Feb 2020 13:47:15 +1100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101
 Thunderbird/74.0
MIME-Version: 1.0
In-Reply-To: <94312df8-3d70-76e4-4e83-b57bf592a06d@digiware.nl>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 48TDTh52ZPz438H
X-Spamd-Bar: ---
Authentication-Results: mx1.freebsd.org;
 dkim=pass header.d=gmail.com header.s=20161025 header.b=ZRpp9CZK;
 dmarc=none;
 spf=pass (mx1.freebsd.org: domain of koobsfreebsd@gmail.com designates
 2607:f8b0:4864:20::1042 as permitted sender)
 smtp.mailfrom=koobsfreebsd@gmail.com
X-Spamd-Result: default: False [-3.05 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[];
 HAS_REPLYTO(0.00)[koobs@FreeBSD.org]; TO_DN_SOME(0.00)[];
 R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36];
 REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3];
 DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2];
 FORGED_SENDER(0.30)[koobs@FreeBSD.org,koobsfreebsd@gmail.com];
 IP_SCORE(-0.85)[ip: (-0.65), ipnet: 2607:f8b0::/32(-1.88), asn: 15169(-1.67),
 country: US(-0.05)]; MIME_TRACE(0.00)[0:+];
 FREEMAIL_ENVFROM(0.00)[gmail.com];
 FROM_NEQ_ENVFROM(0.00)[koobs@FreeBSD.org,koobsfreebsd@gmail.com];
 MID_RHS_MATCH_FROM(0.00)[];
 ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
 ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; TAGGED_FROM(0.00)[];
 FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0];
 MIME_GOOD(-0.10)[text/plain];
 PREVIOUSLY_DELIVERED(0.00)[python@freebsd.org];
 DMARC_NA(0.00)[FreeBSD.org]; TO_MATCH_ENVRCPT_SOME(0.00)[];
 RCVD_TLS_ALL(0.00)[]
X-BeenThere: freebsd-python@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FreeBSD-specific Python issues <freebsd-python.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-python>, 
 <mailto:freebsd-python-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-python/>
List-Post: <mailto:freebsd-python@freebsd.org>
List-Help: <mailto:freebsd-python-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-python>,
 <mailto:freebsd-python-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Fri, 28 Feb 2020 02:47:23 -0000

On 27/02/2020 10:53 pm, Willem Jan Withagen wrote:
> Hi,
> 
> I'm the first to acknowledge that I do not know enough of python.
> But still I can get by most of the times.
> 
> However during the tests of my Ceph port one of the tests complains:
> ==============
> 
> orchestrator/_interface.py:701: ImportError
> ------------------------------ Captured log call 
> -------------------------------
> ERROR    orchestrator._interface:_interface.py:391 _Promise failed
> Traceback (most recent call last):
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/cephadm/module.py", 
> line 334, in do_work
>      res = self._on_complete_(*args, **kwargs)
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/cephadm/module.py", 
> line 398, in call_self
>      return f(self, *inner_args)
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/cephadm/module.py", 
> line 2352, in _create_grafana
>      return self._create_daemon('grafana', daemon_id, host)
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/cephadm/module.py", 
> line 1874, in _create_daemon
>      j = self._generate_grafana_config()
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/cephadm/module.py", 
> line 2288, in _generate_grafana_config
>      cert, pkey = create_self_signed_cert('Ceph', 'cephadm')
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/mgr_util.py", line 
> 134, in create_self_signed_cert
>      from OpenSSL import crypto
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/.tox/py3/lib/python3.7/site-packages/OpenSSL/__init__.py", 
> line 8, in <module>
>      from OpenSSL import crypto, SSL
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/.tox/py3/lib/python3.7/site-packages/OpenSSL/crypto.py", 
> line 15, in <module>
>      from OpenSSL._util import (
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/.tox/py3/lib/python3.7/site-packages/OpenSSL/_util.py", 
> line 6, in <module>
>      from cryptography.hazmat.bindings.openssl.binding import Binding
>    File 
> "/home/jenkins/workspace/ceph-master/src/pybind/mgr/.tox/py3/lib/python3.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py", 
> line 15, in <module>
>      from cryptography.hazmat.bindings._openssl import ffi, lib
> ImportError: 
> /home/jenkins/workspace/ceph-master/src/pybind/mgr/.tox/py3/lib/python3.7/site-packages/cryptography/hazmat/bindings/_openssl.abi3.so: 
> Undefined symbol "SSLv3_client_method"
> 
> ==============
> 
> And I have no idea how and why this complaint is here.
> If I check with openssl it seems that this version should be available 
> in version 1.1.1,d that is installed.
> And all packages are up to date.
> 
> Who is the casue of the error here?
> And how do I debug this....
> 
> --WjW

Looks like cryptography is compiled/linked inconsistently, probably 
against base *and* ports OpenSSl versions, or some OPTIONS in your 
openssl port have changed, but cryptography was not rebuilt

Rebuild cryptography (via ports), and try to reproduce

Alternatively, because tox installs dependencies itself in its own 
environments, its probably trying to install crytography manually (not 
via the port), which produces a broken cryptography Python package.

This is why we dont use tox for tests (as it bypasses ports). Use the 
test runner that tox itself invokes (pytest, nose, unittest, whatever)