A/I #6
未完了Boost.Multiprecisionを使ってみる
説明
まとめ¶
MSYS2¶
- 環境
- GCC14とGCC4の両方を使用
- 正式GCC 4.8.5パッケージは無い。SOURCEOFRGEには有志のビルドがある
- GCC14とGCC4の両方を使用
- お試し結果
- 最新GCC 14.2.0でもGCC4.8.5でもだとboost-1_53_0がビルドできない
- MSYS環境がサポートされていない
- boostのリリースノートには1_60_0からMinGW GCCに対応した旨書かれているが、実際は1_60_0をGCCでビルドできず
- boost_1_66_0はビルド及び使用可能
- 最新GCC 14.2.0でもGCC4.8.5でもだとboost-1_53_0がビルドできない
- 感想
- MinGWを使う場合、1_53_0はビルドできない
- MinGWを使う場合、古くても1_66_0からになる
WSL+CentOS7¶
- 環境
- ネイティブなGCCが4.8.5
- クロスコンパイラGCC 4.8.5のビルド可能
- mingw-builds使用
- お試し結果
- boost-1_53_0ビルド可能
- user-config.jamでクロスコンパイラ指定
- サンプルプログラムは未
- boost-1_53_0ビルド可能
- 感想
- ターゲット環境のCentOS7と同等なのでLinux向けにはいい
- デバッグはネイティブでやることになるのかな
- 本当にWindows版バイナリが作成できているのかな?最初に起動に時間がかかったのが気になる
開発 次郎 さんが8ヶ月前に更新 · 編集済み
セットアップ・メモ¶
- ライブラリをインストール
- pacman -S mingw-w64-ucrt-x86_64-boost
- C++14から
- #warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"
インストール・ログ閉じる
Tatsuo@DESKTOP-F5MH7I8 MSYS ~/boost_1_53_0 $ pacman -S mingw-w64-ucrt-x86_64-boost resolving dependencies... looking for conflicting packages... Packages (1) mingw-w64-ucrt-x86_64-boost-1.88.0-1 Total Installed Size: 180.84 MiB :: Proceed with installation? [Y/n] Y (1/1) checking keys in keyring [###############################] 100% (1/1) checking package integrity [###############################] 100% (1/1) loading package files [###############################] 100% (1/1) checking for file conflicts [###############################] 100% (1/1) checking available disk space [###############################] 100% :: Processing package changes... (1/1) installing mingw-w64-ucrt-x86_64-boost [###############################] 100% Optional dependencies for mingw-w64-ucrt-x86_64-boost mingw-w64-ucrt-x86_64-python: For Boost.Python [installed] mingw-w64-ucrt-x86_64-python-numpy: For Boost.Python (NumPy)
- #warning "The minimum language standard to use Boost.Math will be C++14 starting in July 2023 (Boost 1.82 release)"
インストール・ログ閉じる
- 参考
- 最新バージョンを確認する
- pacman -Ss boost
- 最新バージョンを確認する
開発 次郎 さんが7ヶ月前に更新 · 編集済み
Boost 1.53.0 セットアップメモ¶
最新の1.88.0はMinGW64でビルドしている
- MinGW64でもMinGWでも同じエラーでビルドできない
- エラー内容 bootstrap.log閉じる$ cat bootstrap.log ###
- Using 'gcc' toolset.
###
rm -rf bootstrap
mkdir bootstrap
gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c
builtins.c:33:23: fatal error: sys/wait.h: No such file or directory # include <sys/wait.h>
^
compilation terminated.
execunix.c:17:26: fatal error: sys/resource.h: No such file or directory
#include <sys/resource.h>
^
compilation terminated.
fileunix.c:98:17: fatal error: ar.h: No such file or directory # include <ar.h>
^
compilation terminated.
- Using 'gcc' toolset.
###
- エラー内容 bootstrap.log閉じる
- MinGW(32ビット環境でありMinGW64とは別)
- ライブラリが足りない?
- Boostをビルドするには次のパッケージが必要?zlibとbzip2はいいが、MinGWにはPythonがない
- python-devel
- zlib-devel
- bzip2-devel
- Boostをビルドするには次のパッケージが必要?zlibとbzip2はいいが、MinGWにはPythonがない
- Python 2.7(当時はこれだろう)をソースからビルドしてみたが、ビルドできず
- エラー内容閉じる
$ make
gccDNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/pgenmain.o -o Parser/pgen.exe>st_mode & S_IXUSR & ~S_IXGRP & ~S_IXOTH;
Parser/pgen.exe ./Grammar/Grammar Include/graminit.h Python/graminit.c
gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/ast.o Python/ast.c
gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/compile.o Python/compile.c
gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/graminit.o Python/graminit.c
gcc -c -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/import.o Python/import.c
Python/import.c: In function 'write_compiled_module':
Python/import.c:941:50: error: 'S_IXGRP' undeclared (first use in this function)
mode_t mode = srcstat
^~~~~~
Python/import.c:941:50: note: each undeclared identifier is reported only once for each function it appears in
Python/import.c:941:61: error: 'S_IXOTH' undeclared (first use in this function)
mode_t mode = srcstat->st_mode & S_IXUSR & ~S_IXGRP & ~S_IXOTH;
^~~~~~
make: *** [Python/import.o] Error 1
- エラー内容閉じる
Boost 1.88(最新)ビルドメモ¶
- MinGW64はビルドできなかった?
- 原因と結果はよくわからない
- b2コマンドのインストール時、MSYS2環境であるにもかかわらずパス区切り文字がおかしい。/ではなく¥になっている。そのため、/usr/local/ではなく、D:\usr\local下にインストールされた。
MSYS2環境¶
$ pacman -Qe
base 2022.06-1
base-devel 2024.11-1
cmake 4.0.0-1
filesystem 2025.02.23-1
git 2.49.0-1
mingw-w64-ucrt-x86_64-boost 1.88.0-1
mingw-w64-ucrt-x86_64-gcc 14.2.0-3
mingw-w64-ucrt-x86_64-gdb 16.2-1
mingw-w64-ucrt-x86_64-gdb-multiarch 16.2-1
mingw-w64-ucrt-x86_64-libmangle-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-ucrt-x86_64-make 4.4.1-3
mingw-w64-ucrt-x86_64-pkgconf 1~2.3.0-1
mingw-w64-ucrt-x86_64-tools-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-ucrt-x86_64-winstorecompat-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-binutils 2.44-1
mingw-w64-x86_64-cmake 4.0.0-1
mingw-w64-x86_64-crt-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-gcc 14.2.0-3
mingw-w64-x86_64-gdb 16.2-1
mingw-w64-x86_64-gdb-multiarch 16.2-1
mingw-w64-x86_64-glib2 2.84.1-2
mingw-w64-x86_64-gmp 6.3.0-2
mingw-w64-x86_64-headers-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-libmangle-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-make 4.4.1-3
mingw-w64-x86_64-pkgconf 1~2.3.0-1
mingw-w64-x86_64-tools-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-winpthreads-git 12.0.0.r657.g1e8b1ccdd-1
mingw-w64-x86_64-winstorecompat-git 12.0.0.r657.g1e8b1ccdd-1
msys2-runtime 3.6.1-3
ninja 1.12.1-2
vim 9.1.1006-2
開発 次郎 さんが7ヶ月前に更新 · 編集済み
MSYS1ではb2を作成できたが・・・¶
MSYS 1.0下でなら、b2コマンドを作成できた。
ポイントは、bootstrap.sh --with-toolset=mingwオプションを付けること。
- bootstrap.shはMinGWオプションを指定するといい?
- > $ ./bootstrap.sh --with-toolset=mingw
- (参考)https://groups.google.com/g/boost-developers-archive/c/vqK2MXdmUZ0/m/qBmI8PRgzAYJ
- MSYS 1.0ではb2コマンドが作成できた
- > $ ./bootstrap.sh --with-toolset=mingw
しかし、そのあとのb2コマンドは失敗する
$ ./b2 install link=static threading=multi cxxflags=-fPIC
mingw.jam: No such file or directory
D:/MinGW/msys/1.0/home/Tatsuo/boost_1_53_0/tools/build/v2/build\toolset.jam:39: in toolset.using
rule mingw.init unknown in module toolset
D:/MinGW/msys/1.0/home/Tatsuo/boost_1_53_0/tools/build/v2/build\project.jam:898: in using
project-config.jam:12: in modules.load
D:/MinGW/msys/1.0/home/Tatsuo/boost_1_53_0/tools/build/v2\build-system.jam:257: in load-config
D:/MinGW/msys/1.0/home/Tatsuo/boost_1_53_0/tools/build/v2\build-system.jam:423: in load-configuration-files
D:/MinGW/msys/1.0/home/Tatsuo/boost_1_53_0/tools/build/v2\build-system.jam:555: in load
D:\MinGW\msys\1.0\home\Tatsuo\boost_1_53_0\tools\build\v2/kernel\modules.jam:283: in import
D:\MinGW\msys\1.0\home\Tatsuo\boost_1_53_0\tools\build\v2/kernel/bootstrap.jam:142: in boost-build
D:\MinGW\msys\1.0\home\Tatsuo\boost_1_53_0\boost-build.jam:17: in module scope
MSYS2では--with-toolset=mingwを付けても失敗する エラーログ閉じる
$ cat bootstrap.log
###
### Using 'mingw' toolset.
###
rm -rf bootstrap
mkdir bootstrap
gcc -DNT -o bootstrap/jam0 command.c compile.c constants.c debug.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathunix.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execnt.c filent.c
In file included from command.c:17:
command.c: In function 'cmd_new':
jam.h:73:18: error: implicit declaration of function 'maxline' [-Wimplicit-function-declaration]
73 | #define MAXLINE (maxline()) /* longest 'together' actions */
| ^~~~~~~
command.c:39:20: note: in expansion of macro 'MAXLINE'
39 | int max_line = MAXLINE;
| ^~~~~~~
In file included from function.c:24:
function.c: In function 'check_alignment':
function.c:222:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
222 | assert( (unsigned long)s->data % sizeof( LIST * ) == 0 );
| ^
In file included from make1.c:50:
make1.c: In function 'make1cmds':
jam.h:73:18: error: implicit declaration of function 'maxline' [-Wimplicit-function-declaration]
73 | #define MAXLINE (maxline()) /* longest 'together' actions */
| ^~~~~~~
make1.c:1043:86: note: in expansion of macro 'MAXLINE'
1043 | printf( "%s actions too long (max %d):\n", object_str( rule->name ), MAXLINE
|
開発 次郎 さんが7ヶ月前に更新 · 編集済み
MSYS2のgcc(≠MinGW GCC)だとビルドできる?¶
ターミナルはUCRT64とかMinGW64ではなく、MSYSを使う。
$ pacman -S msys/gcc
MSYSとMinGWの違い閉じる- 参考
- MSYS2とMinGW64の最大の違いは、POSIXエミュレーションを介しているか否か。
- MSYS2は実はCygwinをupstreamとしたforkで、POSIXエミュレーションとして msys-2.0.dll を使い、パスを変換したりしている。
- つまり、MSYS2のexeはMSYS2用のDLLやPATH環境じゃないと使えないし、Windowsのファイルパスは扱えない。
- 一方で MinGW64 はPOSIXエミュレーションは使っておらず、GNUのツールをそのままWindowsに移植したもの。そのためWindowsのファイルパスをそのまま扱える。
- つまり MinGW64のexeは単体でWindowsアプリとして実行可能となっている。コマンドプロンプト(cmd.exe)からも利用可能。
- 以下に、pacmanなどではMSYS2を使えとか書いてあるのは、要はMSYS2/MinGW64のパッケージ管理をMSYS2側のpacmanで行えるように統合しているため。
- スタートメニューからのMinGW64/32のシェルメニューでは、/mingw64, /mingw32 の bin ディレクトリをPATHの先頭に置いて、次に(MSYS2の)/usr/bin を置いている。
- つまり、gccなどを MinGW64/32 のコマンドを優先して使うように調整している。
開発 次郎 さんが7ヶ月前に更新 · 編集済み
いろいろダメだった。
WSLにCentOS 7を追加してBoost 1.53がビルドできるか試してみる¶
- https://qiita.com/hyzhiro/items/d8c287b2ec3b608eefe7
- https://github.com/mishamosher/CentOS-WSL
- yum updateでエラー。いつものやつ?
- エラー内容閉じる
[root@DESKTOP-F5MH7I8 wsl]# yum update -y && yum install passwd sudo -y Loaded plugins: fastestmirror Determining fastest mirrors Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=genclo error was 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown error" One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: base/7/x86_64 [root@DESKTOP-F5MH7I8 wsl]#
- エラー内容閉じる
- 開発用ユーザ追加閉じる
[root@DESKTOP-F5MH7I8 yum.repos.d]# myName=devel [root@DESKTOP-F5MH7I8 yum.repos.d]# adduser -G wheel $myName [root@DESKTOP-F5MH7I8 yum.repos.d]# echo -e "[user]\ndefault=$myName" >> /etc/wsl.conf [root@DESKTOP-F5MH7I8 yum.repos.d]# cat /etc/wsl.conf [user] default=devel [root@DESKTOP-F5MH7I8 yum.repos.d]# passwd $myName Changing password for user devel. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd: all authentication tokens updated successfully. [root@DESKTOP-F5MH7I8 yum.repos.d]# - 変更直後はrootのまま。develをログインユーザにするには仮想マシンリブート閉じる
# exit 一旦仮想マシンを落とす PS D:\wsl> wsl -t CentOS7 再起動する PS D:\wsl> wsl -d CentOS7
- MinGW-w64 ビルド方法
- mingw-w64-v4.0.6.tar.bz2
- binutils-2.24.tar.bz2
開発 次郎 さんが7ヶ月前に更新 · 編集済み
Zeranoeさんのmingw-w64-buildをやってみる¶
https://blog.csdn.net/lengyue2015/article/details/144449310
WSL+CentOS7環境
できたのかな?
少なくともhello.cはビルドしてWindows下で実行できた。
- WSL下で実行できるのは気にしなくていい?
- Windows下で実行した際、最初の1回目はずいぶん時間がかかった。
- Ubuntuでは失敗する。不思議
手順¶
- yum install flex
- yum install bison
- yum install texinfo
- git clone https://github.com/Zeranoe/mingw-w64-build.git
- cd mingw-w64-build/
- vi mingw-w64-build
- 41: MINGW_W64_BRANCH="v4.x"
- 42: BINUTILS_BRANCH="binutils-2_25"
- 43: GCC_BRANCH="releases/gcc-4.8.5"
- ./mingw-w64-build x86_64
- ~/.zeranoe/mingw-w64/x86_64/に一式が出来上がっている
開発 次郎 さんが7ヶ月前に更新 · 編集済み
x86_64-w64-mingw32-g++でboost-1_53_0をビルドする¶
- (出典)
- 前提
- WSL+CentOS7
- ネイティブもGCC4.5.8だけどWindows版のバイナリを作りたいのでクロスコンパイラを作成した
- x86_64-w64-mingw32-g++(GCC4.8.5クロスコンパイラ作成済み)は~/.zeranoe下にインストール済み。
- WSL+CentOS7
- 手順
- wget https://sourceforge.net/projects/boost/files/boost/1.53.0/boost_1_53_0.tar.bz2
- tar xf boost_1_53_0.tar.bz2
- cd boost_1_53_0
- ./bootstrap.sh
- sudo yum install libicu libicu-devel python3 python3-devel
- vi user-config.jam閉じる
using gcc : : x86_64-w64-mingw32-g++ : <cxxflags>"-I/home/devel/.zeranoe/mingw-w64/x86_64/x86_64-w64-mingw32/include -L/home/devel/.zeranoe/mingw-w64/x86_64/x86_64-w64-mingw32/lib -fPIC" <linkflags>"-Wl,-rpath -Wl,/home/devel/.zeranoe/mingw-w64/x86_64/x86_64-w64-mingw32/lib" ; # Configure python using python : 3.6 : /usr/bin/python3 : /usr/include/python3.6m : /usr/lib ;
- ./b2 toolset=gcc \
--build-dir=build \
--prefix=/opt/boost-1.53.0 \
--user-config=user-config.jam \
stage - ./b2 toolset=gcc \
--build-dir=build \
--prefix=/opt/boost-1.53.0 \
--user-config=user-config.jam \
install
開発 次郎 さんが7ヶ月前に更新 · 編集済み
MinGWに関する情報(SOURCEFORGE)¶
- MinGWの公式サイト(のsourceforge)で配布されているGCCは、2013年に公開された4.8.1で更新が止まっている。
- 最新バージョンはMinGW-w64(のsourceforge)からダウンロードできる
- 64bit版だけでなく、32bit版も配布している。例えば4.8.5が欲しい時は次のように辿っていくとよい
- Toolchains targetting Win32 / Personal Builds / mingw-builds / 4.8.5 / threads-win32 / dwarf
- 64bit版だけでなく、32bit版も配布している。例えば4.8.5が欲しい時は次のように辿っていくとよい
- MinGWの公式サイトで配布されていたものもwin32-dwarf版
- ダウンロードが終わったら7zを解凍できるツールで解凍してパスを通す
- ちなみにGCC単体でよければtdm-gccというものもある
- しかしながらGCC単体だとうまく動かないケースがほとんどだと思われる
開発 次郎 さんが7ヶ月前に更新 · 編集済み
ちょいメモ¶
SOURCEFORGEのGCC4.8.5には、seh版とsjlj版がある。
これらの違いはなんだ?
Scenery and Fish さん¶
SEH は Strucutured Exception Handlingの略で、Windowsの持つ構造化例外処理実装
SJLJ は SetJump/LongJumpの略で、昔から良く使われてる Cのsetjump/longjumpを使った例外処理実装
gcc使ってるとどれにしたらよいか迷う事があったので調べたら、ここにまとまってた。
http://stackoverflow.com/questions/15670169/what-is-difference-between-sjlj-vs-dwarf-vs-seh
dwarf-2は 32bitでしか動かないのでとりあえず無視。
@spiegel-im-spiegel さん¶
gcc のスレッドモデルと例外処理
mingw32 または mingw64 で提供される gcc では,スレッドモデルと例外処理は以下のようになっているらしい。
(「 MSYS2 / Tickets / #24 Mingw64 downloads through msys2? 」より)
On MSYS2 I maintain only one configuration:
32-bit: threads=posix, exceptions=dwarf
64-bit: threads=posix, exceptions=seh
MSYS2 のベースになっている MinGW-w64 のスレッドモデルには win32 と posix が提供されている。 win32 は Windows ネイティブなスレッド関連関数を使っているため速いが, C++11 の thread, mutex, future はサポートしていないらしい。
例外処理には SJLJ(SetJump/LongJump), DWARF2, SEH(Structured Exception Handling)があり,この中では Windows ネイティブな SEH が一番速い。ただし SEH は 64bit gcc でしか対応していないため 32bit 環境では使えない。
MinGW-w64 ではインストール時にスレッドモデルと例外処理を選択できる。
MinGW-w64 のもうひとつの実装である TDM-GCC では,スレッドモデルには posix,例外処理には SJLJ(32bit)または SEH(64bit)が設定されているようだ。
(“TDM-GCC : Quirks” より)
開発 次郎 さんが7ヶ月前に更新 · 編集済み
x86_64-4.8.5-release-win32-sjlj-rt_v4-rev0.7z でboostビルドまでトライしてみる¶
結論¶
b2.exeがビルドできない。
boostのソースがMinGWを認識していない模様
boost_1_88_0は認識してくれる
経緯¶
- x86_64-4.8.5-release-win32-sjlj-rt_v4-rev0.7z を解凍して、オリジナルの/mingw64 を解凍してできた mingw64/に置き換える
- MSYS MingWターミナルでバージョンを確認する
- $ gcc --version閉じる
gcc.exe (x86_64-win32-sjlj-rev0, Built by MinGW-W64 project) 4.8.5 Copyright (C) 2015 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 --version閉じる
- MSYS MingWターミナルでバージョンを確認する
- pacman -S python3
- user-config.jamでpythonを指定するため
- ここで使うuser-config.jamはWSL+CentOS7でboost-1_53_0のビルドに成功したものを流用する
- bootstrap.shで失敗する。MSYS2にはない<sys/types.h>を求める。
- GCC14でも、GCC4でも同様
開発 次郎 さんが7ヶ月前に更新 · 編集済み
boostがMSYS2を認識してくれたのがいつか?ビルドして試してみる¶
まずはGCC14で。
$ ./bootstrap.sh
$ ./b2 --build-dir=build --prefix=/opt/boost-1.81.0 -link=static threading=multi cxxflags=-fPIC stage
- boost_1_81_0
- failed updating 112 targets...
- skipped 40 targets...
- updated 3088 targets...
- boost_1_79_0
- failed updating 112 targets...
- skipped 40 targets...
- updated 3039 targets...
- boost_1_69_0
- failed updating 110 targets...
- skipped 18 targets...
- updated 2442 targets...
- boost_1_68_0
- bootstrap.sh OK
- boost_1_67_0
- bootstrap.sh OK
- boost_1_66_0
- もっとも古いバージョンでbootstrap.shできる版
- failed updating 110 targets...
- skipped 18 targets...
- updated 2376 targets...
- boost_1_65_0
- boost_1_59_0同様。失敗
- boost_1_64_0
- boost_1_59_0同様。失敗
- boost_1_63_0
- boost_1_59_0同様。失敗
- boost_1_62_0
- boost_1_59_0同様。失敗
- boost_1_61_0
- boost_1_59_0同様。失敗
- boost_1_60_0
- boost_1_59_0同様。失敗
- boost_1_59_0 ← おそらく1_5x → 1_6xの間でMSYS2が認識された模様
- 失敗閉じる
$ cat bootstrap.log ### ### Using 'gcc' toolset. ### rm -rf bootstrap mkdir bootstrap gcc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c execcmd.c: In function 'onintr': execcmd.c:120:5: error: implicit declaration of function 'out_printf' [-Wimplicit-function-declaration] 120 | out_printf( "...interrupted\n" ); | ^~~~~~~~~~ In file included from jam.h:315, from jam.c:100: jam.c:181:19: warning: '__p__environ' redeclared without dllimport attribute: previous dllimport ignored [-Wattributes] 181 | extern char **environ; | ^~~~~~~ make.c: In function 'make': make.c:132:13: error: implicit declaration of function 'out_printf' [-Wimplicit-function-declaration] 132 | out_printf( "...found %d target%s...\n", counts->targets, | ^~~~~~~~~~ make.c: In function 'make0': make.c:735:13: error: implicit declaration of function 'out_flush' [-Wimplicit-function-declaration] 735 | out_flush(); | ^~~~~~~~~ builtins.c:45:11: fatal error: sys/wait.h: No such file or directory 45 | # include <sys/wait.h> | ^~~~~~~~~~~~ compilation terminated. modules/path.c: In function 'path_exists': modules/path.c:16:12: error: implicit declaration of function 'file_query' [-Wimplicit-function-declaration] 16 | return file_query( list_front( lol_get( frame->args, 0 ) ) ) ? | ^~~~~~~~~~ execunix.c:20:10: fatal error: sys/resource.h: No such file or directory 20 | #include <sys/resource.h> | ^~~~~~~~~~~~~~~~ compilation terminated. fileunix.c:100:11: fatal error: ar.h: No such file or directory 100 | # include <ar.h> | ^~~~~~ compilation terminated.
- 失敗閉じる
boost_1_60_0からWindows GCC対応¶
1_60_0のRelease Noteには次のようにWindowsのGCCが列挙されているが、1_59_0には無い。 ただし、1_60_0はGCC14でビルドできない
Linux: Clang: 3.4, 3.6 Clang, C++14: 3.7 GCC: 4.4.7, 4.8.4, 4.9.3, 5.1.0, 5.2.1 GCC, C++11: 4.4.7 GCC, C++14: 4.9.3 Windows: GCC, C++03, mingw: 3.4.5 GCC, C++11, mingw: 4.6.4, 4.7.3, 4.8.1 GCC, C++14, mingw: 4.9.3, 5.1.0 Visual C++: 7.1, 8.0, 9.0, 10.0, 11.0, 12.0, 14.0 Android: Clang: 3.6, 3.7 GCC: 4.9.0, 5.2.0 QNX: QCC: 4.4.2 SunOS: Oracle Solaris Studio: 12.4, 12.5
開発 次郎 さんが7ヶ月前に更新 · 編集済み
boost_1_66_0をGCC4でビルドしてみる¶
- MinGWターミナルでbootstrap.sh(GCC14が使われる)
- ./b2 --build-dir=build --prefix=/opt/boost-1.66.0 -link=static threading=multi cxxflags=-fPIC stage
- user-config.jam閉じる
ポイントは、D:/msys64/mingw64.GCC485/bin/gcc.exeでパスを表現しているところ。
/mingw64/bin/gccではfile not foundになるusing gcc : mingw : D:/msys64/mingw64.GCC485/bin/gcc.exe : <cxxflags>"-ID:/msys64/mingw64.GCC485/x86_64-w64-mingw32/include -LD:/msys64/mingw64.GCC485/x86_64-w64-mingw32/lib -fPIC" <linkflags>"-Wl,-rpath -Wl,D:/msys64/mingw64.GCC485/x86_64-w64-mingw32/lib" ;
- ちょっと気にあるエラーがあるが問題なさそう閉じる
gcc.compile.c++ build\boost\bin.v2\libs\wave\build\gcc-mingw-gnu-mingw\debug\link-static\threadapi-win32\threading-multi\wave_config_constant.o libs\wave\src\wave_config_constant.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
- ちょっと気にあるエラーがあるが問題なさそう閉じる
- user-config.jam閉じる
- b2結果
- failed updating 108 targets...
- skipped 12 targets...
- updated 1931 targets...