Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

God is subtle, but he is not malicious. -- Albert Einstein


devel / comp.lang.python / strange problem building non-pure wheel for apple M1 arm64

SubjectAuthor
* strange problem building non-pure wheel for apple M1 arm64Robin Becker
+- Re: strange problem building non-pure wheel for apple M1 arm64Peter Pearson
`* Re: strange problem building non-pure wheel for apple M1 arm64Christian Gollwitzer
 `- Re: strange problem building non-pure wheel for apple M1 arm64Robin Becker

1
strange problem building non-pure wheel for apple M1 arm64

<mailman.234.1646670133.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17424&group=comp.lang.python#17424

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: rob...@reportlab.com (Robin Becker)
Newsgroups: comp.lang.python
Subject: strange problem building non-pure wheel for apple M1 arm64
Date: Mon, 7 Mar 2022 16:22:10 +0000
Lines: 35
Message-ID: <mailman.234.1646670133.2329.python-list@python.org>
References: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de LXjnvWZXmVBXsKfrgzXC7AYpIO3t4XUf06C/LmibyGkA==
Return-Path: <robin@reportlab.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=reportlab-com.20210112.gappssmtp.com
header.i=@reportlab-com.20210112.gappssmtp.com
header.b=PtnagNlo; dkim-adsp=none (unprotected policy);
dkim-atps=neutral
X-Spam-Status: OK 0.005
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:problem': 0.03;
'pip': 0.04; 'wrong.': 0.07; 'macos': 0.09; 'becker': 0.16;
'command.': 0.16; 'compiled': 0.16; 'extensions': 0.16;
'readability': 0.16; 'received:192.168.0.16': 0.16;
'received:209.85.221.47': 0.16; 'received:mail-
wr1-f47.google.com': 0.16; 'robin': 0.16; 'setuptools': 0.16;
'warning:': 0.16; 'github': 0.17; 'uses': 0.19; 'figure': 0.19;
'to:addr:python-list': 0.20; 'version': 0.23; 'install': 0.23;
'code': 0.23; 'command': 0.23; 'lines': 0.23; 'skip:- 10': 0.25;
'seems': 0.26; 'error': 0.29; 'header:User-Agent:1': 0.30;
"doesn't": 0.32; 'skip:- 60': 0.32; 'but': 0.32; 'subject:for':
0.33; 'received:192.168.0': 0.33; 'received:google.com': 0.34;
'built': 0.36; 'received:209.85': 0.37; 'received:192.168': 0.37;
'file': 0.38; 'received:209': 0.39; 'use': 0.39; 'want': 0.40;
'try': 0.40; 'above': 0.62; 'load': 0.62; 'everything': 0.63;
'look': 0.65; 'skip:/ 30': 0.69; 'skip:b 60': 0.69; 'experts':
0.76; 'skip:- 50': 0.76; 'skip:b 80': 0.84
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=reportlab-com.20210112.gappssmtp.com; s=20210112;
h=message-id:date:mime-version:user-agent:to:content-language:from
:subject:content-transfer-encoding;
bh=HjWoW/sRKSspyppi+KiNNLZcLD7AS3Z8RQ5UqfCOqWs=;
b=PtnagNlopBwJAAi5b+Tp4HqT8ibDZsN6WRjNQhxP1qIeflT9wDM00/XzOvYH8P4pBM
ZkrzqRjueSRzes1VLavCa5dqWea1byQwbSPyHN+99mtNqblzaf73LFL2tbUpeC4v3O2e
ziES/HrkYUMQ0hJEBUF+tvzIlhbsBTnj1uo04lXa/ydfqP0tjeTburieatnxi2YpDAOO
Ob+Cjdor+ewyLBiai3Tz6fDVLIJCv88Vn3+ZnRPz8yuHO0z7lOnwaEdENaplm6gyibK7
jBJh8+S4gEkMIMEcitRGpqYVtX+ZzYbTCJhMQQM37Rpz0BuoeFZ4Tlh4c1X0wFBnaivb
M5WA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:message-id:date:mime-version:user-agent:to
:content-language:from:subject:content-transfer-encoding;
bh=HjWoW/sRKSspyppi+KiNNLZcLD7AS3Z8RQ5UqfCOqWs=;
b=oxEpr5aUgQ8SPqI5csdUZuwmpXGkwGD3Y55J3oec8vCvSDkPcRXnaTCwJ3+K/CB1jZ
gwe1UmNYmbEsDa/wRzfk1V/akcddNgf8bYWmJVLO00DJTvhTqraOoEbDNw+cYJdH29yC
cJdy7vr0UZAgNNedEgbZIeD9DFgmDCDEribbAN1Fl+456bPYhgBs9umlkRzDjWMnenBE
LuDb5/oVIOyqwEmX195KLdE4b4nw8bSi139IV8OiVK59FgW5PJ8Ke7Fyb1j0EFaoZ5lS
6oQ3Zrw+bua0Uw5T9FkJZiKEUTNded6gIOk/Vrn5IGKchwRZ812w4Uqf9QSK7SbJmBtW
xjjA==
X-Gm-Message-State: AOAM533RZcYHDFpOQNzgn90NjzYlpWnD3CN8vtildRaGIL9VL4KmAonc
X2OmSUwdGN18RDAbTUKTmLGgh4YQmWAFqKt2
X-Google-Smtp-Source: ABdhPJz3TMfvDNc/+2vTV9A1Azx/jcNxCOlw6/bRJUbxsUJL4QAemNm5iEjoYIOdSzDXcXZ+oEb+ig==
X-Received: by 2002:a5d:598a:0:b0:1f1:fa29:1ba6 with SMTP id
n10-20020a5d598a000000b001f1fa291ba6mr3043800wri.90.1646670131096;
Mon, 07 Mar 2022 08:22:11 -0800 (PST)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Content-Language: en-US-large
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
 by: Robin Becker - Mon, 7 Mar 2022 16:22 UTC

I use cibuildwheel to build extensions with a github action. For the macos 11.0 arm64 build I get a strange message from
the load command. So I am looking for assistance to try and figure out what is going wrong.

The cibuild action uses the latest pip 21.2.4 and latest setuptools etc.

I use brew to install freetype version 2.11.1.

The compilations look like this
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -g -arch
arm64 -DRENDERPM_FT -DLIBART_COMPILATION -DLIBART_VERSION=2.3.21 -Isrc/rl_addons/renderPM
-Isrc/rl_addons/renderPM/libart_lgpl -Isrc/rl_addons/renderPM/gt1 -I/usr/local/include/freetype2
-I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/rl_addons/renderPM/_renderPM.c -o
build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/_renderPM.o

this is the load command on multiple lines for readability the strange error is

gcc -bundle -undefined dynamic_lookup -g -arch arm64
build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/_renderPM.o
build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/gt1/gt1-dict.o
build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/gt1/gt1-namecontext.o
'''''''other compiled code
build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/libart_lgpl/art_vpath_dash.o
-L/usr/local/lib
-L/usr/lib
-L/Library/Frameworks/Python.framework/Versions/3.9/lib
-lfreetype -o build/lib.macosx-11.0-arm64-3.9/reportlab/graphics/_renderPM.cpython-39-darwin.so

ld: warning: ignoring file /usr/local/lib/libfreetype.dylib, building for macOS-arm64 but attempting to link with file
built for macOS-x86_64

The above message seems bizarre; everything is compiled for arm64, but gcc doesn't want to use an arm64 dylib.

Can macos experts assist?
--
Robin Becker

Re: strange problem building non-pure wheel for apple M1 arm64

<j8pctrF76vuU1@mid.individual.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17436&group=comp.lang.python#17436

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: pkpear...@nowhere.invalid (Peter Pearson)
Newsgroups: comp.lang.python
Subject: Re: strange problem building non-pure wheel for apple M1 arm64
Date: 8 Mar 2022 16:00:59 GMT
Lines: 27
Message-ID: <j8pctrF76vuU1@mid.individual.net>
References: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
<mailman.234.1646670133.2329.python-list@python.org>
X-Trace: individual.net 8DlTIQMuR6fQgG1r1YmSVA8NBr+ENreMNQvKHWUoIUyEn476qZ
Cancel-Lock: sha1:K3MP7hgDqE4z19Qo9vdTUgk37ZM=
User-Agent: slrn/1.0.3 (Linux)
 by: Peter Pearson - Tue, 8 Mar 2022 16:00 UTC

On Mon, 7 Mar 2022 16:22:10 +0000, Robin Becker <robin@reportlab.com> wrote:
[snip]
>
> gcc -bundle -undefined dynamic_lookup -g -arch arm64
[snip]
> -L/usr/local/lib
> -L/usr/lib
> -L/Library/Frameworks/Python.framework/Versions/3.9/lib
> -lfreetype
[snip]
>
> ld: warning: ignoring file /usr/local/lib/libfreetype.dylib, building
> for macOS-arm64 but attempting to link with file
> built for macOS-x86_64
>
> The above message seems bizarre; everything is compiled for arm64, but
> gcc doesn't want to use an arm64 dylib.
>
> Can macos experts assist?

I am not at all expert in MacOS or any of the specifics of this
problem, but I think you want to try to prove that the libfreetype
invoked by "-lfreetype" is built for macOS-arm64 rather than for
macOS-x86-64.

--
To email me, substitute nowhere->runbox, invalid->com.

Re: strange problem building non-pure wheel for apple M1 arm64

<t07v1k$r7f$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17437&group=comp.lang.python#17437

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: aurio...@gmx.de (Christian Gollwitzer)
Newsgroups: comp.lang.python
Subject: Re: strange problem building non-pure wheel for apple M1 arm64
Date: Tue, 8 Mar 2022 17:08:19 +0100
Organization: A noiseless patient Spider
Lines: 42
Message-ID: <t07v1k$r7f$1@dont-email.me>
References: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
<mailman.234.1646670133.2329.python-list@python.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 8 Mar 2022 16:08:20 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="e6027ad9145ab58bf53d5f740543a8c8";
logging-data="27887"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FVS3uTL+8TOqtOfmYqA6AYOWxfZJXIZ8="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:91.0)
Gecko/20100101 Thunderbird/91.6.1
Cancel-Lock: sha1:jC4CFmPZ8xTOA4P7ekyT1KdpUYU=
In-Reply-To: <mailman.234.1646670133.2329.python-list@python.org>
 by: Christian Gollwitzer - Tue, 8 Mar 2022 16:08 UTC

Am 07.03.22 um 17:22 schrieb Robin Becker:
>
> I use brew to install freetype version 2.11.1.

> gcc -bundle -undefined dynamic_lookup -g -arch arm64
>     build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/_renderPM.o
>     build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/gt1/gt1-dict.o
>     build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/gt1/gt1-namecontext.o
>     '''''''other compiled code
>     build/temp.macosx-11.0-arm64-3.9/src/rl_addons/renderPM/libart_lgpl/art_vpath_dash.o
>     -L/usr/local/lib
>     -L/usr/lib
>     -L/Library/Frameworks/Python.framework/Versions/3.9/lib
>     -lfreetype -o
> build/lib.macosx-11.0-arm64-3.9/reportlab/graphics/_renderPM.cpython-39-darwin.so
>
>
> ld: warning: ignoring file /usr/local/lib/libfreetype.dylib, building
> for macOS-arm64 but attempting to link with file built for macOS-x86_64
>
> The above message seems bizarre; everything is compiled for arm64, but
> gcc doesn't want to use an arm64 dylib.

I would interpret this as: the host is runnig in intel, by doing the
"brew install" it installs the intel version of freetype into
/usr/local/lib/ ; then you cross-compile the python extension for ARM,
but -lfreetype picks up the host version.

On macOS it is not mandatory that all symbols in a .dylib are resolved.
I would guess that the resulting file will not work on M1 macs. YOu can
check by

otool -L /path/toyour.dylib

which libraries are referenced. If you use freetype functions in your C
code and do not see it referenced, then the lib will not work.

Maybe you can install an ARM-version of freetype, or compile it from
source during your build process?

Christian

Re: strange problem building non-pure wheel for apple M1 arm64

<mailman.246.1646762139.2329.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17438&group=comp.lang.python#17438

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: rob...@reportlab.com (Robin Becker)
Newsgroups: comp.lang.python
Subject: Re: strange problem building non-pure wheel for apple M1 arm64
Date: Tue, 8 Mar 2022 17:55:31 +0000
Lines: 9
Message-ID: <mailman.246.1646762139.2329.python-list@python.org>
References: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
<mailman.234.1646670133.2329.python-list@python.org>
<t07v1k$r7f$1@dont-email.me>
<ea5bfebf-01e4-3b0f-9682-2066145a3f18@everest.reportlab.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de 5qx8/0dZ74O/ccvidyT8Qwj28c/6XUqQhAnRgxIKZuLQ==
Return-Path: <robin@reportlab.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=reportlab-com.20210112.gappssmtp.com
header.i=@reportlab-com.20210112.gappssmtp.com
header.b=lkK0Ap5L; dkim-adsp=none (unprotected policy);
dkim-atps=neutral
X-Spam-Status: OK 0.007
X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:problem': 0.03;
'intel': 0.09; 'schrieb': 0.09; 'becker': 0.16; 'gollwitzer':
0.16; 'received:192.168.0.16': 0.16; 'received:209.85.221.49':
0.16; 'received:mail-wr1-f49.google.com': 0.16; 'robin': 0.16;
'wrote:': 0.16; 'to:addr:python-list': 0.20; 'version': 0.23;
'install': 0.23; 'header:User-Agent:1': 0.30; 'modify': 0.31;
'christian': 0.32; 'split': 0.32; 'subject:for': 0.33;
'received:192.168.0': 0.33; 'header:In-Reply-To:1': 0.34;
'received:google.com': 0.34; 'received:209.85': 0.37;
'received:192.168': 0.37; 'received:209': 0.39; 'use': 0.39;
'skip:h 10': 0.61; 'skip:/ 10': 0.69
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=reportlab-com.20210112.gappssmtp.com; s=20210112;
h=message-id:date:mime-version:user-agent:subject:content-language:to
:references:from:in-reply-to:content-transfer-encoding;
bh=0803u0UXPpWzPuvnSI6t2CY/mTN37NQtgm/M8ZLvaZI=;
b=lkK0Ap5LJ2jofVbFdD+6JW8LAC+V2sIfm9HDR6aqGfcsMXzWo37ruivJ0ommVTHNRp
ZvbS8pgI0qEV4Z31C+eP1/TjgIHiXD+5DmLFNCMnJLE65Az1ItM/LaMk5yoM52OOUzzb
PzyWX36DyIPf7jUuyol3vZ1F5QVcBLbRO0bBkMpxJxcZhW3m2/RXZphX98toP0W8cqS4
a8L7I3HE3iz82b2oyPMA4zScHEFmVYsjMb5wg89gqh5n+GZQpNpeLPfi1y9iFl6j1/T3
EjfigtoVn8f2/1IGpYtAfTLs/dE1+K8O3T1eDeXCOOqfVsjhhQ4iVVfXPb8xOEcQ6nsc
SiZg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:message-id:date:mime-version:user-agent:subject
:content-language:to:references:from:in-reply-to
:content-transfer-encoding;
bh=0803u0UXPpWzPuvnSI6t2CY/mTN37NQtgm/M8ZLvaZI=;
b=FwG9/DwlEsAt1RIyVv40qvhf08CWVkyrK33517/iiUufBpUS2ZNJcpf1/LzJ5ONshb
vT2tq37MA4Y1dtcXw/IjQVG1nrhbVvFbSo721xgSoQQKPb08pb/L/TY30G0R+/QvnAtd
SsypqPTCzgF/Ba/j8g1NPuoA+xsC9Ekp6wPbw4QWhKILu56YizlqZI4YBDgsHV5vCxuc
GqjVedHRVXciEcONPvwVckZTXvRp3shkiY4+LhTzLMx3tm7topP9M7V8tQzlt4fUk9Sk
GW2oO3+MSZPeFey0gDoeWdmdTFeOU+9rq3h+pms8KH2ZW3hU+9Yv+PG1nqIyh67SAUpL
t3Vw==
X-Gm-Message-State: AOAM533OwsP3KCSnA03OnGZLbBUevQz/UmwXYFDTFBw6vOfPLm1lG61r
J8L9RULqvwT8QM13qoB7Y/QAanf9j1ustSV3
X-Google-Smtp-Source: ABdhPJzoJYmmTLPjusOPuP+E/uYdScQgyngcI6W9zHkaYoVtvg6h0kpnq/LGsbbdSo3pzb4BuFdhXg==
X-Received: by 2002:a5d:6488:0:b0:1ea:7bfa:41e1 with SMTP id
o8-20020a5d6488000000b001ea7bfa41e1mr13193303wri.563.1646762132251;
Tue, 08 Mar 2022 09:55:32 -0800 (PST)
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101
Thunderbird/91.6.1
Content-Language: en-US-large
In-Reply-To: <t07v1k$r7f$1@dont-email.me>
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <ea5bfebf-01e4-3b0f-9682-2066145a3f18@everest.reportlab.co.uk>
X-Mailman-Original-References: <589e22ac-28cb-b9f3-8be9-fb4988228929@everest.reportlab.co.uk>
<mailman.234.1646670133.2329.python-list@python.org>
<t07v1k$r7f$1@dont-email.me>
 by: Robin Becker - Tue, 8 Mar 2022 17:55 UTC

On 08/03/2022 16:08, Christian Gollwitzer wrote:
> Am 07.03.22 um 17:22 schrieb Robin Becker:
>>
>> I use brew to install freetype version 2.11.1.
I find via google that homebrew/apple have split the installation of intel and arm64 into /usr/local and /opt/homebrew
so I must modify the include_dirs & library_dirs in setup.py
--
Robin Becker

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor