1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【学習メモ】CentOS7にapr1.6.5を入れるときmake testでtestsocketsエラー

Last updated at Posted at 2018-10-21

##環境
IPv6とSELinuxを無効にした最小インストール+yum groupinstall baseに、apr-1.6.5をソースでインストールしようとしたらtestsocketsエラーが出たときのメモです。

一時的にIPv6を有効な状態にすればエラーは出なくなりました。nmtuiのIPv6は「無視する/ignore」のままでよく、net.ipv6.conf.all.disable_ipv6を0にします。

参考
CentOS7 IPv6の無効化設定(www.server-memo.net)

prefixのみ

testsocketsでエラーが出る。

./configure --prefix=/usr/local/apr-1.6.5 && \
make && make test
(中略)
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : /Line 131: Could not bind socket (99): Cannot assign requested address

-Line 189: Condition is false, but expected true
FAILED 1 of 7
testsockopt         : SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
testskiplist        : SUCCESS
Failed Tests            Total   Fail    Failed %
===================================================
testsockets                 7      1     14.29%

検索していたら、SolarisでIPv6に対応していないとき--disable-ipv6を付けると失敗するような記事が見つかる。
apr-bugs mailing list archives(mail-archives.apache.org)

--disable-ipv6を入れる

オプションを知らなかったのでとりあえず入れてみる。
今度はtestipsubで違うエラーが出た。
IPv6の短縮表現のエラーのようだけれど後回し。

./configure --prefix=/usr/local/apr-1.6.5 \
--disable-ipv6 && \
make && make test
(中略)
testfile            : SUCCESS
testfilecopy        : SUCCESS
testfileinfo        : SUCCESS
testflock           : SUCCESS
testfmt             : SUCCESS
testfnmatch         : SUCCESS
testargs            : SUCCESS
testhash            : SUCCESS
testipsub           : \Line 208: expected <::>, but saw <[::]>
FAILED 1 of 6
testlock            : SUCCESS
testcond            : SUCCESS
testlfs             : |Line 349: LFS support a no-op in 64-bit builds
SUCCESS
testmmap            : SUCCESS
testnames           : SUCCESS
testoc              : SUCCESS
testpath            : SUCCESS
testpipe            : SUCCESS
testpoll            : SUCCESS
testpools           : SUCCESS
testproc            : SUCCESS
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : SUCCESS
testsockopt         : SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
testskiplist        : SUCCESS
Failed Tests            Total   Fail    Failed %
===================================================
testipsub                   6      1     16.67%

ipv6を有効にする。

設定していた以下の設定を0に変える。

vim /etc/sysctl.d/?.conf
net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0

sysctl -pでipv6が設定されているか確認。

make testが通る。
ひとまずはこれでOK。

make test
(中略)
testhash            : SUCCESS
testipsub           : SUCCESS
testlock            : SUCCESS
testcond            : SUCCESS
testlfs             : |Line 349: LFS support a no-op in 64-bit builds
SUCCESS
testmmap            : SUCCESS
testnames           : SUCCESS
testoc              : SUCCESS
testpath            : SUCCESS
testpipe            : SUCCESS
testpoll            : SUCCESS
testpools           : SUCCESS
testproc            : SUCCESS
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : SUCCESS
testsockopt         : SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
testskiplist        : SUCCESS
All tests passed.

ipv6を有効にして--disable-ipv6を付ける

正しい組み合わせのはずなのになぜか失敗。
IPv6はほんと難しい。

testargs            : SUCCESS
testhash            : SUCCESS
testipsub           : \Line 208: expected <::>, but saw <[::]>
FAILED 1 of 6
testlock            : SUCCESS
testcond            : SUCCESS
testlfs             : |Line 349: LFS support a no-op in 64-bit builds
SUCCESS
testmmap            : SUCCESS
testnames           : SUCCESS
testoc              : SUCCESS
testpath            : SUCCESS
testpipe            : SUCCESS
testpoll            : SUCCESS
testpools           : SUCCESS
testproc            : SUCCESS
testprocmutex       : SUCCESS
testrand            : SUCCESS
testsleep           : SUCCESS
testshm             : SUCCESS
testsock            : SUCCESS
testsockets         : SUCCESS
testsockopt         : SUCCESS
teststr             : SUCCESS
teststrnatcmp       : SUCCESS
testtable           : SUCCESS
testtemp            : SUCCESS
testthread          : SUCCESS
testtime            : SUCCESS
testud              : SUCCESS
testuser            : SUCCESS
testvsn             : SUCCESS
testskiplist        : SUCCESS
Failed Tests            Total   Fail    Failed %
===================================================
testipsub                   6      1     16.67%
1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?