[issue25946] configure should pick /usr/bin/g++ automatically if present

2021-08-13 Thread Paul Menzel


Paul Menzel  added the comment:

I created https://bugs.python.org/issue44909.

--
nosy: +pmenzel

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



[issue44909] configure should pick /usr/bin/g++ automatically if present

2021-08-13 Thread Paul Menzel


New submission from Paul Menzel :

[copied from closed (out of date) issue https://bugs.python.org/issue25946]

Reproduced with Python 3.9.6.

./configure` both prints `checking for g++... no` and 

WARNING:

  By default, distutils will build C++ extension modules with "g++".
  If this is not intended, then set CXX on the configure command line.

if `/usr/bin/g++` is present and executable which doesn't seem to be 
constructive because it's quite common that one wants to use `/usr/bin/g++` as 
CXX compiler if available. In case incompatibilities exists with other C++ 
compilers there should a check and more detailed error message.

Furthermore the error message doesn't explain if a part of distutils won't be 
build because the message sounds like the C++ extension is built, but does it 
work without a C++ compiler?

Specifying `CXX` environment variable or `--with-cxx-main=/usr/bin/g++` 
`configure` option works fine.

--
components: Build
messages: 399497
nosy: iritkatriel, krichter, pmenzel
priority: normal
severity: normal
status: open
title: configure should pick /usr/bin/g++ automatically if present
versions: Python 3.9

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



[issue40968] urllib is unable to deal with TURN server infront

2020-06-16 Thread Paul Menzel


Paul Menzel  added the comment:

Wow, great job in figuring this out. Passing the context, it works here too.

I just wanted to add, that I looked at this with Wireshark, and to not 
complicate things, first tried plain HTTP.

```
$ curl http://jitsi.molgen.mpg.de

301 Moved Permanently

301 Moved Permanently
nginx/1.14.2


```

With Python, there is also the connection lost error. But Wireshark shows that 
the 301 HTTP packet is send back by the server.

```
$ python3
Python 3.8.3 (default, May 14 2020, 11:03:12) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.request
>>> response = urllib.request.urlopen('http://jitsi.molgen.mpg.de')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 531, in open
response = meth(req, response)
  File "/usr/lib/python3.8/urllib/request.py", line 640, in http_response
response = self.parent.error(
  File "/usr/lib/python3.8/urllib/request.py", line 563, in error
result = self._call_chain(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 755, in http_error_302
return self.parent.open(new, timeout=req.timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
r = h.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse
response.begin()
  File "/usr/lib/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
```

--

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



[issue40968] urllib is unable to deal with TURN server infront

2020-06-13 Thread Paul Menzel

New submission from Paul Menzel :

Having the TURN server Coturn [1] set up in a Jitsi Meet installation, Python’s 
urllib requests fail, while it works with cURL and browsers.

```
$ curl -I https://jitsi.molgen.mpg.de
HTTP/2 200 
server: nginx/1.14.2
date: Sat, 13 Jun 2020 11:09:19 GMT
content-type: text/html
vary: Accept-Encoding
strict-transport-security: max-age=63072000

```

```
>>> import urllib.request
>>> response = urllib.request.urlopen('https://jitsi.molgen.mpg.de')
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 525, in open
response = self._open(req, data)
  File "/usr/lib/python3.8/urllib/request.py", line 542, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
  File "/usr/lib/python3.8/urllib/request.py", line 502, in _call_chain
result = func(*args)
  File "/usr/lib/python3.8/urllib/request.py", line 1393, in https_open
return self.do_open(http.client.HTTPSConnection, req,
  File "/usr/lib/python3.8/urllib/request.py", line 1354, in do_open
r = h.getresponse()
  File "/usr/lib/python3.8/http/client.py", line 1332, in getresponse
response.begin()
  File "/usr/lib/python3.8/http/client.py", line 303, in begin
version, status, reason = self._read_status()
  File "/usr/lib/python3.8/http/client.py", line 272, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
```

[1]: https://github.com/coturn/coturn/

--
components: Library (Lib)
messages: 371450
nosy: pmenzel
priority: normal
severity: normal
status: open
title: urllib is unable to deal with TURN server infront
type: behavior
versions: Python 3.8

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



[issue10013] fix `./libpython2.6.so: undefined re ference to `_PyParser_Grammar´` in parallel builds

2010-10-02 Thread Paul Menzel

New submission from Paul Menzel paulepan...@users.sourceforge.net:

Compiling Python in parallel sometimes fails as reported in [1] and [2].

./libpython2.6.so: undefined reference to `_PyParser_Grammar´

Fedora applies a patch by dmalcolm dmalc...@fedoraproject.org which fixes 
this issue [3].

diff -up Python-2.7/Makefile.pre.in.fix-parallel-make 
Python-2.7/Makefile.pre.in
--- Python-2.7/Makefile.pre.in.fix-parallel-make2010-07-22 
15:01:39.567996932 -0400
+++ Python-2.7/Makefile.pre.in  2010-07-22 15:47:02.437998509 -0400
@@ -207,6 +207,7 @@ SIGNAL_OBJS=@SIGNAL_OBJS@
 
 ##
 # Grammar
+GRAMMAR_STAMP= $(srcdir)/grammar-stamp
 GRAMMAR_H= $(srcdir)/Include/graminit.h
 GRAMMAR_C= $(srcdir)/Python/graminit.c
 GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
@@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get
 Modules/python.o: $(srcdir)/Modules/python.c
$(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c
 
+# GNU make interprets rules with two dependents as two copies of the 
rule.
+# 
+# In a parallel build this can lead to pgen being run twice, once for each 
of
+# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler
+# reads a partially-overwritten copy of one of these files, leading to 
syntax
+# errors (or linker errors if the fragment happens to be syntactically 
valid C)
+#
+# See 
http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html
+# for more information
+#
+# Introduce .grammar-stamp as a contrived single output from PGEN to 
avoid
+# this:
+$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP)
 
-$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT)
-...@$(INSTALL) -d Include
-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+   touch $(GRAMMAR_STAMP)
 
 $(PGEN):   $(PGENOBJS)
$(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)

Could you please apply it. Could this also be applied to 2.6.x?


[1] http://doc.services.openoffice.org/wiki/RedTinderboxStatusInEIS
[2] http://www.openoffice.org/issues/show_bug.cgi?id=114866
[3] 
http://pkgs.fedoraproject.org/gitweb/?p=python.git;a=commit;h=b95f6cc2ca6a009f97436c6aa16cfd70547353d9

--
components: Build
messages: 117865
nosy: PaulePanter
priority: normal
severity: normal
status: open
title: fix `./libpython2.6.so: undefined reference to `_PyParser_Grammar´` in 
parallel builds
type: compile error
versions: Python 2.6

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