BUG #18841: pgflex fails during build when Flex uses dynamic m4
От | PG Bug reporting form |
---|---|
Тема | BUG #18841: pgflex fails during build when Flex uses dynamic m4 |
Дата | |
Msg-id | 18841-19af9c81fe3ae298@postgresql.org обсуждение исходный текст |
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18841 Logged by: Laurence Tews Email address: laurence.tews@gmail.com PostgreSQL version: 17.4 Operating system: Ubuntu x86_64 Description: When building PostgreSQL from source, using a flex binary that is built with ./configure m4=m4 (a common configuration for hermetic build systems, or where remote execution is used e.g. bazel) pgflex fails due to being unable to locate an m4 executable. FAILED: src/fe_utils/psqlscan.c /usr/bin/python3 ../src/tools/pgflex --builddir . --srcdir .. --privatedir src/fe_utils/psqlscan.c.p --flex /home/user/build_home/bin/flex --perl /usr/bin/perl -i ../src/fe_utils/psqlscan.l -o src/fe_utils/psqlscan.c --no-backup --fix-warnings -- -Cfe -p -p flex: fatal internal error, exec of m4 failed This appears to be due to the fact when m4=m4 is provided, flex uses the PATH env to locate an m4 executable. Within src/tools/pgflex, the env is replaced in the subprocess call, so any existing PATH env is not passed to the subprocess. One possible fix is to create a copy of the existing env, append FLEX_TMP_DIR, and pass the whole environment to the flex subprocess.
В списке pgsql-bugs по дате отправления: