変奏現実

パソコンやMMORPGのことなどを思いつくまま・・・記載されている会社名・製品名・システム名などは、各社の商標、または登録商標です。

この画面は、簡易表示です

ゲーム近況

今やっていないもの

スクエニ:FF14。 1キャラでほぼ全ジョブを利用できるがジョブの数がとても多い。このため日々のイベントを処理するだけで数時間。放置から3年 。

G5:Windowsのソリテアの広告から安易にサバイバルものやシティーものに課金しゲームをサクサク進めようとしたがバグる度にサポートに頼るので時間短縮のうまみが薄かった。方針を転換し無課金で他のG5のゲームをハシゴしてみたが、 休日に淡々とハシゴしたゲームのイベントを消化していたら無限ループ。全ゲーム放置 。

G123:ビビットアーミー。広告がいっぱい来るのでチョットのつもりで始めた。 広告とは異なりアダルト要素はほぼ無いが気にならないくらい人間関係の絡んだ課金レベル至上主義の対戦が楽しい。無制限に課金できないので、無課金でどこまでやれるか試してみた。レベル40あたりから同盟内の課金様からメールで配布されるアイテムに頼る以外に道がなくなり50でまったりになってきたので放置。

37Games:日替り内室 。 広告がいっぱい来るのでチョットのつもりで始めた。ゲーム自体は任官して色んなイベントをこなしていくゲームでやはり広告の様なアダルト要素は無い。部下の血縁者の女性に貢がないと一部のステータスが上がらない。子供を作らないと他のプレイヤーとの縁談ができない。たまにログインできなくなった時にもダウンロードしたリンクからスタートできたが、 ある日それもできなくなった。ゲーム内のギルドでイベント参加チャット無言だったので通報されてたのかもしれない。

PS4:エースコンバット7。難しい。挫折。

Steam:Cities Skyline。どうやってもすぐに先に進めなくなる。挫折。
The Elder Scrolls V Skyrim Special Edition:以下、同文。

今もやっているもの

ネコあつめ



回線工事(予定

2年前に回線を光コラボからFletsに戻した。

次は夢の5G工事無しで切り替えるつもりだったが、

国際情勢がそれを許さなかった。

次のオリンピック競技の一部が近くで開催されるが少し離れているので

Nuroも対象外。

それに今回は
・配線はそのまま使用
・グローバルIPが使えるらしい
・ルータを交換するダケ
と意外と良い条件っぽいので変えてみる。

旨くいったら、家サーバ復活するかも。

ps.

なぜかプロバイダはSO-NET。SmartWatch2もtwitterの通知が受け取れなくなって久しいのでポイント溜まったら買い替えたいなぁ。

午後で予約したが何故か直前に午前に変更になった。

工事するのは安心安全のいつもの会社。

いったい何回工事したんだろう?

アナログ ⇒ ADSL ⇒ Flets ⇒ 2FからCATV ⇒ Flets ⇒光コラボ ⇒アナログ ⇒ 2系統入ってる配管にもう一本入れようとしたが失敗
⇒ 結局アナログから Flets に戻す

だったと思う。

また自宅サーバが使える様になるといいなぁ。半分諦めてるけどね。(笑

ps.工事完了。

特に問題は無いが、ONUとルータが別なので場所とコンセントに困る。

自宅サーバはポートフォワードでWEBサーバに繋げばよい様だ。
スマホから繋がるのは確認できた。

回線速度は、ダウンロード:300Mbps、アップロード:300Mbpsぐらい。



P8H77V_LE

ASUS P8H77V LE マザボ メインPCで使ってる。
全然気が付いてなかったけど未実装のボタンのパターンがあるから多分搭載するとROGになるんだろう。

対応CPU Intel® Socket 1155 for 3rd/2nd Generation Processors
搭載チップセット Intel® H77
メイン
メモリ
4 x DIMM, Max. 32GB, DDR3- 2200(O.C.)/2133(O.C.)/2000(O.C.)/1866(O.C.)/1600/1333/1066 MHz Non-ECC, Un-buffered Memory
Dual Channel Memory Architecture
Supports Intel® Extreme Memory Profile (XMP)
USB基板: 1×USB 3.1 Gen 1 、3×USB 2.0
背面: 2×USB 3.1 Gen 1 、4×USB 2.0
LAN機能 Realtek® 8111F, 1000BASE-T/100BASE-TX/10BASE-T×1
オーディオ
機能
Realtek® ALC887 8-Channel High Definition Audio CODEC
ROGシリーズ独自搭載機能 Overclocking Protection :
– ASUS C.P.R.(CPU Parameter Recall)
フォーム
ファクター
(サイズW×D)
uATX Form Factor
12 inch x 8.6 inch ( 30.5 cm x 21.8 cm )

重要なのはフォームファクター。 uATX ちょっと大きめらしい。



DDR4 16GB×2

TEAM DDR4 2666Mhz PC4-21300 16GBx2枚(32GBkit)デスクトップ用 Elite Plus シリーズ 日本国内無期限保証(永久保証)正規品

ELITE PLUS U-DIMM DDR4

既に夏頃の半値。サイバーマンデーでさらに安くなったのでポチった。
DDR4-16GB×2が1万円割ってる店もあるらしいけど見たことない。

製品名は、ELITE PLUS U-DIMM DDR4らしい。対応周波数で多少値段が違っている。Core-i5 9400F用なので2666MHzにした。Ryzen3世代なら3200MHzだろうね。

周波数21332400 2666 3200
レイテンシCL15-15-15-36CL16-16-16-39CL19-19-19-43CL22-22-22-52

Ryzen3世代を買ってないのは、APIがまだ第2世代だから。
出たら、AsrockのDeskMini A300に入れてみたい。

ps.届いたのでサブPCに入れてみた。

空きだらけ
スペック通り2666MHz(1333MHz×20倍)で動作
CASもスペック通り

ちなみに仕事場のPCはメモリ4GB(しかも1枚刺し)+HDD。
日中でもWindows Updateが裏で走るので、漢字入力が手間取るのはイラっとくる。
ハードウェア(メモリ容量ギリギリ+仮想記憶+HDD+TPMのセルフ・コンボ)スペックやセキュリティ(自社巡回暗号化)ソフト一式も見直さないと改善できそうにない。
もっともそんな予算なんてどこの会社でも組んでいる訳が無いから、考えるダケ無駄なんだよね。
TPMしとけば業者が HDDを転売しても読めないだろうけど、更に巡回ソフトが仕事中(特にデバッグ中に)HDDの中をTPM経由で暗号化していくのは馬鹿じゃないかなと思う。

日本は後進国。特に仕事場は・・・



OpenSSL

Python3.8.0のコンパイルにOpenSSL 1.0.2 以上が必要らしい。
でも、Debian openssl で検索すると、
パッケージ: openssl (1.0.1t-1+deb8u12) [security]
なので、openSSLのダウンロードページからダウンロードしてビルド。

参考:LinuxにApacheとOpenSSLをソースからビルドしてインストールする

$ wget https://www.openssl.org/source/openssl-1.0.2t.tar.gz
$ tar xvzf openssl-1.0.2t.tar.gz
・・・
$ cd openssl-1.0.2t
$ sudo ./config --prefix=/usr/local/openssl-1.0.2t shared zlib
・・・
Configured for linux-armv4.
$ sudo make
・・・
$ sudo make install
penSSL shared libraries have been installed in:
  /usr/local/openssl-1.0.2t
If this directory is not in a standard system path for dynamic/shared
libraries, then you will have problems linking and executing
applications that use OpenSSL libraries UNLESS:
* you link with static (archive) libraries.  If you are truly
  paranoid about security, you should use static libraries.
* you use the GNU libtool code during linking
  (http://www.gnu.org/software/libtool/libtool.html)
* you use pkg-config during linking (this requires that
  PKG_CONFIG_PATH includes the path to the OpenSSL shared
  library directory), and make use of -R or -rpath.
  (http://www.freedesktop.org/software/pkgconfig/)
* you specify the system-wide link path via a command such
  as crle(1) on Solaris systems.
* you add the OpenSSL shared library directory to /etc/ld.so.conf
  and run ldconfig(8) on Linux systems.
* you define the LD_LIBRARY_PATH, LIBPATH, SHLIB_PATH (HP),
  DYLD_LIBRARY_PATH (MacOS X) or PATH (Cygwin and DJGPP)
  environment variable and add the OpenSSL shared library
  directory to it.
One common tool to check the dynamic dependencies of an executable
or dynamic library is ldd(1) on most UNIX systems.
See any operating system documentation and manpages about shared
libraries for your version of UNIX.  The following manpages may be
helpful: ld(1), ld.so(1), ld.so.1(1) [Solaris], dld.sl(1) [HP],
ldd(1), crle(1) [Solaris], pldd(1) [Solaris], ldconfig(8) [Linux],
chatr(1) [HP].
・・・
$ ldd /usr/local/openssl-1.0.2t/bin/openssl
        linux-vdso.so.1 (0xbee33000)
        libssl.so.1.0.0 => /usr/local/openssl-1.0.2t/lib/libssl.so.1.0.0 (0xb6f0d000)
        libcrypto.so.1.0.0 => /usr/local/openssl-1.0.2t/lib/libcrypto.so.1.0.0 (0xb6d7b000)
        libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6d68000)
        libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6d40000)
        libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6bf7000)
        /lib/ld-linux.so.3 (0xb6f72000)
$ vi /etc/ld.so.conf.d/arm-openssl-1.0.2t.conf
a
# openssl-1.0.2t
/usr/local/openssl-1.0.2t/lib
$ sudo ldconfig

共有ライブラリィのパスに登録
あれれ?名前が1.0.0じゃないか???
Pythonは1.0.2以上がががとエラる。
諦めて最新の安定版ver1.1.1dを試す。

$ wget https://www.openssl.org/source/openssl-1.1.1d.tar.gz
$ tar xvzf openssl-1.1.1d.tar.gz
…
$ sudo ./config --prefix=/usr/local/openssl-1.1.1d shared zlib
Operating system: armv7l-whatever-linux2
Configuring OpenSSL version 1.1.1d (0x1010104fL) for linux-armv4
Using os-specific seed configuration
Creating configdata.pm
Creating Makefile
**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <https://github.com/openssl/openssl/issues>  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL file first)         ***
***                                                                ***
**********************************************************************
$ sudo make
…
$ sudo make install
…
$ ldd /usr/local/openssl-1.1.1d/bin/openssl
        linux-vdso.so.1 (0xbeade000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libz.so.1 => /lib/arm-linux-gnueabi/libz.so.1 (0xb6f6c000)
        libdl.so.2 => /lib/arm-linux-gnueabi/libdl.so.2 (0xb6f59000)
        libpthread.so.0 => /lib/arm-linux-gnueabi/libpthread.so.0 (0xb6f30000)
        libc.so.6 => /lib/arm-linux-gnueabi/libc.so.6 (0xb6de7000)
        /lib/ld-linux.so.3 (0xb6f94000)
$ vi /etc/ld.so.conf.d/arm-openssl-1.1.1d.conf
a
# openssl-1.1.1d.
/usr/local/openssl-1.1.1d/lib
$ sudo ldconfig



IE11とPromise

IEは古いのでPromiseは使えないので、ナンチャってpromiseを使うしかない。

<script src="https://www.promisejs.org/polyfills/promise-6.1.0.min.js"></script>

勿論、jQuery.Deferredを使っても、ポリフィル(自作コードの差込み)をするのと同じ。

function aaa() {
var d = new $.Deferred;
setTimeout(function(){
    console.log('ヽ| l l│<ハーイ');
    d.resolve();
... それとも
    d.reject();
  }, 1000);
return d.promise();
}
var p = aaa();
p.done(function() {
  console.log("(・ー・) オワッタナ");
});
p.fail( function() {
  console.log("大丈夫だ。何も問題ない。");
});
または
p.then( function() {
  console.log("(・ー・) オワッタナ");
})
, function() {
  console.log("大丈夫だ。何も問題ない。");
});

の様に変な書き方になるそうな。

一応thenチェインもできるらしい。

var d = new $.Deferred();
d.resolve();
d.promise()
.then(function() {
    console.log('1番');
})
.then(function() {
    console.log('2番');
});
.then(function() {
    console.log('3番');
});

メデタシメデタシ。



xrdp tightvncserver

TeraTermから接続すると長いインストールの間もパソコンを放置しないといけないので、無謀にもNASにリモートデスクトップを入れてみる。

$sudo apy install xrdp
…
Recommended packages:
  vnc4server | tightvncserver | vnc-server
…
$sudo apy install tightvncserver 
systemctl start xrdp.service
systemctl enable xrdp.service
xrdp.service is not a native service, redirecting to systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable xrdp

Windows10からマシン名接続は失敗したが、IPアドレスでは成功。

もう少しかもしれない?

X11が入っていない。KDEを入れてみる。
参考:Debian 9: デスクトップ環境のKDEをインストールする

途中で、
Sub-process /usr/bin/dpkg returned an error code (1)
に悩まされるのでキャッシュをクリアしたり、壊れたパッケージをリムーブしたりした。
参考:dpkgやapt-get関連でエラーが出た時の対処法

けど、Xorgが設定無理と投げているのでやはり無理なんだろう。

さて
https://qiita.com/yamada-hakase/items/a8efe626f598c5eb6f8c
によれば、CentOS7/8なら

yum groupinstall graphical-server-environment -y

するといいらしい。




METIS PLUS RED

G3900のまな板PCセットがそろそろ埃がヤバイ感じなのでケースに入れた。

買ったのはRAIJINTEK METIS PLUS の赤。

赤が一番安かった

ITXマザボがちょっと大きく、ATX電源ユニットでは干渉しそうだったので、 余っていたATX変換アダプタ付のSFX電源を取り付けた。

このケースの最大の良さは

小さいは正義。値段もお手頃。

小さい割には上と両脇の板はネジを外せば取れるので案外楽。

最大の欠点は

ドコもかしこもギリギリサイズ

で、ちょっと大きめのパーツの僅か数ミリのサイズで泣きを見ることになる。

それと小さいケースにありがちな負圧で吸気する方式なので、吸気ファンを付けるべきだろう。

このMETISのCLASICは上面にメッシュが無いモデル。
EVOは、サイコロ型。サイドパネル仕様がEVO ALSはアルミ、EVO TGSは強化ガラスらしい。



gcc 9.2.0

Node.jsをコンパイルしたときにgccが古い!と指摘された。
wikiを見ると最新版は9.2なんだそうな。

ps. 今は、gcc-10.2.0 らしい。

インストしてみることにした。
参考:gccをソースからビルド/インストールする
ps.2019/11/26

1.ReadyRAS-212の/rootは容量が少ない(3.7GB)ので
エラーが出るから、/home/xxxxx(5.5TB:HDD容量に依る)で作成する。

/./mpfr/src/.libs -L/root/gcc-9.2.0/build/./mpc/src/.libs -lmpc -lmpfr -lgmp -rdynamic -ldl  -L./../zlib -lz libcommon.a ../libcpp/libcpp.a   ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
collect2: error: ld returned 1 exit status
../../gcc/lto/Make-lang.in:81: recipe for target 'lto1' failed

2.–prefix=/usr/localで、楽にシェルで使えるしようとすると
make install で失敗してしまった。
make uninstallが使えなくなっていたので、そのせいかもしれない。
–prefix=/usr/local/gcc-9.2.0にする。

----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/plugin
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use :q, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[3]: Leaving directory '/home/****/gcc-9.2.0/build/libcc1'
make[2]: Leaving directory '/home/****/gcc-9.2.0/build/libcc1'
make[2]: Entering directory '/home/****/gcc-9.2.0/build/armv7l-unknown-linux-gnueabi/libgcc'
make[2]: *** No rule to make target 'install'.  Stop.
make[2]: Leaving directory '/home/****/gcc-9.2.0/build/armv7l-unknown-linux-gnueabi/libgcc'
Makefile:14301: recipe for target 'install-target-libgcc' failed
make[1]: *** [install-target-libgcc] Error 2
make[1]: Leaving directory '/home/****/gcc-9.2.0/build'
Makefile:2349: recipe for target 'install' failed
make: *** [install] Error 2

ついでなのでお行儀よくsudoを使うようにしてみた。
※CentOSならグループはwheel。
※Ubuntuは、usemod -G のパラメータの順序が逆だそうで非常に危険。

$ su -
# apt-get install sudo
# usermod -G sudo ${development-user}
# exit
$ exit

再構築直後のHDD(6TB×2)の状況をメモ

# df -H
Filesystem      Size  Used Avail Use% Mounted on
udev             11M  4.1k   11M   1% /dev
/dev/md0        4.0G  542M  3.2G  15% /
tmpfs           1.1G  8.2k  1.1G   1% /dev/shm
tmpfs           1.1G  377k  1.1G   1% /run
tmpfs           529M  1.1M  528M   1% /run/lock
tmpfs           1.1G     0  1.1G   0% /sys/fs/cgroup
/dev/md127      6.0T   20M  6.0T   1% /data
/dev/md127      6.0T   20M  6.0T   1% /apps
/dev/md127      6.0T   20M  6.0T   1% /home

※以下、開発用ユーザでログイン。
※usemodの指定は指定後にログインしないと無効。
gccのビルドに必要なパッケージをインストール
libnss-mdnsもあった方がいいような気はしている。

$ sudo apt-get install build-essential
$ sudo apt-get install libssl-dev
$ wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-9.2.0/gcc-9.2.0.tar.gz
$ tar xvzf gcc-9.2.0.tar.gz
$ cd gcc-9.2.0

gccのビルドに必要なパッケージやモジュールをダウンロード

$ ./contrib/download_prerequisites
2019-11-26 21:42:37 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2 [2383840] -> "./gmp-6.1.0.tar.bz2" [1]
2019-11-26 21:42:40 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2 [1279284] -> "./mpfr-3.1.4.tar.bz2" [1]
2019-11-26 21:42:43 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz [669925] -> "./mpc-1.0.3.tar.gz" [1]
2019-11-26 21:42:47 URL: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 [1658291] -> "./isl-0.18.tar.bz2" [1]
gmp-6.1.0.tar.bz2: OK
mpfr-3.1.4.tar.bz2: OK
mpc-1.0.3.tar.gz: OK
isl-0.18.tar.bz2: OK
All prerequisites downloaded successfully.

ビルド用のディレクトリを作成し、移動して設定
※32bitなので–disable-multilibで失敗しないハズなので指定しない。

$ mkdir build
$ cd build
$ ../configure --enable-languages=c,c++ --prefix=/usr/local/gcc-9.2.0 --disable-bootstrap

コンパイル

$ date; make; date
前回:Sat Nov  9 23:25:55 JST 2019 ~ Sun Nov 10 01:58:37 JST 2019
今回:Tue Nov 26 21:44:02 JST 2019 ~ Wed Nov 27 00:16:30 JST 2019

2時間かな。今回はNASが同期中だったので3時間かかっている。

$ date; sudo make install; date
前回:Sun Nov 10 05:39:48 JST 2019 ~ Sun Nov 10 05:41:12 JST 2019
今回:Wed Nov 27 00:31:58 JST 2019 ~ Wed Nov 27 00:33:21 JST 2019

確認してみると

$ gcc --version
gcc (Debian 4.9.2-10+deb8u2) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

古いgccが呼び出される

$ /usr/local/gcc-9.2.0/bin/gcc --version
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

パスが通っていないので、viで ~/.bash_profile を作って
export PATH=/usr/local/gcc-9.2.0/bin:$PATH
を追加。再ログインして確認

$ gcc --version
gcc (GCC) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

しかし、このままではincludeやlibや共通ライブラリィが古いバージョンのものを使いそうだ。どの辺にあるのかな?

$ sudo find / -name stdio.h -print
/home/****/gcc-9.2.0/fixincludes/tests/base/stdio.h
/home/****/gcc-9.2.0/fixincludes/tests/base/rtldef/stdio.h
/home/****/gcc-9.2.0/libstdc++-v3/include/tr1/stdio.h
/home/****/gcc-9.2.0/libstdc++-v3/include/c_compatibility/stdio.h
/home/****/gcc-9.2.0/libssp/ssp/stdio.h
/home/****/gcc-9.2.0/build/armv7l-unknown-linux-gnueabi/libstdc++-v3/include/tr1/stdio.h
/run/nfs4/home/****/gcc-9.2.0/fixincludes/tests/base/stdio.h
/run/nfs4/home/****/gcc-9.2.0/fixincludes/tests/base/rtldef/stdio.h
/run/nfs4/home/****/gcc-9.2.0/libstdc++-v3/include/tr1/stdio.h
/run/nfs4/home/****/gcc-9.2.0/libstdc++-v3/include/c_compatibility/stdio.h
/run/nfs4/home/****/gcc-9.2.0/libssp/ssp/stdio.h
/run/nfs4/home/****/gcc-9.2.0/build/armv7l-unknown-linux-gnueabi/libstdc++-v3/include/tr1/stdio.h
/data/home/****/gcc-9.2.0/fixincludes/tests/base/stdio.h
/data/home/****/gcc-9.2.0/fixincludes/tests/base/rtldef/stdio.h
/data/home/****/gcc-9.2.0/libstdc++-v3/include/tr1/stdio.h
/data/home/****/gcc-9.2.0/libstdc++-v3/include/c_compatibility/stdio.h
/data/home/****/gcc-9.2.0/libssp/ssp/stdio.h
/data/home/****/gcc-9.2.0/build/armv7l-unknown-linux-gnueabi/libstdc++-v3/include/tr1/stdio.h
/usr/include/c++/4.9/tr1/stdio.h
/usr/include/arm-linux-gnueabi/bits/stdio.h
/usr/include/stdio.h
/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/include/ssp/stdio.h
/usr/local/gcc-9.2.0/include/c++/9.2.0/tr1/stdio.h

実際どうなんだろう。

$ gcc -v a.c
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/lto-wrapper
Target: armv7l-unknown-linux-gnueabi
Configured with: ../configure --enable-languages=c,c++ --prefix=/usr/local/gcc-9.2.0 --disable-bootstrap
Thread model: posix
gcc version 9.2.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t'
 /usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/cc1 -quiet -v -imultilib . -imultiarch arm-linux-gnueabi a.c -quiet -dumpbase a.c -mcpu=arm10tdmi -mtls-dialect=gnu -marm -march=armv5t -auxbase a -version -o /tmp/ccRJs92o.s
GNU C17 (GCC) version 9.2.0 (armv7l-unknown-linux-gnueabi)
        compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/local/include/arm-linux-gnueabi"
ignoring nonexistent directory "/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/../../../../armv7l-unknown-linux-gnueabi/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/include
 /usr/local/include
 /usr/local/gcc-9.2.0/include
 /usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/include-fixed
 /usr/include/arm-linux-gnueabi
 /usr/include
End of search list.
GNU C17 (GCC) version 9.2.0 (armv7l-unknown-linux-gnueabi)
        compiled by GNU C version 4.9.2, GMP version 6.1.0, MPFR version 3.1.4, MPC version 1.0.3, isl version isl-0.18-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 20ffebffab78fa72e422119a97fa84c2
COLLECT_GCC_OPTIONS='-v' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t'
 as -v -march=armv5t -meabi=5 -o /tmp/ccmD4DyI.o /tmp/ccRJs92o.s
GNU assembler version 2.25 (arm-linux-gnueabi) using BFD version (GNU Binutils for Debian) 2.25
COMPILER_PATH=/usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/:/usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/:/usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/:/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/:/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/
LIBRARY_PATH=/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/:/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/../../../:/lib/arm-linux-gnueabi/:/lib/:/usr/lib/arm-linux-gnueabi/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t'
 /usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/collect2 -plugin /usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/liblto_plugin.so -plugin-opt=/usr/local/gcc-9.2.0/libexec/gcc/armv7l-unknown-linux-gnueabi/9.2.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccpu0ZV5.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --eh-frame-hdr -dynamic-linker /lib/ld-linux.so.3 -X -m armelf_linux_eabi /usr/lib/arm-linux-gnueabi/crt1.o /usr/lib/arm-linux-gnueabi/crti.o /usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/crtbegin.o -L/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0 -L/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/../../.. -L/lib/arm-linux-gnueabi -L/usr/lib/arm-linux-gnueabi /tmp/ccmD4DyI.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/crtend.o /usr/lib/arm-linux-gnueabi/crtn.o
COLLECT_GCC_OPTIONS='-v' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t'

/usr/local/gcc-9.2.0/lib/gcc/armv7l-unknown-linux-gnueabi/9.2.0/includeに

aaa.hを作り、int aaa=123; と書いて、
#include <aaa.h>
printf(“aaa=%d\n”,aaa);
をコンパイルすれば通る。

但し、stdio.hはそこには無いので、/usr/includeのstdio.hが使われる。

ps.2019/11/28

sudo でgcc-9.2.0を使うために

/etc/sudoers を修正

Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
↓
Defaults	secure_path="/usr/local/gcc-9.2.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Node.jsの記事にもあるように
/etc/ld.so.conf.dにgcc-9.2.0用のファイルを作っておく。

# gcc-9.2.0 configuration
/usr/local/gcc-9.2.0/lib

そして
$ sudo ldconfig



nginx

参考 nginx の最新版を Ubuntu 18.04 に apt インストールする

公式nginxをRedayNAS-212のリポジトリにnginxの配布キーを追加して自動インストールする方法です。

sources.list の中がdebian jessieだらけなので debianにしてもubuntuにしても サポート外判定でした。

# (1) Ubuntu に nginx リポジトリを登録する
# wget https://nginx.org/keys/nginx_signing.key
# apt-key add nginx_signing.key
# (2) リポジトリを一覧に追加
# vi /etc/apt/sources.list で下の行を追加
deb http://nginx.org/packages/debian/ jessie nginx
または
deb http://nginx.org/packages/ubuntu/ jessie nginx
# (3) アップデートで、nginxをインストール
# apt update

# apt update
Hit:1 http://security.debian.org jessie/updates InRelease
Ign:2 http://mirrors.edge.kernel.org/debian jessie InRelease
Get:3 http://nginx.org/packages/debian jessie InRelease [2,856 B]
Hit:4 http://mirrors.edge.kernel.org/debian jessie Release
Hit:5 https://apt.readynas.com/packages/readynasos 6.10.2 InRelease
Fetched 2,856 B in 1s (2,356 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
22 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Skipping acquire of configured file 'nginx/binary-armel/Packages' as repository 'http://nginx.org/packages/debian jessie InRelease' doesn't support architecture 'armel'
N: Skipping acquire of configured file 'nginx/binary-armhf/Packages' as repository 'http://nginx.org/packages/debian jessie InRelease' doesn't support architecture 'armhf'

またコンパイルするのか・・・
その前にツールでOSのバージョンを確認。

# apt-get install lsb-release
lsb_release -a
 No LSB modules are available.
 Distributor ID: Debian
 Description:    Debian GNU/Linux 8.11 (jessie)
 Release:        8.11
 Codename:       jessie
# apt-get update
# apt-get build-dep nginx
# apt-get source nginx
# cd nginx-1.17.0
# sudo dpkg-buildpackage -uc -b
# cd
# sudo dpkg -i nginx_1.17.0-1~stretch_armhf.deb

apt-get install debian-keyring
でもダメ

# wget http://nginx.org/download/nginx-1.16.1.tar.gz
# tar xvzf nginx-1.16.1.tar.gz
# cd nginx-1.16.1
# ./configure
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre=<path> option.

正規表現ライブラリィが必須らしい。

# apt-get install libpcre3 libpcre3-dev
#./configure
Configuration summary
  + using system PCRE library
  + OpenSSL library is not used
  + using system zlib library
  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx modules path: "/usr/local/nginx/modules"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"

zlibパッケージの取得

# apt-get install zlib1g-dev

openssh1.1.0のインストール

# cd /usr/local/src
# wget https://www.openssl.org/source/openssl-1.1.0f.tar.gz
# tar xvzf openssl-1.1.0f.tar.gz
# cd openssl-1.1.0f/
# ./config --prefix=/usr/local/openssl --openssldir=/usr/local/openssl
# make
# make install

必要そうなパッケージを入れたのでコンパイルしてみる。

# cd
# cd nginx-1.16.1
# ./configure
#  make
# make install

普通にコンパイルできた。
参考 ソースファイルからnginxのインストール

インストしたパッケージを使う様に
openSSLとスレッドプールを設定に追加してみる。

# cd
# cd nginx-1.16.1
# make clean
# ./configure  --with-openssl=/usr/local/src/openssl
-1.1.0f --with-threads
checking for OS
 + Linux 4.4.184.alpine.1 armv7l
checking for C compiler ... found
 + using GNU C compiler
 + gcc version: 4.9.2 (Debian 4.9.2-10+deb8u2)
checking for gcc -pipe switch ... found
checking for -Wl,-E switch ... found
checking for gcc builtin atomic operations ... found
checking for C99 variadic macros ... found
checking for gcc variadic macros ... found
checking for gcc builtin 64 bit byteswap ... found
checking for unistd.h ... found
checking for inttypes.h ... found
checking for limits.h ... found
checking for sys/filio.h ... not found
checking for sys/param.h ... found
checking for sys/mount.h ... found
checking for sys/statvfs.h ... found
checking for crypt.h ... found
checking for Linux specific features
checking for epoll ... found
checking for EPOLLRDHUP ... found
checking for EPOLLEXCLUSIVE ... not found
checking for O_PATH ... found
checking for sendfile() ... found
checking for sendfile64() ... found
checking for sys/prctl.h ... found
checking for prctl(PR_SET_DUMPABLE) ... found
checking for prctl(PR_SET_KEEPCAPS) ... found
checking for capabilities ... found
checking for crypt_r() ... found
checking for sys/vfs.h ... found
checking for nobody group ... not found
checking for nogroup group ... found
checking for poll() ... found
checking for /dev/poll ... not found
checking for kqueue ... not found
checking for crypt() ... not found
checking for crypt() in libcrypt ... found
checking for F_READAHEAD ... not found
checking for posix_fadvise() ... found
checking for O_DIRECT ... found
checking for F_NOCACHE ... not found
checking for directio() ... not found
checking for statfs() ... found
checking for statvfs() ... found
checking for dlopen() ... not found
checking for dlopen() in libdl ... found
checking for sched_yield() ... found
checking for sched_setaffinity() ... found
checking for SO_SETFIB ... not found
checking for SO_REUSEPORT ... found
checking for SO_ACCEPTFILTER ... not found
checking for SO_BINDANY ... not found
checking for IP_TRANSPARENT ... found
checking for IP_BINDANY ... not found
checking for IP_BIND_ADDRESS_NO_PORT ... not found
checking for IP_RECVDSTADDR ... not found
checking for IP_SENDSRCADDR ... not found
checking for IP_PKTINFO ... found
checking for IPV6_RECVPKTINFO ... found
checking for TCP_DEFER_ACCEPT ... found
checking for TCP_KEEPIDLE ... found
checking for TCP_FASTOPEN ... found
checking for TCP_INFO ... found
checking for accept4() ... found
checking for eventfd() ... found
checking for int size ... 4 bytes
checking for long size ... 4 bytes
checking for long long size ... 8 bytes
checking for void * size ... 4 bytes
checking for uint32_t ... found
checking for uint64_t ... found
checking for sig_atomic_t ... found
checking for sig_atomic_t size ... 4 bytes
checking for socklen_t ... found
checking for in_addr_t ... found
checking for in_port_t ... found
checking for rlim_t ... found
checking for uintptr_t ... uintptr_t found
checking for system byte ordering ... little endian
checking for size_t size ... 4 bytes
checking for off_t size ... 8 bytes
checking for time_t size ... 4 bytes
checking for AF_INET6 ... found
checking for setproctitle() ... not found
checking for pread() ... found
checking for pwrite() ... found
checking for pwritev() ... found
checking for sys_nerr ... found
checking for localtime_r() ... found
checking for clock_gettime(CLOCK_MONOTONIC) ... found
checking for posix_memalign() ... found
checking for memalign() ... found
checking for mmap(MAP_ANON|MAP_SHARED) ... found
checking for mmap("/dev/zero", MAP_SHARED) ... found
checking for System V shared memory ... found
checking for POSIX semaphores ... not found
checking for POSIX semaphores in libpthread ... found
checking for struct msghdr.msg_control ... found
checking for ioctl(FIONBIO) ... found
checking for struct tm.tm_gmtoff ... found
checking for struct dirent.d_namlen ... not found
checking for struct dirent.d_type ... found
checking for sysconf(_SC_NPROCESSORS_ONLN) ... found
checking for sysconf(_SC_LEVEL1_DCACHE_LINESIZE) ... found
checking for openat(), fstatat() ... found
checking for getaddrinfo() ... found
checking for PCRE library ... found
checking for PCRE JIT support ... found
checking for zlib library ... found
creating objs/Makefile
Configuration summary
  + using threads
  + using system PCRE library
  + using OpenSSL library: /usr/local/src/openssl-1.1.0f
  + using system zlib library
  nginx path prefix: "/usr/local/nginx"
  nginx binary file: "/usr/local/nginx/sbin/nginx"
  nginx modules path: "/usr/local/nginx/modules"
  nginx configuration prefix: "/usr/local/nginx/conf"
  nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
  nginx pid file: "/usr/local/nginx/logs/nginx.pid"
  nginx error log file: "/usr/local/nginx/logs/error.log"
  nginx http access log file: "/usr/local/nginx/logs/access.log"
  nginx http client request body temporary files: "client_body_temp"
  nginx http proxy temporary files: "proxy_temp"
  nginx http fastcgi temporary files: "fastcgi_temp"
  nginx http uwsgi temporary files: "uwsgi_temp"
  nginx http scgi temporary files: "scgi_temp"
# make
# make install
# cd /usr/local/nginx/sbin
# nginx -V
built by gcc 4.9.2 (Debian 4.9.2-10+deb8u2)




top