I am trying to compile https://github.com/lowRISC/riscv-isa-sim.git in msys2, but I cant get it to work, despite having boost and asio packages installed.
I get
/riscv-isa-sim-cosim$ ./configure --enable-commitlog --enable-misaligned
configure: loading site script /etc/config.site
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ar... ar
checking for ranlib... ranlib
checking for dtc... /ucrt64/bin/dtc
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for ANSI C header files... (cached) yes
checking for __int128_t... yes
checking whether the linker accepts -Wl,--export-dynamic... yes
checking whether C++ compiler accepts -relocatable-pch... no
configure: configuring default subproject : fesvr
checking for pthread_create in -lpthread... yes
checking for struct statx.stx_ino... no
checking for struct statx.stx_mnt_id... no
configure: configuring default subproject : riscv
checking for boostlib >= 1.53 (105300)... yes
checking whether the Boost::ASIO library is available... yes
configure: error: Could not find a version of the Boost::Asio library!
As you can see, the system detects Boost::ASIO is available, but it struggles with the version, why is this happening?
I tried to debug why it is happening, but autoconf is above my pay-grade.
Instead I played around and was able to make it work with a local boost installation, e.g. using Boost 1.78 from nix:
./configure --with-boost-libdir=$BOOST_ROOT/lib/
Which ends up expanding to something like
./configure --with-boost-libdir=/nix/store/qpr8is6x4px9rxgfypv3fh0fymmn348z-boost-1.78.0/lib/
Which showed:
checking for boostlib >= 1.53 (105300)... yes
checking whether the Boost::ASIO library is available... yes
checking for main in -lboost_system... yes
checking whether the Boost::Regex library is available... yes
checking for exit in -lboost_regex... yes
checking for main in -lboost_system... yes
checking for main in -lboost_regex... yes
checking for library containing dlopen... none required
checking for pthread_create in -lpthread... (cached) yes
configure: configuring default subproject : disasm
configure: configuring default subproject : customext
configure: configuring default subproject : fdt
configure: configuring default subproject : softfloat
configure: configuring default subproject : spike_main
configure: configuring default subproject : spike_dasm
configure: creating ./config.status
config.status: creating fesvr.mk
config.status: creating riscv.mk
config.status: creating disasm.mk
config.status: creating customext.mk
config.status: creating fdt.mk
config.status: creating softfloat.mk
config.status: creating spike_main.mk
config.status: creating spike_dasm.mk
config.status: creating Makefile
config.status: creating riscv-fesvr.pc
config.status: creating riscv-disasm.pc
config.status: creating config.h