wren-lang / wren-cli

A command line tool for the Wren programming language
MIT License
129 stars 30 forks source link

Failed to build: Error: conflicting types for ‘write’; have ‘void(WrenVM *, const char *)’ #135

Closed glyh closed 2 years ago

glyh commented 2 years ago

Installed from AUR's wren package

:: Resolving dependencies...
:: Calculating conflicts...
:: Calculating inner conflicts...

Aur (1) wren-0.4.0-1

:: Proceed to review? [Y/n]:

:: Downloading PKGBUILDs...
 (1/1) wren-0.4.0-1                                  [-----------------------------------------------------------------------]
:: Proceed with installation? [Y/n]:
fetching devel info...
==> Making package: wren 0.4.0-1 (Tue 08 Mar 2022 06:31:13 PM CST)
==> Retrieving sources...
  -> Downloading wren-0.4.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   131  100   131    0     0    149      0 --:--:-- --:--:-- --:--:--   149
100 1768k    0 1768k    0     0   641k      0 --:--:--  0:00:02 --:--:-- 1973k
  -> Downloading wren-cli-0.4.0.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
100  509k    0  509k    0     0   194k      0 --:--:--  0:00:02 --:--:--  874k
==> Validating source files with sha256sums...
    wren-0.4.0.tar.gz ... Passed
    wren-cli-0.4.0.tar.gz ... Passed
==> Making package: wren 0.4.0-1 (Tue 08 Mar 2022 06:31:20 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found wren-0.4.0.tar.gz
  -> Found wren-cli-0.4.0.tar.gz
==> Validating source files with sha256sums...
    wren-0.4.0.tar.gz ... Passed
    wren-cli-0.4.0.tar.gz ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting wren-0.4.0.tar.gz with bsdtar
==> Starting prepare()...
==> Sources are ready.
wren-0.4.0-1: parsing pkg list...
==> Making package: wren 0.4.0-1 (Tue 08 Mar 2022 06:31:23 PM CST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
make: Entering directory '/home/lyh/.cache/paru/clone/wren/src/wren-0.4.0/projects/make'
==== Building wren (release_64bit) ====
Creating obj/64bit/Release/wren
wren_compiler.c
wren_core.c
wren_debug.c
wren_opt_meta.c
wren_opt_random.c
wren_primitive.c
wren_utils.c
wren_value.c
wren_vm.c
Creating ../../lib
Linking wren
==== Building wren_shared (release_64bit) ====
Creating obj/64bit/Release/wren_shared
wren_compiler.c
wren_core.c
wren_debug.c
wren_opt_meta.c
wren_opt_random.c
wren_primitive.c
wren_utils.c
wren_value.c
wren_vm.c
Linking wren_shared
==== Building wren_test (release_64bit) ====
Creating obj/64bit/Release/wren_test
api_tests.c
benchmark.c
call.c
call_calls_foreign.c
call_wren_call_root.c
error.c
foreign_class.c
get_variable.c
handle.c
lists.c
main.c
maps.c
new_vm.c
reset_stack_after_call_abort.c
reset_stack_after_foreign_construct.c
resolution.c
slots.c
test.c
user_data.c
Creating ../../bin
Linking wren_test
make: Leaving directory '/home/lyh/.cache/paru/clone/wren/src/wren-0.4.0/projects/make'
make: Entering directory '/home/lyh/.cache/paru/clone/wren/src/wren-cli-0.4.0/projects/make'
==== Building wren_cli (release_64bit) ====
Creating obj/64bit/Release
async.c
core.c
dl.c
fs-poll.c
fs.c
getaddrinfo.c
getnameinfo.c
idna.c
inet.c
io.c
linux-core.c
linux-inotify.c
linux-syscalls.c
loop-watcher.c
loop.c
main.c
modules.c
os.c
path.c
pipe.c
poll.c
process.c
procfs-exepath.c
proctitle.c
random-devurandom.c
random-getrandom.c
random-sysctl-linux.c
random.c
repl.c
scheduler.c
signal.c
stream.c
strscpy.c
sysinfo-loadavg.c
tcp.c
thread.c
threadpool.c
timer.c
timer.c
tty.c
udp.c
uv-common.c
uv-data-getter-setters.c
version.c
vm.c
../../src/cli/vm.c:244:13: error: conflicting types for ‘write’; have ‘void(WrenVM *, const char *)’
  244 | static void write(WrenVM* vm, const char* text)
      |             ^~~~~
In file included from /usr/include/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /usr/include/sys/param.h:28,
                 from ../../deps/libuv/include/uv/unix.h:41,
                 from ../../deps/libuv/include/uv.h:66,
                 from ../../src/cli/vm.h:4,
                 from ../../src/cli/vm.c:9:
/usr/include/unistd.h:378:16: note: previous declaration of ‘write’ with type ‘ssize_t(int,  const void *, size_t)’ {aka ‘long
int(int,  const void *, long unsigned int)’}
  378 | extern ssize_t write (int __fd, const void *__buf, size_t __n) __wur
      |                ^~~~~
make[1]: *** [wren_cli.make:364: obj/64bit/Release/vm.o] Error 1
make: *** [Makefile:42: wren_cli] Error 2
make: Leaving directory '/home/lyh/.cache/paru/clone/wren/src/wren-cli-0.4.0/projects/make'
==> ERROR: A failure occurred in build().
    Aborting...
error: failed to build 'wren-0.4.0-1':
error: packages failed to build: wren-0.4.0-1
jrrom commented 2 years ago

Hello, I am also facing this issue. Have you been able to fix it?

glyh commented 2 years ago

Nope.

joshgoebel commented 2 years ago

Related: #136 I think?

dantecatalfamo commented 2 years ago

I'm having this issue too

ruby0x1 commented 2 years ago

I've merged in https://github.com/wren-lang/wren-cli/pull/136 which should help. we can reopen if still an issue!