GNU/Linux >> Linux の 問題 >  >> Ubuntu

M4 1.4.10から1.4.18へのコンパイルは、「Gnulib Freadahead.cをプラットフォームに移植してください!」が原因で失敗します。 Ubuntu 18.10では?

./configure && make -j1を使用したGNUm4 1.4.10〜1.4.18のtarballリリースのビルド(すべてのホットフィックスバージョンをテストしていませんが、エラーはこの範囲で一貫していると思います) およびgitgit リポジトリhttp://git.savannah.gnu.org/r/m4.gitwith./bootstrap && ./configure && make -j1cvs-readonly-359-gd69fa528をコミットします つまり、HEAD masterの )が原因で失敗します

freadahead.c: In function 'freadahead':
freadahead.c:92:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
   ^~~~~
make[3]: *** [Makefile:1910: freadahead.o] Error 1
make[3]: Leaving directory '/mnt/data/sources/m4-1.4.18/lib'

私はこのエラーに非常に混乱しています。表面的なグーグル検索によると、問題は過度に長い間無視されたアップストリームアップデートの結果です。たとえば、 https://bugzilla.redhat.com/show_bug.cgi?id=1573342修正の天才ドキュメント「バグレポートをありがとう、修正されました!」 –それでも他の人の役に立たない場合は…

ソースからglibcをビルドし、カスタムプレフィックス[1]にインストールしようとしました。 2.28と2.27は同じ問題を示し、2.26は次の理由で失敗します

make[2]: Verzeichnis „/mnt/data/sources/glibc-2.26/inet“ wird betreten
gcc ../sysdeps/unix/sysv/linux/if_index.c -c -std=gnu11 -fgnu89-inline  -O2 -Wall -Werror -Wundef -Wwrite-strings -fmerge-all-constants -fno-stack-protector -frounding-math -g -Wstrict-prototypes -Wold-style-definition     -ftls-model=initial-exec   -U_FORTIFY_SOURCE   -I../include -I/mnt/data/sources/glibc-2.26-build/inet  -I/mnt/data/sources/glibc-2.26-build  -I../sysdeps/unix/sysv/linux/x86_64/64  -I../sysdeps/unix/sysv/linux/x86_64  -I../sysdeps/unix/sysv/linux/x86  -I../sysdeps/x86/nptl  -I../sysdeps/unix/sysv/linux/wordsize-64  -I../sysdeps/x86_64/nptl  -I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix/x86_64  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/x86_64/64  -I../sysdeps/x86_64/fpu/multiarch  -I../sysdeps/x86_64/fpu  -I../sysdeps/x86/fpu/include -I../sysdeps/x86/fpu  -I../sysdeps/x86_64/multiarch  -I../sysdeps/x86_64  -I../sysdeps/x86  -I../sysdeps/ieee754/float128  -I../sysdeps/ieee754/ldbl-96/include -I../sysdeps/ieee754/ldbl-96  -I../sysdeps/ieee754/dbl-64/wordsize-64  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ieee754/flt-32  -I../sysdeps/wordsize-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio -I.   -D_LIBC_REENTRANT -include /mnt/data/sources/glibc-2.26-build/libc-modules.h -DMODULE_NAME=libc -include ../include/libc-symbols.h  -DPIC     -DTOP_NAMESPACE=glibc -o /mnt/data/sources/glibc-2.26-build/inet/if_index.o -MD -MP -MF /mnt/data/sources/glibc-2.26-build/inet/if_index.o.dt -MT /mnt/data/sources/glibc-2.26-build/inet/if_index.o
../sysdeps/unix/sysv/linux/if_index.c: In function ‘__if_nametoindex’:
../sysdeps/unix/sysv/linux/if_index.c:46:3: error: ‘strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
   strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/mnt/data/sources/glibc-2.26-build/sysd-rules:213: /mnt/data/sources/glibc-2.26-build/inet/if_index.o] Fehler 1
make[2]: Verzeichnis „/mnt/data/sources/glibc-2.26/inet“ wird verlassen
make[1]: *** [Makefile:215: inet/subdir_lib] Fehler 2
make[1]: Verzeichnis „/mnt/data/sources/glibc-2.26“ wird verlassen
make: *** [Makefile:9: all] Fehler 2

および2.25によ​​る

strftime_l.c: In function ‘__strftime_internal’:
strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros]
    digits = d > width ? d : width;          
    ^~~~~~
strftime_l.c:1260:6: note: in expansion of macro ‘DO_NUMBER’
      DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
      ^~~~~~~~~
strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this ‘else’ clause
    else
    ^~~~
In file included from wcsftime_l.c:23:
strftime_l.c: In function ‘__strftime_internal’:
strftime_l.c:719:4: error: macro expands to multiple statements [-Werror=multistatement-macros]
    digits = d > width ? d : width;          
    ^~~~~~
strftime_l.c:1260:6: note: in expansion of macro ‘DO_NUMBER’
      DO_NUMBER (1, tp->tm_year + TM_YEAR_BASE);
      ^~~~~~~~~
strftime_l.c:1259:4: note: some parts of macro expansion are not guarded by this ‘else’ clause
    else
    ^~~~
cc1: all warnings being treated as errors
make[2]: *** [../o-iterator.mk:9: /mnt/data/sources/glibc-2.25-build/time/strftime_l.os] Fehler 1

それで、それ以上のバージョンを試さないことにしました。

関連:UbuntuのSoftware Center Empty「サーバーからの有用性なし」「構成ファイルにユーザー名なし」?

[findutilsの同様の問題に関するレポートに関する議論]は、freadahead.{c,h}を上書きすることを提案しています。 最新のgnulibソースルートから。これにより一連の問題が発生しますが、自分が何をしているのかわからないため、ここで文書化する必要はありません。

この問題の修正、報告、および/または回避を開始するにはどうすればよいですか?

ユーザーがパッケージマネージャーを使用する権限を持っていないシステムのブートストラップスクリプトのソースからm4を構築しています。私はリリースソースのtarballからオリジナルのGNUm4を構築することに本当に興味があります。

他の同様にベアシステムでのビルド結果の概要は、https://gitlab.com/krichter/m4/pipelines/36977411で提供されています。

[1]これを調査している場合は、デフォルトのプレフィックス/usr/localにインストールするため、常にglibcをカスタムプレフィックスにインストールしてください。 間違いなくあなたのシステムを台無しにするでしょう。 checkinstallの使用を検討してください 確かに。

承認された回答:

このパッチを適用してみてください。これは、OpenEmbeddedで生成されたアップストリームパッチのバックポートです。


Ubuntu
  1. Ubuntuのバージョンを確認する方法

  2. Ubuntuのバージョンを確認する方法

  3. UbuntuLinuxのトップポートスキャナー

  1. UbuntuでGrub2を修復する方法

  2. Ubuntuターミナルプロンプトをカスタマイズする方法

  3. Ubuntu20.04LTSでIPアドレスを見つける方法

  1. Ubuntu20.04にOpenLiteSpeedWebサーバーをインストールする方法

  2. Ubuntu20.04でポートを開く方法

  3. Ubuntuでマイクをテストする方法