ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] I: autoconf 2.71 and --runstatedir
@ 2023-07-25 15:46 Gleb Fotengauer-Malinovskiy
  2023-07-25 17:10 ` Anton Farygin
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Gleb Fotengauer-Malinovskiy @ 2023-07-25 15:46 UTC (permalink / raw)
  To: ALT Linux Team development discussions

[-- Attachment #1: Type: text/plain, Size: 13192 bytes --]

Hi,

В воскресенье в Сизиф отправился долгожданный autoconf 2.71, заодно эта
версия сразу была сделана основной.

https://lists.gnu.org/archive/html/autoconf/2020-12/msg00002.html
https://lists.gnu.org/archive/html/autoconf/2021-01/msg00126.html

На всякий случай, напоминаю, как работает макрос %set_autoconf_version.
Он сразу и добавляет пакет указанной версии в сборочные зависимости и
экспортирует во всех скриптах переменную AUTOCONF_VERSION.  Т.е. если
приходится использовать в пакете autoconf_2.60, нужно просто добавить
строку:
%set_autoconf_version 2.60

После этого обновления некоторые пакеты начинают использовать умолчальное
значение runstatedir ('${localstatedir}/run'), которое не подходит для
дистрибутива, так что rpm-build 4.0.4.190-alt1 [1] пытается проверить,
поддерживает ли configure-скрипт опцию --runstatedir и передаёт её только
в случае, если находит подстроку 'runstatedir=DIR' в configure-скрипте.
Такое решение позволяет не сломать по моим оценкам 874 пакета (для
справки, такая попытка была пару лет назад [2]), в которых
configure-скрипты не поддерживают эту опцию (или потому что не используют
autoconf или, реже, не запускают autoreconf при сборке), при сборке таких
пакетов rpm-build теперь выводит сообщение вида:

rpm-build: warning: %{_configure_script} script does not support --runstatedir

Также реализован выключатель
%undefine _configure_use_runstatedir
Я надеюсь, что он не пригодится, но он может быть нужен только если при
сборке пакета автоматика определяет, что --runstatedir поддерживается, но
эта опция передаётся также другим configure-скриптам, используемым при
сборке, которые в свою очередь --runstatedir не поддерживают.  В этой
ситуации лучше сделать autoreconf для таких configure-скриптов, а
выключатель нужен только если это совсем не помогает.

Пакеты, которые сломались:

courier-authlib	lakostis @everybody
hercules	nbr @everybody
libdb5.3	rider @everybody
libdb6.1	rider @everybody
libmp3splt	@nobody
libredland	lav zerg @qa
moc	lakostis
otf2	rider @everybody
pacemaker	cas @everybody
pinball	viy @everybody
proftpd	ender @qa @everybody
scalasca	rider @everybody
scim	oddity @qa
scim-anthy	oddity @everybody
scim-m17n	viy @everybody
scorep	rider @everybody
sdcc	sbolshakov @everybody
squid	shaba @everybody
suite3270	nbr @everybody
synfigstudio	cas @everybody
telepathy-gabble	aris
unixODBC	@nobody
	configure: error: unrecognized option: `--runstatedir=/var/run'
	Try `./configure --help' for more information
	configure: error: ./configure failed for libltdl

	Это побочный эффект от передачи --runstatedir через один
	configure-скрипт в другой configure-скрипт (см. выше про это).
	Везде должно помочь %autoreconf, а в большинстве этих пакетов
	просто %autoreconf libltdl.


aMule	oddity @everybody
avr-binutils	week viy
avr-gcc	week viy
gcc10	glebfm ldv
gcc11	glebfm ldv
gcc12	glebfm ldv
	configure.ac:35: error: autoconf 2.71 is known to not work with aMule. Please use
	2.69 instead.

	У этих пакетов апстрим по той или иной причине считает, что нужно
	использовать конкретную версию autoconf.


apcupsd	asy
libSDL_pango	@nobody
libmcrypt	lav @qa @everybody
libsrtp	@nobody
libsrtp2	sbolshakov @everybody
	configure: error: cannot find required auxiliary files: compile missing
	configure: error: cannot find required auxiliary files: install-sh config.guess config.sub

	autoreconf will issue an error if any auxiliary scripts are needed
	but cannot be found.


printer-driver-magicolor2430dl	mcpain @everybody
printer-driver-magicolor2530dl	mcpain @everybody
printer-driver-magicolor5430dl	mcpain @everybody
printer-driver-magicolor5440dl	mcpain @everybody
	configure: error: cannot find required auxiliary files: config.guess config.sub

	Эти пакеты относятся к предыдущей категории, но у них в spec-е нет
	autoreconf, но autoconf запускается сборочными скриптами самого
	проекта.  Стоит просто добавить %autoreconf.


conserver	rider @everybody
python3	grenka imz vitty george glebfm darktemplar
zsh	george arseny @qa
	autoreconf-default: Leaving directory '.'
	+ ln -s package/config.sub
	ln: failed to create symbolic link './config.sub': File exists

	Эти пакеты просто не ожидали, что autoconf установит config.sub и/или
	config.guess.


asterisk	sbolshakov @everybody
yasm	sbolshakov @everybody
	configure: error: *** ANSI C header files not found.
	configure: error: Standard (ANSI/ISO C89) header files are required.

	*** AC_HEADER_STDC and AC_HEADER_TIME are now stubs.
	
	  They still define the C preprocessor macros STDC_HEADERS and
	  TIME_WITH_SYS_TIME, respectively, but they no longer check for the
	  ancient, non-ISO-C90 compliant systems where formerly those macros
	  would not be defined.  Autoupdate will remove them.
	
	  These macros were already labeled obsolete in the manual.
	
	Макрос AC_HEADER_STDC больше не определяет переменную
	ac_cv_header_stdc.


imagescan	cas @everybody
openmpi	bircoph dans @everybody
	checking for LIBMAGICK_PP... yes
	./configure: line 25179: syntax error near unexpected token `newline'
	./configure: line 25179: `    '''
	
	checking if --with-cuda is set... not set (--with-cuda=)
	./configure: line 11024: syntax error near unexpected token `)'
	./configure: line 11024: `    )'
	
	AS_IF перестал терпеть отсутствие квадратных скобок.

	configure.ac
	@@ -354,3 +354,3 @@
	 AS_IF([test xno != "x$with_magick_pp"],
	-   AS_CASE("x$with_magick_pp",
	+   [AS_CASE("x$with_magick_pp",
	      [xGraphicsMagick],
	@@ -375,3 +375,3 @@
	       AC_MSG_ERROR([unknown value: --with-magick-pp=$with_magick_pp])
	-     ]))
	+     ])])
	 AM_CONDITIONAL([have_libmagick_pp], [test x != "x$LIBMAGICK_PP_LIBS"])
	@@ -379,3 +379,3 @@
	 AS_IF([test xno != "x$with_magick"],
	-   AS_CASE("x$with_magick",
	+   [AS_CASE("x$with_magick",
	      [xGraphicsMagick],
	@@ -410,3 +410,3 @@
	       AC_MSG_ERROR([unknown value: --with-magick=$with_magick])
	-     ]))
	+     ])])
	 AC_DEFINE_UNQUOTED([MAGICK_CONVERT], ["$MAGICK_CONVERT"])

	config/opal_check_cuda.m4
	 AS_IF([test "$opal_check_cuda_happy"="yes"],
	-    AC_CHECK_DECL([CU_POINTER_ATTRIBUTE_SYNC_MEMOPS], [CUDA_SYNC_MEMOPS=1], [CUDA_SYNC_MEMOPS=0],
	-        [#include <$opal_cuda_incdir/cuda.h>]),
	+    [AC_CHECK_DECL([CU_POINTER_ATTRIBUTE_SYNC_MEMOPS], [CUDA_SYNC_MEMOPS=1], [CUDA_SYNC_MEMOPS=0],
	+        [#include <$opal_cuda_incdir/cuda.h>])],
	     [])


apr1	arbars @everybody
	checking whether int64_t and long long use fmt %lld... no
	configure: error: could not determine the string function for int64_t

	https://github.com/apache/apr/commit/0a763c5e500f4304b7c534fae0fad430d64982e8


cube	rider @everybody
	autoreconf-default: running: /usr/bin/autoconf-2.71 --force
	configure:19220: error: possibly undefined macro: _AC_C_STD_TRY
	If this token and others are legitimate, please use m4_pattern_allow.
	See the Autoconf documentation.
	autoreconf-default: error: /usr/bin/autoconf-2.71 failed with exit status: 1

	Макрос _AC_C_STD_TRY больше не реализован в autoconf.


freeipmi	rider @qa
	autoreconf-default: running: aclocal --force -I config
	configure.ac:18: error: AC_CONFIG_MACRO_DIR can only be used once
	
	*** New macro AC_CONFIG_MACRO_DIRS.
	
	  This macro can be used more than once and accepts a list of
	  directories to search for local M4 macros.  With Automake 1.13 and
	  later, use of this macro eliminates a reason to use ACLOCAL_AMFLAGS
	  in Makefile.am.
	
	  The older AC_CONFIG_MACRO_DIR, which could only be used once, is
	  still supported but considered deprecated.


libudev0	shaba @everybody
	+ make -j16
	make: *** No rule to make target '/linux-default/include/linux/input-event-codes.h',
	needed by 'src/extras/keymap/keys.txt'.  Stop.
	make: *** Waiting for unfinished jobs....

	Перестала работать вот такая конструкция
	AC_SUBST([INCLUDE_PREFIX], [$(echo '#include <linux/input.h>' | eval $ac_cpp -E - | sed -n '/linux\/input.h/ {s:.*"\(.*\)/linux/input.h".*:\1:; p; q}')])
	потому что в configure.ac не используется AC_PROG_CPP и переменная
	ac_cpp оказывается пустой.


ltrace	grenka @everybody
	autoreconf-default: configure.ac: creating directory config/autoconf
	autoreconf-default: error: cannot create config/autoconf: No such file or directory

	autoconf перестал создавать промежуточный каталог в этом месте.


miredo	naf @qa
	checking for tdestroy... no
	configure: error: Required tdestroy() or Judy dynamic arrays.

	Это бага на стороне autoconf [3], я собираюсь сделать backport и
	собрать autoconf 2.71-alt2.


quvi	viy aris @gnome
	checking whether the C compiler works... no
	configure: error: in `/usr/src/RPM/BUILD/quvi-0.9.5':
	configure: error: C compiler cannot create executables
	See `config.log' for more details
	
	https://salsa.debian.org/debian/quvi/-/blob/master/debian/patches/0001-Fix-FTBFS-with-autoconf-2.70.patch


rofi	akv @everybody
	autoreconf-default: running: aclocal --force -I subprojects/libnkutils -I
	subprojects/libgwater ${ACLOCAL_FLAGS}
	configure.ac:10: error: AC_PROG_LEX: unrecognized argument: flex
	./lib/autoconf/programs.m4:716: _AC_PROG_LEX is expanded from...
	--
	configure.ac:10: the top level
	autom4te-2.71: error: /usr/bin/m4 failed with exit status: 1
	aclocal-default: error: /usr/bin/autom4te-2.71 failed with exit status: 1
	autoreconf-default: error: aclocal failed with exit status: 1

	У макроса AC_PROG_LEX раньше не было никаких аргументов и аргументы
	передаваемые по ошибке просто игнорировались.

	AC_PROG_LEX now takes one argument, which may be either ‘yywrap’ or
	‘noyywrap’.


tcl-httpd	@nobody
	checking whether the C compiler works... no
	configure: error: in `/usr/src/RPM/BUILD/tcl-httpd-3.5.1':
	configure: error: C compiler cannot create executables
	See `config.log' for more details

	В autoconf 2.69 AC_DEFINE_UNQUOTED был реализован как
	cat >>confdefs.h <<_ACEOF
	#define VERSION "${VERSION}"
	_ACEOF
	а в autoconf 2.71 он выглядит так:
	printf "%s\n" "#define VERSION \"${VERSION}\"" >>confdefs.h

	В этом пакете перед AC_DEFINE_UNQUOTED зачем-то стоит eval,
	который со старым autoconf не вредил, а с новым ломает сборку.


torque	viy @everybody
	checking for ar... (cached) ar
	mv: cannot stat 'libtool': No such file or directory
	./configure: line 18734: libtool: No such file or directory
	mv: cannot stat 'libtool.old': No such file or directory
	checking whether ln -s works... yes
	--
	checking if largefile compiles (looking at you, OSX)... checking for pthread_create in
	-lpthread... no
	configure: error: TORQUE needs pthreads in order to build
	error: Bad exit status from /usr/src/tmp/rpm-tmp.62250 (%build)	

	autoconf перестал угадывать, что этот проект на C++, должно быть
	достаточно просто добавить AC_LANG([C++]).


[1] https://git.altlinux.org/gears/r/rpm-build.git?p=rpm-build.git;a=commitdiff;h=e96f79a7d031ed82024500fd229369456aed0f5a
[2] https://lore.altlinux.org/devel/20210825082756.GA16086@altlinux.org/T/#u
[3] https://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=8b5e2016c7ed2d67f31b03a3d2e361858ff5299b
-- 
glebfm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-29  9:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-25 15:46 [devel] I: autoconf 2.71 and --runstatedir Gleb Fotengauer-Malinovskiy
2023-07-25 17:10 ` Anton Farygin
2023-07-26 11:09 ` Dmitry V. Levin
2023-07-29  9:32 ` Gleb Fotengauer-Malinovskiy

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git