Sujet : Re: Python recompile
De : tr.17687 (at) *nospam* z991.linuxsc.com (Tim Rentsch)
Groupes : comp.lang.cDate : 04. Mar 2025, 02:59:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <86jz95v9md.fsf@linuxsc.com>
References : 1 2 3 4
User-Agent : Gnus/5.11 (Gnus v5.11) Emacs/22.4 (gnu/linux)
antispam@fricas.org (Waldek Hebisch) writes:
In comp.lang.c James Kuyper <jameskuyper@alumni.caltech.edu> wrote:
>
On 3/2/25 12:54, Waldek Hebisch wrote:
>
In comp.lang.c The Doctor <doctor@doctor.nl2k.ab.ca> 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
>
>
This is real world question and as such is considered off-topic in
comp.lang.c. However, you could try '-no-pie' to the compiler.
>
Real world questions about the C programming language are
entirely on-topic here. Note, however, that many questions
posted here are not about C itself, but about the quirks of
particular implementations of C. You can get better answers to
such questions by asking in forums specific to the relevant
implementation, and helpful people will remind your of that.
It's a misunderstanding of those redirections to conclude that
c.l.c is not for real world questions.
>
However Python is NOT an implementation of C, not even by the loosest
reasonable interpretation, so why should it be discussed here?.
>
The question is about C implementation. Namely, the bible for
this group, that is C standard requires C implementation to
produce executables.
Actually it doesn't. The C standard does require implementations
to gather translator output into a program image that has the
information needed to execute the program in its execution
environment, but the standard doesn't say what that program image
is. In fact the C standard says specifically that the mechanism
by which C programs are invoked for use by a data-processing
system is outside the scope of what the standard specifies.
There is no reason the execution environment couldn't be some
sort of interpreted environment, and no reason the invocation
mechanism couldn't be some sort of interpreter acting on the
program image.