[issue45314] Using target python while cross-building

2021-09-28 Thread Frans


New submission from Frans :

While trying to cross-compile Python-3.9.7, I came across the next error report:

i586-cross-linux-gcc -Xlinker -export-dynamic -o python Programs/python.o 
-L. -lpython3.9 -lcrypt -ldl  -lpthread -lm   -lm  
_PYTHON_PROJECT_BASE=/mnt/lfs/sources-base/Python-3.9.7 
_PYTHON_HOST_PLATFORM=linux-i586 PYTHONPATH=./Lib 
_PYTHON_SYSCONFIGDATA_NAME=_sys
configdata__linux_i386-linux-gnu python -S -m sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
   echo "generate-posix-vars failed" ; \
   rm -f ./pybuilddir.txt ; \
   exit 1 ; \
fi
/bin/sh: line 1: python: command not found
generate-posix-vars failed
make: *** [Makefile:619: pybuilddir.txt] Error 1
---
Strange, because Python configure/Makefile known that we are cross-compiling, 
but still try to execute a program with the target architecture, which is not 
the same as the architecture of the build machine. Of course it fails.

--
components: Cross-Build
messages: 402799
nosy: Alex.Willmer, fransdb
priority: normal
severity: normal
status: open
title: Using target python while cross-building
versions: Python 3.9

___
Python tracker 
<https://bugs.python.org/issue45314>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45314] Using target python while cross-building

2021-09-29 Thread Frans


Frans  added the comment:

Update:

I came to realize that the command 'python' is without './', so it will search 
using PATH for python. Which - on my system Opensuse TW - does not exist, since 
there we have 'python3'. So, I made a softlink python->python3. 

Alas, I noticed that when I made the softlink python to python3 before starting 
configure, configure stops and complains that python3.9 is not found. Sure, TW 
has python3.8. But why check for previous/current versions, when making a new 
python binary?

Ok, made the link after configure was done, which ended in:
--
i586-cross-linux-gcc -Xlinker -export-dynamic -o python Programs/python.o 
-L. -lpython3.9 -lcrypt -ldl  -lpthread -lm   -lm 
_PYTHON_PROJECT_BASE=/mnt/lfs/sources-base/Python-3.9.7 
_PYTHON_HOST_PLATFORM=linux-i586 PYTHONPATH=./Lib 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__linux_i386-linux-gnu python -S -m 
sysconfig --generate-posix-vars ;\
if test $? -ne 0 ; then \
echo "generate-posix-vars failed" ; \
rm -f ./pybuilddir.txt ; \
exit 1 ; \
fi
Could not import runpy module
Traceback (most recent call last):
  File "/mnt/lfs/sources-base/Python-3.9.7/./Lib/runpy.py", line 14, in 
import importlib.machinery # importlib first so we can test #15386 via -m
  File "/mnt/lfs/sources-base/Python-3.9.7/./Lib/importlib/__init__.py", line 
57, in 
import types
  File "/mnt/lfs/sources-base/Python-3.9.7/./Lib/types.py", line 296, in 

GenericAlias = type(list[int])
TypeError: 'type' object is not subscriptable
generate-posix-vars failed
make: *** [Makefile:619: pybuilddir.txt] Error 1
-

Complete native compile functions as expected.
Maybe the reason that TW is still using 3.8? Shall try that next.

--
type:  -> compile error

___
Python tracker 
<https://bugs.python.org/issue45314>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45314] Using target python while cross-building

2021-09-29 Thread Frans


Frans  added the comment:

Update 2:

Using the python-3.8.12 sourceno problem!
All functions well.

So, 3.9 has some issues i guess ;)

--

___
Python tracker 
<https://bugs.python.org/issue45314>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-07 Thread Frans

Frans  added the comment:

I ran into the same problem with RotatingFileHandler from a
multithreaded daemon under Ubuntu. I Googled around and found the
ConcurrentLogHandler on pypi
(http://pypi.python.org/pypi/ConcurrentLogHandler). It solved the problem.

--
nosy: +Frans

___
Python tracker 
<http://bugs.python.org/issue4749>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue4749] Issue with RotatingFileHandler logging handler on Windows

2009-06-07 Thread Frans

Frans  added the comment:

Hi Vinay,

Thanks for your info. I have just shared my experience. I ran into a problem
(apperently, there is one)  and found a work-around that fits my needs.
If I find the real fix, I will surely follow up on it.

Regards,

Frans

2009/6/7 Vinay Sajip 

>
> Vinay Sajip  added the comment:
>
> ConcurrentLogHandler is for multiple *processes* writing to the same
> file, not multiple threads in a single process. Python logging does not
> support multiple processes writing to the same file because there is no
> portable IPC locking across all platforms supported by Python.
> ConcurrentLogHandler uses portalocker to achieve interprocess
> synchronization, and there is no equivalent mechanism which is part of
> the Python stdlib. AFAIK portalocker works on Windows and Linux - I'm
> not sure about other platforms.
>
> Python logging *does* support multiple threads in a single process
> writing to the same file, which is why I asked Robert if it was
> definitely a single-process environment he was working in.
>
> --
>
> ___
> Python tracker 
> <http://bugs.python.org/issue4749>
> ___
>

--
Added file: http://bugs.python.org/file14219/unnamed

___
Python tracker 
<http://bugs.python.org/issue4749>
___Hi Vinay, Thanks for your info. I have just shared my experience. I ran 
into a problem (apperently, there is one)  and found a work-around that fits 
my needs.If I find the real fix, I will surely follow up on it.
Regards,Frans2009/6/7 Vinay 
Sajip <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>

Vinay Sajip <mailto:vinay_sa...@yahoo.co.uk";>vinay_sa...@yahoo.co.uk> added the 
comment:

ConcurrentLogHandler is for multiple *processes* writing to the same
file, not multiple threads in a single process. Python logging does not
support multiple processes writing to the same file because there is no
portable IPC locking across all platforms supported by Python.
ConcurrentLogHandler uses portalocker to achieve interprocess
synchronization, and there is no equivalent mechanism which is part of
the Python stdlib. AFAIK portalocker works on Windows and Linux - I'm
not sure about other platforms.

Python logging *does* support multiple threads in a single process
writing to the same file, which is why I asked Robert if it was
definitely a single-process environment he was working in.

--

___
Python tracker <mailto:rep...@bugs.python.org";>rep...@bugs.python.org>
<http://bugs.python.org/issue4749"; 
target="_blank">http://bugs.python.org/issue4749>
___

___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com