go-jit
go-jit copied to clipboard
Building Readme example error
/projects/go-test ❯ go run .
# github.com/goccy/go-jit/internal/ccall
jit-dump.c: In function ‘jit_dump_value’:
jit-dump.c:151:29: note: the ABI of passing union with ‘long double’ has changed in GCC 4.4
151 | const_value = jit_value_get_constant(value);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jit-dump.c: In function ‘dump_object_code’:
jit-dump.c:722:9: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
722 | system(cmdline);
| ^~~~~~~~~~~~~~~
jit-dump.c:725:9: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
725 | system(cmdline);
| ^~~~~~~~~~~~~~~
# github.com/goccy/go-jit/internal/ccall
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit-dump.h:24,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit.h:34,
from jit-internal.h:26,
from jit-elf-read.c:23:
In function ‘read’,
inlined from ‘jit_readelf_open’ at jit-elf-read.c:877:5:
/usr/include/x86_64-linux-gnu/bits/unistd.h:38:10: warning: ‘__read_alias’ writing 48 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
38 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from jit-elf-read.c:25:
/usr/include/x86_64-linux-gnu/bits/unistd.h: In function ‘jit_readelf_open’:
jit-elf-defs.h:91:17: note: destination object ‘e_type’ of size 2
91 | Elf64_Half e_type; /* Object file type */
| ^~~~~~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit-dump.h:24,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit.h:34,
from jit-internal.h:26,
from jit-elf-read.c:23:
/usr/include/x86_64-linux-gnu/bits/unistd.h:26:16: note: in a call to function ‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
26 | extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
| ^~~~~~~~~~
# github.com/goccy/go-jit/internal/ccall
jit-insn.c: In function ‘initialize_setjmp_block’:
jit-insn.c:7222:66: error: ‘sigsetjmp’ undeclared (first use in this function); did you mean ‘sigset_t’?
7222 | value = jit_insn_call_native(func, "sigsetjmp", (void *) sigsetjmp,
| ^~~~~~~~~
| sigset_t
jit-insn.c:7222:66: note: each undeclared identifier is reported only once for each function it appears in
jit-insn.c: In function ‘jit_insn_convert’:
jit-insn.c:4283:29: note: the ABI of passing union with ‘long double’ has changed in GCC 4.4
4283 | const_value = jit_value_get_constant(value);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~/projects/go-test 6s ❯ sudo apt install gcc
[sudo] password for joetifa:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gcc is already the newest version (4:11.2.0-1ubuntu1).
gcc set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 73 not upgraded.
~/projects/go-test ❯ gcc -v
~/projects/go-test ❯
~/projects/go-test ❯ go build .
# github.com/goccy/go-jit/internal/ccall
jit-dump.c: In function ‘jit_dump_value’:
jit-dump.c:151:29: note: the ABI of passing union with ‘long double’ has changed in GCC 4.4
151 | const_value = jit_value_get_constant(value);
| ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
jit-dump.c: In function ‘dump_object_code’:
jit-dump.c:722:9: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
722 | system(cmdline);
| ^~~~~~~~~~~~~~~
jit-dump.c:725:9: warning: ignoring return value of ‘system’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
725 | system(cmdline);
| ^~~~~~~~~~~~~~~
# github.com/goccy/go-jit/internal/ccall
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit-dump.h:24,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit.h:34,
from jit-internal.h:26,
from jit-elf-read.c:23:
In function ‘read’,
inlined from ‘jit_readelf_open’ at jit-elf-read.c:877:5:
/usr/include/x86_64-linux-gnu/bits/unistd.h:38:10: warning: ‘__read_alias’ writing 48 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=]
38 | return __glibc_fortify (read, __nbytes, sizeof (char),
| ^~~~~~~~~~~~~~~
In file included from jit-elf-read.c:25:
/usr/include/x86_64-linux-gnu/bits/unistd.h: In function ‘jit_readelf_open’:
jit-elf-defs.h:91:17: note: destination object ‘e_type’ of size 2
91 | Elf64_Half e_type; /* Object file type */
| ^~~~~~
In file included from /usr/include/features.h:486,
from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
from /usr/include/stdio.h:27,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit-dump.h:24,
from ../../go/pkg/mod/github.com/goccy/[email protected]/internal/ccall/include/jit/jit.h:34,
from jit-internal.h:26,
from jit-elf-read.c:23:
/usr/include/x86_64-linux-gnu/bits/unistd.h:26:16: note: in a call to function ‘__read_alias’ declared with attribute ‘access (write_only, 2, 3)’
26 | extern ssize_t __REDIRECT (__read_alias, (int __fd, void *__buf,
| ^~~~~~~~~~
# github.com/goccy/go-jit/internal/ccall
jit-insn.c: In function ‘initialize_setjmp_block’:
jit-insn.c:7222:66: error: ‘sigsetjmp’ undeclared (first use in this function); did you mean ‘sigset_t’?
7222 | value = jit_insn_call_native(func, "sigsetjmp", (void *) sigsetjmp,
| ^~~~~~~~~
| sigset_t
jit-insn.c:7222:66: note: each undeclared identifier is reported only once for each function it appears in
jit-insn.c: In function ‘jit_insn_convert’:
jit-insn.c:4283:29: note: the ABI of passing union with ‘long double’ has changed in GCC 4.4
4283 | const_value = jit_value_get_constant(value);