On 3/16/21 1:10 PM, Christian Kreibich wrote:
Hey Craig,
It's been a while! :)
Yep! Thanks for the help.
On 3/16/21 10:54 AM, Craig Leres wrote:
Due to the way FreeBSD packages are built at this point zeek is
installed but in /wrkdirs/usr/ports/security/zeek/work/stage/usr/local,
not /usr/local.
As long as the configure/build process is able to find zeek-config, the
helper script that reports paths for a given Zeek installation, it
shouldn't matter where you have Zeek installed. Is
/wrkdirs/usr/ports/security/zeek/work/stage/usr/local/bin in your PATH?
zeek-config --include_dir should report the right include trees then.
It's easy enough to put zeek-config on PATH but it doesn't work because
it is configured/built to install in /usr/local but during the packaging
process it's actually installed in
/wrkdirs/usr/ports/security/zeek/work/stage/usr/local. This causes
zeek-config to report the target install dir, not the current actual dir:
zinc 60 @
/wrkdirs/usr/ports/security/zeek/work/stage/usr/local/bin/zeek-config
--include_dir
/usr/local/include:/usr/local/include/zeek:/usr/include:/usr/include:/usr/local/include::
zinc 61 @ ls /usr/local/include/zeek
ls: /usr/local/include/zeek: No such file or directory
I tried this:
post-install-NETMAP-on:
${LN} -s ../.build ${WRKSRC}/build
cd ${WRKSRC_zeek_netmap} && \
env PATH=${PATH}:${STAGEDIR}${PREFIX}/bin ./configure \
--install-root=${STAGEDIR}${PREFIX}/lib/zeek/plugins
cd ${WRKSRC_zeek_netmap}/build && make && make install
but it can't find ZeekPlugin. I suspect it's because ZeekPlugin.cmake is
in /wrkdirs/.../share/zeek/cmake and not /usr/local/share/cmake (which
is what zeek-config --cmake_dir returns).
post-install-NETMAP-on:
${LN} -s ../.build ${WRKSRC}/build
cd ${WRKSRC_zeek_netmap} && ./configure
--zeek-dist=${WRKSRC} \
--install-root=${STAGEDIR}${PREFIX}/lib/zeek/plugins
cd ${WRKSRC_zeek_netmap}/build && make && make install
This is an aside, but I'd advise against using --zeek-dist unless you
have to build without an installed Zeek tree. While it should work,
source trees shouldn't be required these days to get a build. If you
have Zeek installed and zeek-config in your path, I'd hope that a plain
./configure && cd build && make
will work. If you also need to point at an alternative location for the
Netmap headers, try --with-netmap=.
I don't understand how --with-netmap works, looking in
cmake/FindNetmap.cmake, I think it wants netmap_user.h which is present
in /usr/include... But it doesn't find it?
The constraints I'm working under are making it difficult for me to tell
cmake where to find things; when building a package, I'm prohibited from
making changes to /usr/local but I can do whatever I want to
/wrkdirs/usr/ports/security/zeek/work/stage/usr/local. And at package
install time things from there get installed in /usr/local.
Craig
_______________________________________________
zeek-dev mailing list -- zeek-dev@lists.zeek.org
To unsubscribe send an email to zeek-dev-le...@lists.zeek.org