netatalk icon indicating copy to clipboard operation
netatalk copied to clipboard

meson: Build fails on NetBSD

Open rdmark opened this issue 1 year ago • 3 comments

I can't seem to build with meson on NetBSD anymore. Oddly enough the vmactions build passes, and I'm using the exact same set of packages and setup command locally. Haven't figured out what the difference is, yet.

meson setup build \
              -Dpkg_config_path=/usr/pkg/lib/pkgconfig \
              -Dwith-dtrace=false \
              -Dwith-embedded-ssl=true \
              -Dwith-init-style=netbsd
localhost# ninja -C build
ninja: Entering directory `build'
[1/232] Compiling C object libatalk/acl/libacl.a.p/unix.c.o
FAILED: libatalk/acl/libacl.a.p/unix.c.o
cc -Ilibatalk/acl/libacl.a.p -Ilibatalk/acl -I../libatalk/acl -I. -I.. -Iinclude -I../include -Ietc/afpd -I../etc/afpd -I/usr/pkg/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -DHAVE_CONFIG_H '-D_U_=__attribute__((unused))' -Wno-pedantic -Wno-extra -Wno-all -Wno-deprecated-declarations -fPIC -MD -MQ libatalk/acl/libacl.a.p/unix.c.o -MF libatalk/acl/libacl.a.p/unix.c.o.d -o libatalk/acl/libacl.a.p/unix.c.o -c ../libatalk/acl/unix.c
In file included from ../libatalk/acl/unix.c:17:0:
./config.h:700:10: fatal error: wolfssl/options.h: No such file or directory
 #include <wolfssl/options.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/232] Compiling C object libatalk/acl/libacl.a.p/uuid.c.o
FAILED: libatalk/acl/libacl.a.p/uuid.c.o
cc -Ilibatalk/acl/libacl.a.p -Ilibatalk/acl -I../libatalk/acl -I. -I.. -Iinclude -I../include -Ietc/afpd -I../etc/afpd -I/usr/pkg/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -DHAVE_CONFIG_H '-D_U_=__attribute__((unused))' -Wno-pedantic -Wno-extra -Wno-all -Wno-deprecated-declarations -fPIC -MD -MQ libatalk/acl/libacl.a.p/uuid.c.o -MF libatalk/acl/libacl.a.p/uuid.c.o.d -o libatalk/acl/libacl.a.p/uuid.c.o -c ../libatalk/acl/uuid.c
In file included from ../libatalk/acl/uuid.c:16:0:
./config.h:700:10: fatal error: wolfssl/options.h: No such file or directory
 #include <wolfssl/options.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/232] Compiling C object libatalk/acl/libacl.a.p/cache.c.o
FAILED: libatalk/acl/libacl.a.p/cache.c.o
cc -Ilibatalk/acl/libacl.a.p -Ilibatalk/acl -I../libatalk/acl -I. -I.. -Iinclude -I../include -Ietc/afpd -I../etc/afpd -I/usr/pkg/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Wpedantic -std=c11 -O0 -g -DHAVE_CONFIG_H '-D_U_=__attribute__((unused))' -Wno-pedantic -Wno-extra -Wno-all -Wno-deprecated-declarations -fPIC -MD -MQ libatalk/acl/libacl.a.p/cache.c.o -MF libatalk/acl/libacl.a.p/cache.c.o.d -o libatalk/acl/libacl.a.p/cache.c.o -c ../libatalk/acl/cache.c
In file included from ../libatalk/acl/cache.c:16:0:
./config.h:700:10: fatal error: wolfssl/options.h: No such file or directory
 #include <wolfssl/options.h>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

rdmark avatar May 18 '24 12:05 rdmark

Hmm, not sure what's going on here. Just tested this exact config on my NetBSD VM and everything compiles fine.

ghost avatar May 19 '24 07:05 ghost

Thanks for testing. There must be something environmental in my VM...

rdmark avatar May 19 '24 07:05 rdmark

@dgsga So the direct reason this is happening, seems to be because build/include/wolfssl/options.h doesn't get created. Could be a corner case meson bug? I'm using 1.4.0 on this NetBSD system.

As a side note, even if you disable bundled wolfssl om the build system, the resulting generated config.h still imports <wolfssl/options.h> ... is this the expected behavior?

rdmark avatar May 19 '24 12:05 rdmark

I think the reason this is happening only in my setup, is because my NetBSD system seems to lack ACL libraries/headers (not sure why.) The lack of ACL libraries shouldn't cause such a build error...

rdmark avatar May 24 '24 09:05 rdmark

https://github.com/Netatalk/netatalk/pull/1022 took care of this issue!

rdmark avatar May 24 '24 22:05 rdmark