このサーバーはHigh Sierraで動いている。
前にも書いたが、最新のSequoiaではSandboxが厳し過ぎて、外部のDiskにアクセスできなかったのだ。
何時から厳しくなるのか判らない、「OSを新しくしたら動かなくなった」は困るので上げられない。
Web & Mail Serverが止まってしまうのは致命的である。
なので、OS自体は留めておいて、MacPortsで最新のPortsに維持している。
外からの侵入経路はwebとmailのみだから、PostfixとApache2、それにphpだけでも整えておけば、比較的安全であろうと考えている。
まぁ、それは置いておいて、今回はp5.34-dbiがコンパイルできなくなったと云う話題。
うん、普通に落ちる。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
% sudo port upgrade p5.34-dbi The following port will be upgraded: p5.34-dbi Continue? [Y/n]: y ---> Computing dependencies for p5.34-dbi ---> Fetching archive for p5.34-dbi ---> Archive not available for p5.34-dbi, building locally ---> Fetching distfiles for p5.34-dbi ---> Verifying checksums for p5.34-dbi ---> Extracting p5.34-dbi ---> Configuring p5.34-dbi ---> Building p5.34-dbi Error: Failed to build p5.34-dbi: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_perl_p5-dbi/p5.34-dbi/main.log for details. Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug. |
ログの対象部分はこんな感じだ。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
:info:build mv Perl.xsc Perl.c :info:build /usr/bin/clang -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_U SE_SAFE_PUTENV -arch x86_64 -isysroot/ -O3 -DVERSION=\"1.654\" -DXS_VERSION=\"1.654\" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2leve l/CORE" -W -Wall -Wpointer-arith -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter Perl.c :info:build "/opt/local/bin/perl5.34" "/opt/local/lib/perl5/5.34/ExtUtils/xsubpp" -typemap '/opt/local/lib/perl5/5.34/ExtUtils/typemap' -typem ap '/opt/local/var/macports/build/p5.34-dbi-442d65dc/work/DBI-1.654/typemap' DBI.xs > DBI.xsc :info:build mv DBI.xsc DBI.c :info:build /usr/bin/clang -c -fno-common -DPERL_DARWIN -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_U SE_SAFE_PUTENV -arch x86_64 -isysroot/ -O3 -DVERSION=\"1.654\" -DXS_VERSION=\"1.654\" "-I/opt/local/lib/perl5/5.34/darwin-thread-multi-2leve l/CORE" -W -Wall -Wpointer-arith -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter DBI.c :info:build DBI.xs:1960:9: error: expected expression :info:build STRLEN len; :info:build ^ :info:build DBI.xs:1961:28: error: use of undeclared identifier 'len' :info:build char *p = SvPV(sv, len); /* force stringify, handle magic */ :info:build ^ :info:build DBI.xs:1961:28: error: use of undeclared identifier 'len' :info:build DBI.xs:1963:37: error: use of undeclared identifier 'len' :info:build grok_flags = grok_number(p, len, &uv); :info:build ^ :info:build DBI.xs:2368:49: warning: implicit conversion from 'int' to 'char' changes value from 924 to -100 [-Wconstant-conversion] :info:build *p = (upcase) ? toUPPER_LC(*p) : toLOWER_LC(*p); :info:build ~ ^~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/handy.h:2006:25: note: expanded from macro 'toUPPER_LC' :info:build # define toUPPER_LC(c) _generic_toUPPER_LC((c), toupper, U8) :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/handy.h:1917:27: note: expanded from macro '_generic_toUPPER_LC' :info:build ? GREEK_CAPITAL_LETTER_MU \ :info:build ^~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/utf8.h:991:49: note: expanded from macro 'GREEK_CAPITAL_LETTER_MU' :info:build #define GREEK_CAPITAL_LETTER_MU 0x039C /* Upper and title case :info:build ^~~~~~ :info:build DBI.xs:2368:49: warning: implicit conversion from 'int' to 'char' changes value from 376 to 120 [-Wconstant-conversion] :info:build *p = (upcase) ? toUPPER_LC(*p) : toLOWER_LC(*p); :info:build ~ ^~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/handy.h:2006:25: note: expanded from macro 'toUPPER_LC' :info:build # define toUPPER_LC(c) _generic_toUPPER_LC((c), toupper, U8) :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/handy.h:1919:29: note: expanded from macro '_generic_toUPPER_LC' :info:build ? LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS \ :info:build ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :info:build /opt/local/lib/perl5/5.34/darwin-thread-multi-2level/CORE/utf8.h:993:49: note: expanded from macro 'LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS' :info:build #define LATIN_CAPITAL_LETTER_Y_WITH_DIAERESIS 0x0178 /* Also is title case */ :info:build ^~~~~~ :info:build 2 warnings and 4 errors generated. :info:build make: *** [DBI.o] Error 1 |
Geminiさんに聞くところ、コンパイラが古いせいで新しい構文の解釈に失敗しているらしい。
古いOSを使い続けている弊害が、ここで出てきた。(うわぉ)
先程のログの前の方を遡ってみてみよう。
|
1 2 3 4 5 6 7 |
:notice:configure ---> Configuring p5.34-dbi :debug:configure Preferred compilers: clang macports-clang-17 macports-clang-16 macports-clang-15 macports-clang-14 macports-clang-13 macports- clang-12 macports-clang-11 macports-clang-10 macports-clang-9.0 macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0 :debug:configure Using compiler 'Xcode Clang' :debug:configure Executing org.macports.configure (p5.34-dbi) :debug:configure Environment: :debug:configure CC='/usr/bin/clang' |
何故か、敢えてXcodeのclangを使用している。
macportsのclangは5〜17まで揃っているのに。ホント何でだよ。
Geminiさんに教わった方法で、clangを切り替えてみる。
|
1 |
sudo port upgrade p5.34-dbi configure.compiler=macports-clang-16 |
それでもダメだったわ〜。
このまま、p5.34-dbiを残しておいても暫くは問題無いだろう……そうであって欲しい。
Geminiさんも、こう言っている。
sudo port not-upgraded p5.34-dbi
(または sudo port pin p5.34-dbi とも書けます)
これを実行しておくと、MacPortsはこのポートを「現在のバージョンのままで固定(ロック)」扱いにしてくれます。
その結果、sudo port upgrade outdated を実行したときに、この p5.34-dbi は華麗にスルー(無視)されるようになり、他のすべてのアップデート可能なポートが一気にスムーズに更新できるようになります!
その後、もう一度ログを読んでみた。
sudo port upgrade p5.34-dbi configure.compiler=macports-clang-16 でコンパイルした時のね。
原因が見つかったよ。
そして、どうすんだよコレ……………(sigh)
|
1 |
:info:configure Your perl was compiled with gcc (version 4.2.1 Compatible Apple LLVM 9.1.0 (clang-902.0.39.2)), okay. |
つまり、「perl本体が古い環境で拵えたものだから、新しいコンパイラで作ったのだと対応取れないよ」ってことだよねぇ。
perl5.34を一度uninstallして、再度installし直しか。
amavis-newのコンパイルが無茶重いんだよなぁ。
rushのコンパイル時間が殆どだったと思いたい。
と云うことで、p5.34関連ファイル群を一度 uninstall した後、順に入れていくしか無いか?
削除時に、どれが動かなくなるってのを片端からメモして、それらの再インストールもしないといけない?
面倒臭ぇ〜〜。
多分、丸一日で……済むかなぁ。
port installed > installed.txt して、perl絡みのを纏めてみた。当然、全部かどうか知らない。
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
amavisd-new @2.11.1_1+perl5_34 (active) p5.34-algorithm-diff @1.201.0_0 (active) p5.34-archive-tar @3.120.0_0 (active) p5.34-archive-zip @1.680.0_0 (active) p5.34-authen-sasl @2.210.0_0 (active) p5.34-berkeleydb @0.670.0_0+db62 (active) p5.34-clone @0.500.0_0 (active) p5.34-common-sense @3.750.0_0 (active) p5.34-compress-raw-bzip2 @2.224.0_0 (active) p5.34-compress-raw-lzma @2.224.0_0 (active) p5.34-compress-raw-zlib @2.224.0_0 (active) p5.34-convert-binhex @1.125.0_0 (active) p5.34-crypt-openssl-bignum @0.90.0_2 (active) p5.34-crypt-openssl-random @0.170.0_0 (active) p5.34-crypt-openssl-rsa @0.410.0_0 (active) p5.34-crypt-urandom @0.550.0_0 (active) p5.34-cryptx @0.91.0_0 (active) p5.34-data-dump @1.250.0_0 (active) p5.34-data-optlist @0.115.0_0 (active) p5.34-dbd-mysql @5.13.0_0+mariadb10_11 (active) p5.34-dbd-sqlite @1.780.0_0 (active) p5.34-dbi @1.653.0_0 (active) p5.34-devel-checklib @1.160.0_1 (active) p5.34-digest-bubblebabble @0.20.0_0 (active) p5.34-digest-hmac @1.50.0_0 (active) p5.34-digest-md5 @2.590.0_0 (active) p5.34-digest-sha1 @2.130.0_4 (active) p5.34-email-address-xs @1.50.0_0 (active) p5.34-encode @3.240.0_0 (active) p5.34-encode-detect @1.10.0_4 (active) p5.34-encode-locale @1.50.0_0 (active) p5.34-error @0.170.300_0 (active) p5.34-extutils-cbuilder @0.280.236_0 (active) p5.34-file-listing @6.160.0_0 (active) p5.34-file-temp @0.231.200_0 (active) p5.34-geo-ip @1.510.0_0 (active) p5.34-getopt-long @2.580.0_0 (active) p5.34-getopt-long-descriptive @0.117.0_0 (active) p5.34-gssapi @0.280.0_3 (active) p5.34-html-form @6.130.0_0 (active) p5.34-html-parser @3.860.0_0 (active) p5.34-html-tagset @3.240.0_0 (active) p5.34-http-cookies @6.120.0_0 (active) p5.34-http-daemon @6.170.0_0 (active) p5.34-http-date @6.80.0_0 (active) p5.34-http-message @7.40.0_0 (active) p5.34-http-negotiate @6.10.0_1 (active) p5.34-io @1.550.0_0 (active) p5.34-io-compress @2.224.0_0 (active) p5.34-io-compress-lzma @2.224.0_0 (active) p5.34-io-html @1.4.0_0 (active) p5.34-io-socket-ip @0.440.0_0 (active) p5.34-io-socket-ssl @2.99.0_0 (active) p5.34-io-string @1.80.0_4 (active) p5.34-io-stringy @2.113.0_0 (active) p5.34-io-zlib @1.150.0_0 (active) p5.34-ipc-cmd @1.40.0_0 (active) p5.34-json @4.110.0_0 (active) p5.34-json-xs @4.40.0_0 (active) p5.34-libwww-perl @6.830.0_0 (active) p5.34-locale-maketext-simple @0.210.0_3 (active) p5.34-lwp-mediatypes @6.50.0_0 (active) p5.34-lwp-protocol-https @6.170.0_0 (active) p5.34-mail-authenticationresults @2.202.602.160_0 (active) p5.34-mail-dkim @1.202.409.230_0 (active) p5.34-mail-spamassassin @4.0.2_1+ssl (active) p5.34-mail-spf @3.202.603.310_0 (active) p5.34-mailtools @2.220.0_0 (active) p5.34-math-bigint @2.5.3_0 (active) p5.34-math-complex @1.590.0_0 (active) p5.34-mime-base32 @1.303.0_0 (active) p5.34-mime-base64 @3.160.0_0 (active) p5.34-mime-tools @5.518.0_0 p5.34-mime-tools @5.519.0_0 (active) p5.34-module-implementation @0.90.0_0 (active) p5.34-module-load @0.360.0_0 (active) p5.34-module-load-conditional @0.740.0_0 (active) p5.34-module-runtime @0.18.0_0 (active) p5.34-mozilla-ca @20260813_0 (active) p5.34-net @3.150.0_0 (active) p5.34-net-cidr-lite @0.240.0_0 (active) p5.34-net-dns @1.570.0_0 (active) p5.34-net-http @6.240.0_0 (active) p5.34-net-libidn @0.120.0_5 (active) p5.34-net-libidn2 @1.20.0_0 (active) p5.34-net-patricia @1.240.0_0 (active) p5.34-net-server @2.18.0_0 (active) p5.34-net-ssleay @1.960.0_0 (active) p5.34-netaddr-ip @4.79.0_0 (active) p5.34-params-check @0.380.0_1 (active) p5.34-params-someutil @1.90.0_0 p5.34-params-someutil @1.120.0_0 (active) p5.34-params-util @1.102.0_0 (active) p5.34-params-validate @1.310.0_0 (active) p5.34-regexp-ipv6 @0.30.0_0 (active) p5.34-scalar-list-utils @1.700.0_0 (active) p5.34-socket @2.43.0_0 (active) p5.34-socket6 @0.290.0_0 (active) p5.34-sub-exporter @0.992.0_0 (active) p5.34-sub-install @0.929.0_0 (active) p5.34-sub-name @0.280.0_0 (active) p5.34-test-deep @1.205.0_0 (active) p5.34-text-diff @1.450.0_0 p5.34-text-diff @1.460.0_0 (active) p5.34-text-parsewords @3.310.0_0 (active) p5.34-time-hires @1.976.400_0 (active) p5.34-time-local @1.350.0_0 (active) p5.34-timedate @2.350.0_0 (active) p5.34-try-tiny @0.320.0_0 (active) p5.34-types-serialiser @1.10.0_0 (active) p5.34-unix-syslog @1.100.0_3 (active) p5.34-uri @5.370.0_0 (active) p5.34-version @0.993.400_0 (active) p5.34-www-robotrules @6.30.0_0 (active) p5.34-xsloader @0.240.0_0 (active) perl5 @5.34.3_0+perl5_34 (active) perl5.34 @5.34.3_1 (active) |
取り敢えず、perl5.34をuninstall & installしてみた。
……バイナリが落ちてきた。
これじゃ、おんなじ結果じゃん。
と云うことで、ソースを落として手元で再コンパイルしてみる。
sudo port -s install perl5.34
普通に/usr/bin/clang使ってた……何故に。
今度は強制的にclang-16を使うように指示する。
sudo port install perl5.34 configure.compiler=macports-clang-16
出来上がったら、もう一度p5.34-dbiをコンパイル。
sudo port upgrade p5.34-dbi configure.compiler=macports-clang-16
ログを見たら、やはりperl5.34はclang-16を使っていなかった。
もうダメじゃん。(涙)
Geminiさんに教わって、先ずソースを落とす。
|
1 |
sudo port extract perl5.34 |
ソースのあるところへ移動。
|
1 |
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_perl5/perl5.34/work/perl-5.34.3 |
そこでinstall base pathとclangの場所を教えた。
|
1 |
./Configure -de -Dprefix=/opt/local -Dcc=/opt/local/bin/clang |
で、
grep -R ‘/usr/bin’ | grep -v ‘^ * #’ | less
としてみたら、一杯出てくるよ>/usr/bin
何よりもConfigureの中にハードコーディングされているpaths=の一文(3行だけど)。
|
1 2 3 |
Configure:paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' Configure:paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb" Configure:paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin" |
これだと/opt/local/binを探してくれない。
Configureの書き換えから始めないと。
結局Configureのpathsに/opt/local/bin /opt/local/sbinの二つをせ等に捩じ込む。
で、実際に動かした。
所々、/usr/local/lib /opt/local/lib の様に/usrが先に出てくるので、順番を入れ替える。
あくまでも/opt/localを最初に持ってくる。それだけは絶対。
Makefileが出来たので、早速sudo make!
速攻でエラーとなりました〜〜!
……畜生め〜!

