Deutsch   English   Français   Italiano  
<vq644c$1o5s3$3@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Lawrence D'Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.c
Subject: Re: Python recompile
Date: Tue, 4 Mar 2025 05:46:52 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <vq644c$1o5s3$3@dont-email.me>
References: <vq1qas$j22$1@gallifrey.nk.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 04 Mar 2025 06:46:52 +0100 (CET)
Injection-Info: dont-email.me; posting-host="83dcacc84fb0cb4992fb8d775ffb25d6";
	logging-data="1841027"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19+INuinFrvtxdzq2FoJpFj"
User-Agent: Pan/0.162 (Pokrosvk)
Cancel-Lock: sha1:HUM9W8yi72cDFcAMvUVkF2eNTWk=
Bytes: 1729

On Sun, 2 Mar 2025 14:35:08 -0000 (UTC), The Doctor wrote:

> How do I compensate for
> 
> ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; recompile with -fPIC
>>>> defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
>>>> referenced by thread_pthread.h:138 (Python/thread_pthread.h:138)
>>>>               thread.o:(PyThread_init_thread) in archive /usr/local/lib/libpython3.13.a

[etc]

So, at a wild guess, it looks like the symbol “_PyRuntime” is defined
in one module (pylifecycle.o) which is compiled non-PIC, and is being
referenced in another module (thread.o) which was compiled as PIC. Or
maybe it’s the other way round.

How you managed to end up with inconsistent flags for different parts
of your build, I don’t know. But that’s what needs to be fixed.