Re: Python recompile

2025-03-02 Thread Lew Pitcher via Python-list


First off, this isn't really on-topic for comp.lang.c, as it is a question 
regarding a linker, interacting
with the results of various options given to a specific compiler.

However...

On Sun, 02 Mar 2025 14:35:08 +, The Doctor wrote:

> How do I compensate for
> 
> ld: error: relocation R_X86_64_32 cannot be used against symbol '_PyRuntime'; 
> recompile with -fPIC

The error message tells you exactly how to fix the problem: recompile the 
module using the
  -fPIC
option to the compiler. -fPIC tells your compiler to generate a specific type 
of position-independant
code, which your linker (apparently) requires for a specific type of relocation.


[snip]

HTH
-- 
Lew Pitcher
"In Skills We Trust"
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Book recommendation? For getting up to date (Posting On Python-List Prohibited)

2025-03-02 Thread Salvador Mirzo via Python-list
rbowman  writes:

> On Thu, 20 Feb 2025 21:51:51 - (UTC), Lawrence D'Oliveiro wrote:
>
>> On Thu, 20 Feb 2025 10:05:32 -0300, Salvador Mirzo wrote:
>> 
>>> It's much more pleasurable (to me) to read books off-screen.
>> 
>> You can’t do searches, though.
>
> For non-fiction a decent index does wonders. A good layout and talble of 
> contents also helps. Decorators? Chapter 14, page 254, all you ever wanted 
> to know about them. 

Well said.  But I still like the full-text search because very often I
want to cite a book and I remember the wording more or less, so I'm
looking for that exact point, which is easiest found by a full-text
search.  It's bloody useful to have an ebook form of the book.  It's
just not pleasant to read it.  I like to sort of lay back to read a book
and I can't quite do that on a desk.  I don't use computers off of
desks.  I don't care for phones or tablets.  Phones have a too small
screen and tablets are too big, too warm, don't bend like paper and are
just plain annoying, too. :) Paper is so much more concrete than a
screen.  No need to recharge them and so on.  Omg, I didn't know there
were so many reasons...  Funny is that the only real reason I really
have for no reading on-screen is that I just don't want to.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Book recommendation? For getting up to date (Posting On Python-List Prohibited)

2025-03-02 Thread Salvador Mirzo via Python-list
Lawrence D'Oliveiro  writes:

> On Thu, 20 Feb 2025 10:05:32 -0300, Salvador Mirzo wrote:
>
>> It's much more pleasurable (to me) to read books off-screen.
>
> You can’t do searches, though.

That's quite right, which is why I also love to have an ebook form of
them.
-- 
https://mail.python.org/mailman/listinfo/python-list


Python recompile

2025-03-02 Thread The Doctor via Python-list
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

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:140 (Python/thread_pthread.h:140)
>>>   thread.o:(PyThread_init_thread) in archive 
>>> /usr/local/lib/libpython3.13.a

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

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:(do_start_joinable_thread) in archive 
>>> /usr/local/lib/libpython3.13.a

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:140 (Python/thread_pthread.h:140)
>>>   thread.o:(do_start_joinable_thread) in archive 
>>> /usr/local/lib/libpython3.13.a

ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; 
recompile with -fPIC
>>> defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
>>> referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
>>>   thread.o:(do_start_joinable_thread) in archive 
>>> /usr/local/lib/libpython3.13.a

ld: error: relocation R_X86_64_32 cannot be used against local symbol; 
recompile with -fPIC
>>> defined in /usr/local/lib/libpython3.13.a(thread.o)
>>> referenced by thread_pthread.h:290 (Python/thread_pthread.h:290)
>>>   thread.o:(do_start_joinable_thread) in archive 
>>> /usr/local/lib/libpython3.13.a

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_get_thread_ident_ex) in archive 
>>> /usr/local/lib/libpython3.13.a

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:140 (Python/thread_pthread.h:140)
>>>   thread.o:(PyThread_get_thread_ident_ex) in archive 
>>> /usr/local/lib/libpython3.13.a

ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; 
recompile with -fPIC
>>> defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
>>> referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
>>>   thread.o:(PyThread_get_thread_ident_ex) in archive 
>>> /usr/local/lib/libpython3.13.a

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_get_thread_ident) in archive 
>>> /usr/local/lib/libpython3.13.a

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:140 (Python/thread_pthread.h:140)
>>>   thread.o:(PyThread_get_thread_ident) in archive 
>>> /usr/local/lib/libpython3.13.a

ld: error: relocation R_X86_64_32S cannot be used against symbol '_PyRuntime'; 
recompile with -fPIC
>>> defined in /usr/local/lib/libpython3.13.a(pylifecycle.o)
>>> referenced by thread_pthread.h:141 (Python/thread_pthread.h:141)
>>>   thread.o:(PyThread_get_thread_ident) in archive 
>>> /usr/local/lib/libpython3.13.a

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_get_thread_native_id) in archive 
>>> /usr/local/lib/libpython3.13.a

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:140 (Python/thread_pthread.h:140)
>>>   thread.o:(PyThread_get_thread_native_id) in archive 
>>> /usr/local/lib/libpyt

Re: Python recompile

2025-03-02 Thread Left Right via Python-list
I think Python compiles with fPIC by default. Something else had
happened to the OPs checkout that caused these errors. OP needs to
better describe what they were doing to properly understand the
problem.

On Sun, Mar 2, 2025 at 10:10 PM Lew Pitcher via Python-list
 wrote:
>
>
> First off, this isn't really on-topic for comp.lang.c, as it is a question 
> regarding a linker, interacting
> with the results of various options given to a specific compiler.
>
> However...
>
> On Sun, 02 Mar 2025 14:35:08 +, The Doctor wrote:
>
> > How do I compensate for
> >
> > ld: error: relocation R_X86_64_32 cannot be used against symbol 
> > '_PyRuntime'; recompile with -fPIC
>
> The error message tells you exactly how to fix the problem: recompile the 
> module using the
>   -fPIC
> option to the compiler. -fPIC tells your compiler to generate a specific type 
> of position-independant
> code, which your linker (apparently) requires for a specific type of 
> relocation.
>
>
> [snip]
>
> HTH
> --
> Lew Pitcher
> "In Skills We Trust"
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list