pkg・ports アップデート関連 - apr-1.7.0.1.6.1_2 → 1.0.1_1,1
1. 概要 発生は、2023年4月3日。 下記のような状態にありまして。 $ pkg version -vl "<" apr-1.7.0.1.6.1_2 < needs updating (index has 1.7.3.1.6.3_1) 2. 状況 これをアップグレードしようとすると (最近は、事情があって「-rR」オプションをつけませぬ) $ portupgrade apr [Reading data from pkg(8) ... - 563 packages found - done] ---> Upgrading 'apr-1.7.0.1.6.1_2' to 'apr-1.7.3.1.6.3_1' (devel/apr1) ---> Building '/usr/ports/devel/apr1' ===> Cleaning for apr-1.7.3.1.6.3_1 ===> License APACHE20 AGPLv3 accepted by the user ===> apr-1.7.3.1.6.3_1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by apr-1.7.3.1.6.3_1 for building ・・・ 略 ・・・ /bin/sh /usr/ports/devel/apr1/work/apr-1.7.3/libtool --silent --mode=compile --tag=CC cc -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DHAVE_CONFIG_H -DLIBICONV_PLUG -I/usr/local/include -I/usr/ports/devel/apr1/work/apr-util-1.6.3/include -I/usr/ports/devel/apr1/work/apr-util-1.6.3/include/private -I/usr/local/include -I/usr/local/include/mysql -I/usr/ports/devel/apr1/work/apr-1.7.3/include -I/usr/local/include -I/usr/local/include/db18 -o dbd/apr_dbd_mysql.lo -c dbd/apr_dbd_mysql.c && touch dbd/apr_dbd_mysql.lo dbd/apr_dbd_mysql.c:49:14: error: typedef redefinition with different types ('bool' vs 'char') typedef bool my_bool; ^ /usr/local/include/mysql/mysql.h:49:14: note: previous definition is here typedef char my_bool; ^ dbd/apr_dbd_mysql.c:1271:5: warning: implicit declaration of function 'my_init' is invalid in C99 [-Wimplicit-function-declaration] my_init(); ^ 1 warning and 1 error generated. *** [dbd/apr_dbd_mysql.lo] Error code 1 make[3]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 1 error make[3]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 *** [all-recursive] Error code 1 make[2]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 1 error make[2]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 *** Error code 2 Stop. make[1]: stopped in /usr/ports/devel/apr1 *** Error code 1 Stop. make: stopped in /usr/ports/devel/apr1 egrep: empty (sub)expression ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20230403-76645-tkt9e5 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=apr-1.7.0.1.6.1_2 UPGRADE_PORT_VER=1.7.0.1.6.1_2 make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! devel/apr1 (apr-1.7.0.1.6.1_2) (new compiler error) てなことになります。 3. 対応 cd /usr/ports/devel/apr1 make config 下記が、デフォルトの状態です。
$ pkg version -vl "<" apr-1.7.0.1.6.1_2 < needs updating (index has 1.7.3.1.6.3_1)
$ portupgrade apr [Reading data from pkg(8) ... - 563 packages found - done] ---> Upgrading 'apr-1.7.0.1.6.1_2' to 'apr-1.7.3.1.6.3_1' (devel/apr1) ---> Building '/usr/ports/devel/apr1' ===> Cleaning for apr-1.7.3.1.6.3_1 ===> License APACHE20 AGPLv3 accepted by the user ===> apr-1.7.3.1.6.3_1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by apr-1.7.3.1.6.3_1 for building ・・・ 略 ・・・ /bin/sh /usr/ports/devel/apr1/work/apr-1.7.3/libtool --silent --mode=compile --tag=CC cc -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -DHAVE_CONFIG_H -DLIBICONV_PLUG -I/usr/local/include -I/usr/ports/devel/apr1/work/apr-util-1.6.3/include -I/usr/ports/devel/apr1/work/apr-util-1.6.3/include/private -I/usr/local/include -I/usr/local/include/mysql -I/usr/ports/devel/apr1/work/apr-1.7.3/include -I/usr/local/include -I/usr/local/include/db18 -o dbd/apr_dbd_mysql.lo -c dbd/apr_dbd_mysql.c && touch dbd/apr_dbd_mysql.lo dbd/apr_dbd_mysql.c:49:14: error: typedef redefinition with different types ('bool' vs 'char') typedef bool my_bool; ^ /usr/local/include/mysql/mysql.h:49:14: note: previous definition is here typedef char my_bool; ^ dbd/apr_dbd_mysql.c:1271:5: warning: implicit declaration of function 'my_init' is invalid in C99 [-Wimplicit-function-declaration] my_init(); ^ 1 warning and 1 error generated. *** [dbd/apr_dbd_mysql.lo] Error code 1 make[3]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 1 error make[3]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 *** [all-recursive] Error code 1 make[2]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 1 error make[2]: stopped in /usr/ports/devel/apr1/work/apr-util-1.6.3 *** Error code 2 Stop. make[1]: stopped in /usr/ports/devel/apr1 *** Error code 1 Stop. make: stopped in /usr/ports/devel/apr1 egrep: empty (sub)expression ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20230403-76645-tkt9e5 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=apr-1.7.0.1.6.1_2 UPGRADE_PORT_VER=1.7.0.1.6.1_2 make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! devel/apr1 (apr-1.7.0.1.6.1_2) (new compiler error)
cd /usr/ports/devel/apr1 make config
現象の出たマシンでは、「MYSQL」「PGSQL」にチェックがついており、そこの部分でエラーになっているようです。 これが、何に影響しているのかわからないのが、いささか不安ではありますが、「MYSQL」「PGSQL」のチェックをはずしました。 その後 portupgrade apr で、一応アップグレードできました。
portupgrade apr