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

Problems building bench under Debian 12 - Cross compilation for macos, windows and linux #3

Open
ikks opened this issue Nov 25, 2024 · 0 comments

Comments

@ikks
Copy link

ikks commented Nov 25, 2024

Hi there, I'm using Debian 12 and zig 0.13.0. I'm aiming to use the library in linux, windows and mac.

Follows the command and the output.

$ zig build bench
bench
└─ run lmdb-benchmark
   └─ zig build-exe lmdb-benchmark ReleaseFast native 4 errors
/home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb/midl.c:20:10: error: 'string.h' file not found
#include <string.h>
         ^~~~~~~~~~~
/home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb/mdb.c:65:10: error: 'sys/types.h' file not found
#include <sys/types.h>
         ^~~~~~~~~~~~~~
src/c.zig:1:20: error: C import failed
pub usingnamespace @cImport(@cInclude("lmdb.h"));
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/c.zig:1:20: note: libc headers not available; compilation does not link against libc
/home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb/lmdb.h:168:10: error: 'sys/types.h' file not found
#include <sys/types.h>
         ^
error: warning(compilation): failed to delete '/home/igor/playground/zig/lmdb-options/canvasxyz/.zig-cache/tmp/cce456769bf165c8-midl.o.d': FileNotFound
warning(compilation): failed to delete '/home/igor/playground/zig/lmdb-options/canvasxyz/.zig-cache/tmp/f15034eb7731d9b8-mdb.o.d': FileNotFound

error: the following command failed with 4 compilation errors:
/home/igor/playground/zig/zig-linux-x86_64-0.13.0/zig build-exe -OReleaseFast --dep lmdb -Mroot=/home/igor/playground/zig/lmdb-options/canvasxyz/benchmarks/main.zig /home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb/mdb.c /home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb/midl.c -I /home/igor/.cache/zig/p/12209bfdbf43d479c2cac0ca2212853ab2136f1621f49461f62c7932a7819bc29110/libraries/liblmdb -Mlmdb=/home/igor/playground/zig/lmdb-options/canvasxyz/src/lib.zig --cache-dir /home/igor/playground/zig/lmdb-options/canvasxyz/.zig-cache --global-cache-dir /home/igor/.cache/zig --name lmdb-benchmark --listen=- 
Build Summary: 0/3 steps succeeded; 1 failed (disable with --summary none)
bench transitive failure
└─ run lmdb-benchmark transitive failure
   └─ zig build-exe lmdb-benchmark ReleaseFast native 4 errors
error: the following build command failed with exit code 1:
/home/igor/playground/zig/lmdb-options/canvasxyz/.zig-cache/o/d709ac4d9cd9a9cf1e041c0c09d79661/build /home/igor/playground/zig/zig-linux-x86_64-0.13.0/zig /home/igor/playground/zig/lmdb-options/canvasxyz /home/igor/playground/zig/lmdb-options/canvasxyz/.zig-cache /home/igor/.cache/zig --seed 0xd4f977a9 -Za75cec1866d5e065 bench
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant