Hi,
Any way to build TDE on NetBSD?
I'm getting errors about missing acl_get_perm
FAILED:
tdeio/tdeio/CMakeFiles/tdesycoca-static.dir/posixacladdons.cpp.o
/usr/bin/c++ -DHAVE_CONFIG_H -I/opt/trinity/include -I/opt/trinity/include/tqt
-I/var/shm/build/tdelibs-trinity-14.1.3/b/tdeio/tdeio
-I/var/shm/build/tdelibs-trinity-14.1.3/b/tdeio/kssl
-I/var/shm/build/tdelibs-trinity-14.1.3/b
-I/var/shm/build/tdelibs-trinity-14.1.3/tdeio/tdeio
-I/var/shm/build/tdelibs-trinity-14.1.3/b/tdecore -I/var/shm/build/tdelibs-trinity-14.1.3
-I/var/shm/build/tdelibs-trinity-14.1.3/dcop
-I/var/shm/build/tdelibs-trinity-14.1.3/libltdl
-I/var/shm/build/tdelibs-trinity-14.1.3/tdecore
-I/var/shm/build/tdelibs-trinity-14.1.3/tdecore/network
-I/var/shm/build/tdelibs-trinity-14.1.3/tdeui
-I/var/shm/build/tdelibs-trinity-14.1.3/tdeio
-I/var/shm/build/tdelibs-trinity-14.1.3/tdeio/kssl
-I/var/shm/build/tdelibs-trinity-14.1.3/interfaces
-fdebug-prefix-map=/var/shm/build/tdelibs-trinity-14.1.3=.
-fmacro-prefix-map=/var/shm/build/tdelibs-trinity-14.1.3=. -fvisibility=hidden
-fvisibility-inlines-hidden -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT
-DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -I/opt/trinity/include
-I/opt/trinity/include/tqt -include tqt.h -DTQT_NO_ASCII_CAST -DTQT_NO_STL -DTQT_NO_COMPAT
-DTQT_NO_TRANSLATION -DTQT_THREAD_SUPPORT -D_REENTRANT -include tqt.h -O2 -DNDEBUG -fPIC
-MD -MT tdeio/tdeio/CMakeFiles/tdesycoca-static.dir/posixacladdons.cpp.o -MF
tdeio/tdeio/CMakeFiles/tdesycoca-static.dir/posixacladdons.cpp.o.d -o
tdeio/tdeio/CMakeFiles/tdesycoca-static.dir/posixacladdons.cpp.o -c
/var/shm/build/tdelibs-trinity-14.1.3/tdeio/tdeio/posixacladdons.cpp
/var/shm/build/tdelibs-trinity-14.1.3/tdeio/tdeio/posixacladdons.cpp: In function
'int acl_equiv_mode(acl_t, __mode_t*)':
/var/shm/build/tdelibs-trinity-14.1.3/tdeio/tdeio/posixacladdons.cpp:201:22: error:
'acl_get_perm' was not declared in this scope; did you mean
'acl_get_permset'?
201 | if ( acl_get_perm( permset,
ACL_READ ) ) mode |= S_IRUSR;
| ^~~~~~~~~~~~
| acl_get_permset
-------------------------
If anyone is interested this was the fix. Although it is not yet mentioned in NetBSD man
pages it seems NetBSD now has acl_get_permset_np just like FreeBSD does:
https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/acl.h
tdeio/tdeio/posixacladdons.h:
-#ifdef Q_OS_FREEBSD
+#if defined Q_OS_FREEBSD || defined Q_OS_NETBSD
plus some build file tweaks:
sed -i 's/lXrender/\L\/usr\/X11R7\/lib\ \-lXrender/g' build.ninja
sed -i 's/lX11/\L\/usr\/X11R7\/lib\ \-lX11/g' build.ninja