Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using thirdparty/zip/miniz.h on OpenBSD with tcc #22253

Closed
lcheylus opened this issue Sep 18, 2024 · 0 comments · Fixed by #22254
Closed

Error when using thirdparty/zip/miniz.h on OpenBSD with tcc #22253

lcheylus opened this issue Sep 18, 2024 · 0 comments · Fixed by #22254
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@lcheylus
Copy link
Contributor

lcheylus commented Sep 18, 2024

Describe the bug

During build of a program using thirdparty/zip/miniz.h on OpenBSD/amd64 with tcc, it fails with builder error 'sys/utime.h' not found

Reproduction Steps

  • Build V from Git on OpenBSD/amd64 and download thirdparty/tcc for thirdparty-openbsd-amd64 branch
  • Build cmd/tools/vcompress.v with V

Expected Behavior

No error during build with thirdparty/zip/miniz.h

Current Behavior

Error with build of cmd/tools/vcompress.v with tcc (default compiler)

$ ./v cmd/tools/vcompress.v
builder error: 'sys/utime.h' not found

Possible Solution

Patch thirdparty/zip/miniz.h with defined(__OpenBSD__)

#if ( defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)) && !defined(FREEBSD)
     #include <utime.h
#else
(...)

I have a PoC with this fix => will crate PR ASAP

Additional Information/Context

No response

V version

V 0.4.7 c0f7244

Environment details (OS name and version, etc.)

./v doctor
V full version: V 0.4.7 c0f7244
OS: openbsd, 7.6, GENERIC.MP#312
Processor: 2 cpus, 64bit, little endian

getwd: /home/fox/dev/vlang.git
vexe: /home/fox/dev/vlang.git/v
vexe mtime: 2024-09-18 13:31:36

vroot: OK, value: /home/fox/dev/vlang.git
VMODULES: OK, value: /home/fox/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.46.1
Git vroot status: weekly.2024.37-17-gc0f72446 (2 commit(s) behind V master)
.git/config present: true

CC version: OpenBSD clang version 16.0.6
thirdparty/tcc status: thirdparty-openbsd-amd64 8205cc59

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@lcheylus lcheylus added the Bug This tag is applied to issues which reports bugs. label Sep 18, 2024
@lcheylus lcheylus changed the title Error when using thirdparty/zip/miniz on OpenBSD with tcc Error when using thirdparty/zip/miniz.h on OpenBSD with tcc Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant