[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-04-11 Thread Eli Schwartz


Eli Schwartz  added the comment:

Hmm, I've seen this accomplished elsewhere using m4_pattern_forbid, which would 
make autoreconf fail with the following message:

```
configure.ac:17: error: possibly undefined macro: AX_C_FLOAT_WORDS_BIGENDIAN
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure.ac:5586: error: possibly undefined macro: AX_CHECK_OPENSSL
autoreconf: error: /usr/bin/autoconf failed with exit status: 1
```

Example patch attached.

--
nosy: +eschwartz
Added file: 
https://bugs.python.org/file49954/0001-configure-use-m4-forbidden-patterns-to-ensure-autore.patch

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:

Thanks for the bug report! I ran into the issue a couple of weeks ago on one 
machine that had autoconf but not the archive package installed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.8, Python 3.9

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset e516290976626cf8535b88a14b1b34e37f88a78a by Christian Heimes in 
branch '3.8':
[3.8] bpo-43617: Check autoconf-archive package in configure.ac (GH-25016) 
(GH-25035)
https://github.com/python/cpython/commit/e516290976626cf8535b88a14b1b34e37f88a78a


--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 064bc07f241dceec2fc577cbf5c31fa6d63fe320 by Christian Heimes in 
branch '3.9':
[3.9] bpo-43617: Check autoconf-archive package in configure.ac (GH-25016) 
(GH-25034)
https://github.com/python/cpython/commit/064bc07f241dceec2fc577cbf5c31fa6d63fe320


--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +23783
pull_request: https://github.com/python/cpython/pull/25035

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +23782
pull_request: https://github.com/python/cpython/pull/25034

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-27 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 5d6e8c1c1a5f667cdce99cb3c563ac922198678d by Christian Heimes in 
branch 'master':
bpo-43617: Check autoconf-archive package in configure.ac (GH-25016)
https://github.com/python/cpython/commit/5d6e8c1c1a5f667cdce99cb3c563ac922198678d


--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma


Cong Ma  added the comment:

> The extra macros are provided by optional packages. On Fedora and 
> Debian/Ubuntu the package is called autoconf-archive.

Thank you very much. This (and the patch) is clearing things up for me a lot. 
At first I thought I was supposed to copy the m4 files over from the autoconf 
archive into the m4 directory under the repo.

--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +23771
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/25016

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Christian Heimes


Christian Heimes  added the comment:

The extra macros are provided by optional packages. On Fedora and Debian/Ubuntu 
the package is called autoconf-archive.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread STINNER Victor


STINNER Victor  added the comment:

Ah, maybe the configure.ac comment should be updated to suggest running 
"autoconf" instead ;-)

--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma


Cong Ma  added the comment:

>From the configure.ac file:

> dnl ***
> dnl * Please run autoreconf to test your changes! *
> dnl ***

I take it to mean "if configure.ac is changed, run autoreconf first", and 
that's what I did. Could you let me know what is the intended way to modify 
configure.ac and have it take effect?

--

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread STINNER Victor


STINNER Victor  added the comment:

> If ``autoreconf`` is run, ...

I never used autoreconf. If you don't run it, ./configure works fine.

I only use "autoconf" and "autoheader".

$ ./configure --enable-optimizations --enable-shared
(...)
$ grep semantic Makefile
CONFIGURE_CFLAGS_NODIST= -fno-semantic-interposition -std=c99 -Wextra 
-Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-function-declaration -fvisibility=hidden
CONFIGURE_LDFLAGS_NODIST= -fno-semantic-interposition

--
nosy: +vstinner

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma


Change by Cong Ma :


--
type:  -> compile error

___
Python tracker 

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



[issue43617] Missing definition in configure.ac causing autoreconf to create damaged configure script

2021-03-24 Thread Cong Ma


New submission from Cong Ma :

The problem
---

In the repository, the definition for ``AX_CHECK_COMPILE_FLAG`` in Python's 
``configure.ac`` file is missing. If ``autoreconf`` is run, an invalid 
``configure`` script is generated. The following is the behaviour of running 
``autoreconf`` followed by ``configure``:

```
# In cpython repository top-level directory
$ autoreconf
$ mkdir build
$ cd build
$ ../configure  # <- using newly generated configure script
[... omitted ...]
checking for --enable-optimizations... no
../configure: line 6498: syntax error near unexpected token 
`-fno-semantic-interposition,'
../configure: line 6498: `  
AX_CHECK_COMPILE_FLAG(-fno-semantic-interposition,'
```


The solution


It appears a file was missing in the m4/ directory. The file matches this one 
from the Autoconf Archive:

https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html

Simply adding the correct m4 file to m4/ should make ``autoreconf`` work.

--
components: Build
messages: 389463
nosy: congma
priority: normal
severity: normal
status: open
title: Missing definition in configure.ac causing autoreconf to create damaged 
configure script

___
Python tracker 

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