Open
Description
Status
- s390x at IBM LinuxOne Community Cloud
- ppc
- ppc64
- riscv32 ?
- riscv64 at LicheePi4a
- mips
- sparc64
Describe the bug
Building V at Ubuntu 23.04 s390x Docker container, running on RHEL 8.8 s390x. Same error when building V at Ubuntu and RHEL.
Related to what I'm trying to build at s390x https://github.com/wekan/wekan/wiki/s390x
[linux1@wekanrhel84 v]$ uname -a
Linux wekanrhel84 4.18.0-477.13.1.el8_8.s390x #1 SMP Thu May 18 09:10:47 EDT 2023 s390x s390x s390x GNU/Linux
[linux1@wekanrhel84 v]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.8 (Ootpa)
[linux1@wekanrhel84 v]$ sudo su
[root@wekanrhel84 v]$ cd
[root@wekanrhel84 ~]# docker run --name ubuntu -h 23.04 -e LANG=C.UTF-8 -it ubuntu:23.04 /bin/bash -l
root@23:/home/ubuntu/repos/v# uname -a
Linux 23.04 4.18.0-477.13.1.el8_8.s390x #1 SMP Thu May 18 09:10:47 EDT 2023 s390x s390x s390x GNU/Linux
root@23:/home/ubuntu/repos/v# make
cd ./vc && git clean -xf && git pull --quiet
cd ./thirdparty/tcc && git clean -xf && git pull --quiet
The executable './thirdparty/tcc/tcc.exe' does not work.
cc -std=gnu99 -w -o v1.exe ./vc/v.c -lm -lpthread
./vc/v.c: In function ‘__closure_alloc’:
./vc/v.c:16637:51: error: ‘__closure_thunk’ undeclared (first use in this function); did you mean ‘__closure_alloc’?
16637 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1))
| ^~~~~~~~~~~~~~~
./vc/v.c:16747:40: note: in expansion of macro ‘_CLOSURE_SIZE’
16747 | int remaining = _V_page_size / _CLOSURE_SIZE;
| ^~~~~~~~~~~~~
./vc/v.c:16637:51: note: each undeclared identifier is reported only once for each function it appears in
16637 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1))
| ^~~~~~~~~~~~~~~
./vc/v.c:16747:40: note: in expansion of macro ‘_CLOSURE_SIZE’
16747 | int remaining = _V_page_size / _CLOSURE_SIZE;
| ^~~~~~~~~~~~~
./vc/v.c: In function ‘__closure_init’:
./vc/v.c:16785:30: error: ‘__CLOSURE_GET_DATA_BYTES’ undeclared (first use in this function); did you mean ‘__CLOSURE_GET_DATA’?
16785 | memcpy(_closure_ptr, __CLOSURE_GET_DATA_BYTES, sizeof(__CLOSURE_GET_DATA_BYTES));
| ^~~~~~~~~~~~~~~~~~~~~~~~
| __CLOSURE_GET_DATA
./vc/v.c:16637:51: error: ‘__closure_thunk’ undeclared (first use in this function); did you mean ‘__closure_init’?
16637 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1))
| ^~~~~~~~~~~~~~~
./vc/v.c:16788:25: note: in expansion of macro ‘_CLOSURE_SIZE’
16788 | _closure_ptr += _CLOSURE_SIZE;
| ^~~~~~~~~~~~~
./vc/v.c: In function ‘__closure_create’:
./vc/v.c:16637:51: error: ‘__closure_thunk’ undeclared (first use in this function); did you mean ‘__closure_init’?
16637 | #define _CLOSURE_SIZE (((2*sizeof(void*) > sizeof(__closure_thunk) ? 2*sizeof(void*) : sizeof(__closure_thunk)) + sizeof(void*) - 1) & ~(sizeof(void*) - 1))
| ^~~~~~~~~~~~~~~
./vc/v.c:16800:25: note: in expansion of macro ‘_CLOSURE_SIZE’
16800 | _closure_ptr += _CLOSURE_SIZE;
| ^~~~~~~~~~~~~
make: *** [GNUmakefile:113: all] Error 1
When I try to build TCC from source:
root@23:/home/ubuntu/repos/tinycc# ./configure --prefix=/var/tmp/tcc --crtprefix=/var/tmp/tcc/lib:/usr/lib64:/usr/lib/s390x-linux-gnu --libpaths=/var/tmp/tcc/lib:/usr/lib/s390x-linux-gnu:/usr/lib64:/usr/lib:/lib/s390x-linux-gnu:/lib:/usr/local/lib/s390x-linux-gnu:/usr/local/lib --debug
Unsupported CPU
Expected Behavior
Building V works.
Current Behavior
Building V did not work, shows closure errors.
Reproduction Steps
SSH to Linux s390x server.
git clone https://github.com/vlang/v
cd v
make
Possible Solution
No response
Additional Information/Context
No response
V version
Newest commit after v0.4, commit 049d685 changelog: add a missing link
Environment details (OS name and version, etc.)
Running at IBM LinuxOne Community Cloud, s390x https://github.com/wekan/wekan/wiki/s390x
[linux1@wekanrhel84 v]$ uname -a
Linux wekanrhel84 4.18.0-477.13.1.el8_8.s390x #1 SMP Thu May 18 09:10:47 EDT 2023 s390x s390x s390x GNU/Linux
[linux1@wekanrhel84 v]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.8 (Ootpa)
[linux1@wekanrhel84 v]$ sudo su
[root@wekanrhel84 v]$ cd
[root@wekanrhel84 ~]# docker run --name ubuntu -h 23.04 -e LANG=C.UTF-8 -it ubuntu:23.04 /bin/bash -l
root@23:/home/ubuntu/repos/v# uname -a
Linux 23.04 4.18.0-477.13.1.el8_8.s390x #1 SMP Thu May 18 09:10:47 EDT 2023 s390x s390x s390x GNU/Linux