Actions
Bug #19053
closedBuild errors in the WebAssembly case
Description
I was testing WASI feature[1][2] on Ruby 3.2.0 preview2[3] on Fedora 36 following the instruction steps[2]. Then I got the build errors below when building both ruby-3.2.0-preview2.tar.gz
and the latest master branch.
Could you tell me what's wrong? Thanks.
My environment is below.
$ uname -m
x86_64
$ which gcc
/bin/gcc
$ gcc --version
gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)
Copyright (C) 2022 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.
$ which ruby
/usr/local/ruby-3.2.0-preview2/bin/ruby
$ ruby -v
ruby 3.2.0preview2 (2022-09-09 master 35cfc9a3bb) [x86_64-linux]
Build from the ruby-3.2.0-preview2.tar.gz
I installed the wasi-sdk to the following directory, and did set the environment variable WASI_SDK_PATH
by following the instruction steps on [2].
$ echo $WASI_SDK_PATH
/usr/local/wasi-sdk-16.0
I installed the binaryen by the RPM package.
$ sudo dnf install binaryen
$ rpm -q binaryen
binaryen-105-2.fc36.x86_64
Then tried to build with the source: ruby-3.2.0-preview2.tar.gz
, and I failed to build.
$ pwd
/home/jaruga/src/ruby-3.2.0-preview2_wasi
$ ./autogen.sh
$ ./configure LDFLAGS="-Xlinker -zstack-size=16777216" \
--host wasm32-unknown-wasi \
--with-destdir=./ruby-wasm32-wasi \
--with-static-linked-ext \
--with-ext=ripper,monitor
checking for ruby... /usr/local/ruby-3.2.0-preview2/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-pc-linux-gnu
checking host system type... wasm32-unknown-wasi
checking target system type... wasm32-unknown-wasi
checking for wasm32-unknown-wasi-wasm-opt... no
checking for wasm-opt... wasm-opt
checking wheather $WASI_SDK_PATH is set... yes
checking for wasm32-unknown-wasi-gcc... /usr/local/wasi-sdk-16.0/bin/clang
checking for /usr/local/wasi-sdk-16.0/bin/llvm-ar... /usr/local/wasi-sdk-16.0/bin/llvm-ar
checking for /usr/local/wasi-sdk-16.0/bin/clang++... no
checking for /usr/local/wasi-sdk-16.0/bin/llvm-nm... no
checking for /usr/local/wasi-sdk-16.0/bin/llvm-objcopy... no
checking for /usr/local/wasi-sdk-16.0/bin/llvm-objdump... no
checking for /usr/local/wasi-sdk-16.0/bin/llvm-ranlib... /usr/local/wasi-sdk-16.0/bin/llvm-ranlib
checking for /usr/local/wasi-sdk-16.0/bin/llvm-strip... no
checking for wasm32-unknown-wasi-gcc... (cached) /usr/local/wasi-sdk-16.0/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether /usr/local/wasi-sdk-16.0/bin/clang accepts -g... yes
checking for /usr/local/wasi-sdk-16.0/bin/clang option to enable C11 features... none needed
checking for wasm32-unknown-wasi-g++... no
checking for wasm32-unknown-wasi-c++... no
checking for wasm32-unknown-wasi-gpp... no
checking for wasm32-unknown-wasi-aCC... no
checking for wasm32-unknown-wasi-CC... no
checking for wasm32-unknown-wasi-cxx... no
checking for wasm32-unknown-wasi-cc++... no
checking for wasm32-unknown-wasi-cl.exe... no
checking for wasm32-unknown-wasi-FCC... no
checking for wasm32-unknown-wasi-KCC... no
checking for wasm32-unknown-wasi-RCC... no
checking for wasm32-unknown-wasi-xlC_r... no
checking for wasm32-unknown-wasi-xlC... no
checking for wasm32-unknown-wasi-clang++... no
checking for g++... g++
configure: WARNING: using cross tools not prefixed with host triplet
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking how to run the C preprocessor... /usr/local/wasi-sdk-16.0/bin/clang -E
checking for wasm32-unknown-wasi-ranlib... (cached) /usr/local/wasi-sdk-16.0/bin/llvm-ranlib
checking for wasm32-unknown-wasi-gar... (cached) /usr/local/wasi-sdk-16.0/bin/llvm-ar
checking for wasm32-unknown-wasi-gas... no
checking for wasm32-unknown-wasi-as... no
checking for gas... no
checking for as... as
checking for wasm32-unknown-wasi-gld... /usr/local/wasi-sdk-16.0/bin/clang
checking for wasm32-unknown-wasi-gnm... no
checking for wasm32-unknown-wasi-nm... no
checking for gnm... no
checking for nm... nm
checking for wasm32-unknown-wasi-gobjcopy... no
checking for wasm32-unknown-wasi-objcopy... no
checking for gobjcopy... no
checking for objcopy... objcopy
checking for wasm32-unknown-wasi-gobjdump... no
checking for wasm32-unknown-wasi-objdump... no
checking for gobjdump... no
checking for objdump... objdump
checking for wasm32-unknown-wasi-gstrip... no
checking for wasm32-unknown-wasi-strip... no
checking for gstrip... no
checking for strip... strip
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for vfork.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
/usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang)
/usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang)
/usr/local/wasi-sdk-16.0/bin/clang: /lib64/libtinfo.so.6: no version information available (required by /usr/local/wasi-sdk-16.0/bin/clang)
checking whether the linker is GNU ld... no
checking whether /usr/local/wasi-sdk-16.0/bin/clang -E accepts -o... yes
checking for /usr/local/wasi-sdk-16.0/bin/llvm-ar flags... rcD
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for a race-free mkdir -p... /bin/mkdir -p
checking for wasm32-unknown-wasi-dtrace... no
checking for dot... dot
checking for doxygen... no
checking for wasm32-unknown-wasi-pkg-config... no
checking for pkg-config... pkg-config
checking whether it is Android... no
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" "
$ echo $?
1
There is the /lib64/libtinfo.so.6
.
$ ls -l /lib64/libtinfo.so.6
lrwxrwxrwx. 1 root root 15 Jan 20 2022 /lib64/libtinfo.so.6 -> libtinfo.so.6.2*
$ rpm -qf /lib64/libtinfo.so.6
ncurses-libs-6.2-9.20210508.fc36.x86_64
Build on the master branch¶
On the master branch 5ccb625fbbd1e774636a9fdbe0bf1c3d38e085d5
, I also failed to build with the error below.
$ pwd
/home/jaruga/git/ruby/ruby
$ ./autogen.sh
$ ./configure LDFLAGS="-Xlinker -zstack-size=16777216" \
--host wasm32-unknown-wasi \
--with-destdir=./ruby-wasm32-wasi \
--with-static-linked-ext \
--with-ext=ripper,monitor
checking for ruby... /usr/local/ruby-3.2.0-preview2/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-pc-linux-gnu
checking host system type... Invalid configuration `wasm32-unknown-wasi': system `wasi' not recognized
configure: error: /bin/sh ./tool/config.sub wasm32-unknown-wasi failed
References¶
Files
Actions
Like0
Like0Like0Like0Like1Like0