zeek / spicy

C++ parser generator for dissecting protocols & files.
https://docs.zeek.org/projects/spicy
Other
246 stars 35 forks source link

Spicy 1.1.0 fails to build under FreeBSD 13-p3. #959

Closed clopmz closed 3 years ago

clopmz commented 3 years ago

Good morning,

When I try to compile spicy 1.1.0 under a FreeBSD 13 host, the following errors appears:

ninja: Entering directory `build' [6/338] cd /tmp/kk/build/hilti/runtime && /usr/local/bin/python3.8 /tmp/kk/scripts/autogen-version --header /tmp/kk/build/include/hilti/rt/autogen/version.h --git-root /tmp/kk 1.1.0-branch (72d88fbc) [291/338] Generating ../cache/spicy/precompiled_libhilti.h FAILED: cache/spicy/precompiled_libhilti.h cd /tmp/kk/build/hilti && /usr/local/bin/cmake -E env SPICY_CACHE=/tmp/kk/build/cache/spicy /tmp/kk/scripts/precompile-headers.sh --hilti-config /tmp/kk/build/bin/hilti-config Abort trap Error: could not determine location of libhilti.h [292/338] [BISON][parser_spicy] Building parser with bison 3.7.6 ninja: build stopped: subcommand failed. *** Error code 1

Stop.

I am using the following configure options:

./configure --prefix=/opt/spicy --enable-ccache --generator=Ninja

Packages installed on this host: bash-5.1.8 GNU Project's Bourne Again SHell bison-3.7.6,1 Parser generator from FSF, (mostly) compatible with Yacc ca_root_nss-3.63 Root certificate bundle from the Mozilla Project ccache-3.7.1_1 Tool to minimize the compile time of C/C++ programs cmake-3.20.4 Cross-platform Makefile generator curl-7.77.0 Command line tool and library for transferring data with URLs cvsps-2.1_2 Create patchset information from CVS expat-2.4.1 XML 1.0 parser written in C gettext-runtime-0.21 GNU gettext runtime libraries and programs git-2.32.0_1 Distributed source code management tool indexinfo-0.3.1 Utility to regenerate the GNU info page index jq-1.6 Lightweight and flexible command-line JSON processor jsoncpp-1.9.4 JSON reader and writer library for C++ lbl-cf-1.2.5 Unix time to formatted time and date filter lbl-hf-1.9 Address to hostname filter libarchive-3.5.1,1 Library to create and read several streaming archive formats libedit-3.1.20210216,1 Command line editor library libevent-2.1.12 API for executing callback functions on events or timeouts libffi-3.3_1 Foreign Function Interface libiconv-1.16 Character set conversion library liblz4-1.9.3,1 LZ4 compression library, lossless and very fast libmaxminddb-1.6.0 Library for the MaxMind DB file format used for GeoIP2 libnghttp2-1.43.0 HTTP/2.0 C Library libtextstyle-0.21 Text styling library libuv-1.41.0 Multi-platform support library with a focus on asynchronous I/O libzmq4-4.3.4 ZeroMQ core library (Version 4) m4-1.4.18_1,1 GNU M4 mpdecimal-2.5.1 C/C++ arbitrary precision decimal floating point libraries ninja-1.10.2,2 Small build system closest in spirit to Make norm-1.5r6_1 NACK-Oriented Reliable Multicast (NORM) oniguruma-6.9.7.1 Regular expressions library compatible with POSIX/GNU/Perl openpgm-5.2.122_6 Implementation of the PGM reliable multicast protocol p5-Authen-SASL-2.16_1 Perl5 module for SASL authentication p5-CGI-4.53 Handle Common Gateway Interface requests and responses p5-Clone-0.45 Recursively copy Perl datatypes p5-Digest-HMAC-1.04 Perl5 interface to HMAC Message-Digest Algorithms p5-Encode-Locale-1.05 Determine the locale encoding p5-Error-0.17029 Error/exception handling in object-oriented programming style p5-GSSAPI-0.28_1 Perl extension providing access to the GSSAPIv2 library p5-HTML-Parser-3.76 Perl5 module for parsing HTML documents p5-HTML-Tagset-3.20_1 Some useful data table in parsing HTML p5-HTTP-Date-6.05 Conversion routines for the HTTP protocol date formats p5-HTTP-Message-6.32 Representation of HTTP style messages p5-IO-HTML-1.001_1 Open an HTML file with automatic charset detection p5-IO-Socket-INET6-2.72_1 Perl module with object interface to AF_INET6 domain sockets p5-IO-Socket-SSL-2.071 Perl5 interface to SSL sockets p5-LWP-MediaTypes-6.04 Guess media type for a file or a URL p5-Mozilla-CA-20200520 Perl extension for Mozilla CA cert bundle in PEM format p5-Net-SSLeay-1.90 Perl5 interface to SSL p5-Socket6-0.29 IPv6 related part of the C socket.h defines and structure manipulators p5-TimeDate-2.33,1 Perl5 module containing a better/faster date parser for absolute dates p5-URI-5.09 Perl5 interface to Uniform Resource Identifier (URI) references pcre-8.44 Perl Compatible Regular Expressions library pcre2-10.37 Perl Compatible Regular Expressions library, version 2 perl5-5.32.1_1 Practical Extraction and Report Language pkg-1.16.3 Package manager py38-backports-1 Shared namespace shim for py-backports.* ports py38-btest-0.68 Simple driver for basic unit tests py38-configparser-3.5.3_1,1 INI style configuration file parser py38-ddt-1.4.2 Data-Driven Tests for Python Unittest py38-gitdb-4.0.7 Git Object Database py38-gitpython-3.1.18 Python Git Library py38-pyzmq-22.1.0 Python bindings for ZeroMQ py38-semantic-version-2.8.5 Python library provides a few tools to handle SemVer in Python py38-setuptools-57.0.0 Python packages installer py38-smmap-4.0.0 Sliding-window memory map manager py38-sqlite3-3.8.10_7 Standard Python binding to the SQLite3 library (Python 3.8) py38-typing-extensions-3.10.0.0 Backported and Experimental Type Hints for Python 3.5+ python38-3.8.10 Interpreted object-oriented programming language readline-8.1.1 Library for editing command lines as they are typed rhash-1.4.1 Utility and library for computing and checking of file hashes rsync-3.2.3_1 Network file distribution/synchronization utility sqlite3-3.35.5_3,1 SQL database engine in a C library swig-4.0.2 Generate wrappers for calling C/C++ code from other languages tmux-3.2a Terminal Multiplexer xxhash-0.8.0 Extremely fast non-cryptographic hash algorithm zstd-1.5.0 Fast real-time compression algorithm

Many thanks for your help

rsmmr commented 3 years ago

Please post the full configure output as well, thanks.

Also, I don't see flex in the package list, is that available?

clopmz commented 3 years ago

Yes, flex is installed:

root@zeekmgmt:/tmp # whereis flex flex: /usr/bin/flex /usr/share/man/man1/flex.1.gz root@zeekmgmt:/tmp #

configure output:

-- The ASM compiler identification is Clang -- Found assembler: /usr/bin/cc -- The C compiler identification is Clang 11.0.1 -- The CXX compiler identification is Clang 11.0.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test cxx17_works -- Performing Test cxx17_works - Success -- Found Python3: /usr/local/bin/python3.8 (found version "3.8.10") found components: Interpreter -- Found FLEX: /usr/bin/flex (found version "2.6.4") -- Found BISON: /usr/local/bin/bison (found version "3.7.6") -- Found ZLIB: /usr/lib/libz.so (found version "1.2.11") -- Looking for backtrace -- Looking for backtrace - not found -- Found Backtrace: /usr/lib/libexecinfo.so -- Disabling backtrace because we found libexecinfo -- Gold linker not available -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- comp_id=Clang -- comp_name=/usr/bin/c++ -- comp_version=11.0.1 -- Performing Test CMU_HAVE_MARCH_NATIVE -- Performing Test CMU_HAVE_MARCH_NATIVE - Success -- Performing Test CMU_HAVE_CF_PROTECTION -- Performing Test CMU_HAVE_CF_PROTECTION - Success -- Performing Test CMU_HAVE_IPA_PTA -- Performing Test CMU_HAVE_IPA_PTA - Failed -- Performing Test CMU_HAVE_FP_NO_EXCESS_PRECISION -- Performing Test CMU_HAVE_FP_NO_EXCESS_PRECISION - Failed -- Performing Test CMU_HAVE_FNO_FAST_MATH -- Performing Test CMU_HAVE_FNO_FAST_MATH - Success -- Performing Test CMU_HAVE_FNO_FFP_CONTRACT -- Performing Test CMU_HAVE_FNO_FFP_CONTRACT - Success -- Performing Test CMU_HAVE_FPMATH_SSE -- Performing Test CMU_HAVE_FPMATH_SSE - Success -- Performing Test CMU_HAVE_WARN_DATE_TIME -- Performing Test CMU_HAVE_WARN_DATE_TIME - Success -- Performing Test CMU_HAVE_UBSAN -- Performing Test CMU_HAVE_UBSAN - Success -- Performing Test CMU_HAVE_STACK_PROTECTOR_STRONG -- Performing Test CMU_HAVE_STACK_PROTECTOR_STRONG - Success -- Performing Test CMU_HAVE_STACK_CLASH_PROTECTION -- Performing Test CMU_HAVE_STACK_CLASH_PROTECTION - Success -- Found Git: /usr/local/bin/git (found version "2.32.0") -- git Version: v0.0.0 -- Version: 0.0.0 -- Performing Test HAVE_CXX_FLAG_STD_CXX11 -- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success -- Performing Test HAVE_CXX_FLAG_WALL -- Performing Test HAVE_CXX_FLAG_WALL - Success -- Performing Test HAVE_CXX_FLAG_WEXTRA -- Performing Test HAVE_CXX_FLAG_WEXTRA - Success -- Performing Test HAVE_CXX_FLAG_WSHADOW -- Performing Test HAVE_CXX_FLAG_WSHADOW - Success -- Performing Test HAVE_CXX_FLAG_WERROR -- Performing Test HAVE_CXX_FLAG_WERROR - Success -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 -- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING -- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success -- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS -- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success -- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED -- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING -- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success -- Performing Test HAVE_CXX_FLAG_WD654 -- Performing Test HAVE_CXX_FLAG_WD654 - Failed -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY -- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile -- Performing Test HAVE_CXX_FLAG_COVERAGE -- Performing Test HAVE_CXX_FLAG_COVERAGE - Success -- Performing Test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- Performing Test HAVE_STD_REGEX -- success -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- Performing Test HAVE_POSIX_REGEX -- success -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- Performing Test HAVE_STEADY_CLOCK -- success -- Check if compiler accepts -pthread -- Check if compiler accepts -pthread - yes fatal: not a git repository (or any of the parent directories): .git

====================| Spicy Build Summary |====================

Version: 1.1.0

Build type: RelWithDebInfo Build directory: /tmp/kk/build Install prefix: /opt/spicy Build shared libs: yes

Host system: FreeBSD 13.0-RELEASE-p3 (amd64) C compiler: /usr/bin/cc (Clang 11.0.1) C++ compiler: /usr/bin/c++ (Clang 11.0.1)

Building toolchain: yes Building Zeek support: no Building fuzzers: no

Use ccache: yes Use gold linker: no Use sanitizers: no Use backtrace: no

Warnings are errors: no Precompile headers: yes

Bison version: 3.7.6 CMake version: 3.20.4 Flex version: 2.6.4 Python version: 3.8.10 zlib version: 1.2.11

================================================================

-- Configuring done -- Generating done -- Build files have been written to: /tmp/kk/build

rsmmr commented 3 years ago

I just tried it with a fresh FreeBSD 13 box and can't reproduce it, it all works fine for me. I tried it with both the 1.1.0 release tarball and with current main from git. Here's what I did:

  1. Run the preparation steps from ci/prepare_freebsd.sh
  2. ./configure --prefix=/opt/spicy --enable-ccache --generator=Ninja

Output:

# ./configure --prefix=/opt/spicy --enable-ccache --generator=Ninja
-- The ASM compiler identification is Clang
-- Found assembler: /usr/bin/cc
-- The C compiler identification is Clang 11.0.1
-- The CXX compiler identification is Clang 11.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test cxx17_works
-- Performing Test cxx17_works - Success
-- Found Python3: /usr/local/bin/python3.8 (found version "3.8.10") found components: Interpreter
-- Found FLEX: /usr/bin/flex (found version "2.6.4")
-- Found BISON: /usr/local/bin/bison (found version "3.7.6")
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11")
-- Looking for backtrace
-- Looking for backtrace - not found
-- Found Backtrace: /usr/lib/libexecinfo.so
-- Disabling backtrace because we found libexecinfo
-- Gold linker not available
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- comp_id=Clang
-- comp_name=/usr/bin/c++
-- comp_version=11.0.1
-- Performing Test CMU_HAVE_MARCH_NATIVE
-- Performing Test CMU_HAVE_MARCH_NATIVE - Success
-- Performing Test CMU_HAVE_CF_PROTECTION
-- Performing Test CMU_HAVE_CF_PROTECTION - Success
-- Performing Test CMU_HAVE_IPA_PTA
-- Performing Test CMU_HAVE_IPA_PTA - Failed
-- Performing Test CMU_HAVE_FP_NO_EXCESS_PRECISION
-- Performing Test CMU_HAVE_FP_NO_EXCESS_PRECISION - Failed
-- Performing Test CMU_HAVE_FNO_FAST_MATH
-- Performing Test CMU_HAVE_FNO_FAST_MATH - Success
-- Performing Test CMU_HAVE_FNO_FFP_CONTRACT
-- Performing Test CMU_HAVE_FNO_FFP_CONTRACT - Success
-- Performing Test CMU_HAVE_FPMATH_SSE
-- Performing Test CMU_HAVE_FPMATH_SSE - Success
-- Performing Test CMU_HAVE_WARN_DATE_TIME
-- Performing Test CMU_HAVE_WARN_DATE_TIME - Success
-- Performing Test CMU_HAVE_UBSAN
-- Performing Test CMU_HAVE_UBSAN - Success
-- Performing Test CMU_HAVE_STACK_PROTECTOR_STRONG
-- Performing Test CMU_HAVE_STACK_PROTECTOR_STRONG - Success
-- Performing Test CMU_HAVE_STACK_CLASH_PROTECTION
-- Performing Test CMU_HAVE_STACK_CLASH_PROTECTION - Success
-- Found Git: /usr/local/bin/git (found version "2.32.0")
-- git Version: v0.0.0
-- Version: 0.0.0
-- Performing Test HAVE_CXX_FLAG_STD_CXX11
-- Performing Test HAVE_CXX_FLAG_STD_CXX11 - Success
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WERROR
-- Performing Test HAVE_CXX_FLAG_WERROR - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX
-- Performing Test HAVE_STD_REGEX -- success
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
fatal: not a git repository (or any of the parent directories): .git

====================|  Spicy Build Summary  |====================

Version:               1.1.0

Build type:            RelWithDebInfo
Build directory:       /home/ec2-user/1.1/build
Install prefix:        /opt/spicy
Build shared libs:     yes

Host system:           FreeBSD 13.0-RELEASE-p3 (amd64)
C compiler:            /usr/bin/cc (Clang 11.0.1)
C++ compiler:          /usr/bin/c++ (Clang 11.0.1)

Building toolchain:    yes
Building Zeek support: no
Building fuzzers:      no

Use ccache:            yes
Use gold linker:       no
Use sanitizers:        no
Use backtrace:         no

Warnings are errors:   no
Precompile headers:    yes

Bison version:         3.7.6
CMake version:         3.20.4
Flex version:          2.6.4
Python version:        3.8.10
zlib version:          1.2.11

================================================================

-- Configuring done
-- Generating done
-- Build files have been written to: /home/ec2-user/1.1/build

# cd build
# ninja
[...]
[249/249] Linking CXX executable bin/spicy-dump 

Not sure why this is not working for you?

clopmz commented 3 years ago

Yep ... I think I know where I've made the mistake ... I have not added the /proc entry in the fstab file.

Now everything works correctly ... Many thanks @rsmmr

Now, when I try to install spicy plugin using zkg, fails:

root@norway:~ # cat /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeOutput.log The system is: FreeBSD - 13.0-RELEASE-p3 - amd64 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: /usr/bin/c++ Build flags: Id flags:

The output was: 0

Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"

The CXX compiler identification is Clang, found in "/opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/3.20.4/CompilerIdCXX/a.out"

Detecting CXX compiler ABI info compiled with the following output: Change Dir: /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_84c00/fast && /usr/bin/make -f CMakeFiles/cmTC_84c00.dir/build.make CMakeFiles/cmTC_84c00.dir/build Building CXX object CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o /usr/bin/c++ -v -MD -MT CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin (in-process) "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/lib/clang/11.0.1 -dependency-file CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -o CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp clang -cc1 version 11.0.1 based upon LLVM 11.0.1 default target x86_64-unknown-freebsd13.0

include "..." search starts here:

include <...> search starts here:

/usr/include/c++/v1 /usr/lib/clang/11.0.1/include /usr/include End of search list. Linking CXX executable cmTC_84c00 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84c00.dir/link.txt --verbose=1 /usr/bin/c++ -v CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_84c00 FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe) Target: x86_64-unknown-freebsd13.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_84c00 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o

Parsed CXX implicit include dir info from above output: rv=done found start of include info found start of implicit include info add: [/usr/include/c++/v1] add: [/usr/lib/clang/11.0.1/include] add: [/usr/include] end of search list found collapse include dir [/usr/include/c++/v1] ==> [/usr/include/c++/v1] collapse include dir [/usr/lib/clang/11.0.1/include] ==> [/usr/lib/clang/11.0.1/include] collapse include dir [/usr/include] ==> [/usr/include] implicit include dirs: [/usr/include/c++/v1;/usr/lib/clang/11.0.1/include;/usr/include]

Parsed CXX implicit link information from above output: link line regex: [^( |.[/])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/]+-)?ld|collect2)[^/]*( |$)] ignore line: [Change Dir: /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp] ignore line: [] ignore line: [Run Build Command(s):/usr/bin/make -f Makefile cmTC_84c00/fast && /usr/bin/make -f CMakeFiles/cmTC_84c00.dir/build.make CMakeFiles/cmTC_84c00.dir/build] ignore line: [Building CXX object CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o] ignore line: [/usr/bin/c++ -v -MD -MT CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -MF CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o.d -o CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp] ignore line: [FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)] ignore line: [Target: x86_64-unknown-freebsd13.0] ignore line: [Thread model: posix] ignore line: [InstalledDir: /usr/bin] ignore line: [ (in-process)] ignore line: [ "/usr/bin/c++" -cc1 -triple x86_64-unknown-freebsd13.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name CMakeCXXCompilerABI.cpp -mrelocation-model static -mframe-pointer=all -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -resource-dir /usr/lib/clang/11.0.1 -dependency-file CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o.d -MT CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -sys-header-deps -internal-isystem /usr/include/c++/v1 -fdeprecated-macro -fdebug-compilation-dir /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp -ferror-limit 19 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -faddrsig -o CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -x c++ /usr/local/share/cmake/Modules/CMakeCXXCompilerABI.cpp] ignore line: [clang -cc1 version 11.0.1 based upon LLVM 11.0.1 default target x86_64-unknown-freebsd13.0] ignore line: [#include "..." search starts here:] ignore line: [#include <...> search starts here:] ignore line: [ /usr/include/c++/v1] ignore line: [ /usr/lib/clang/11.0.1/include] ignore line: [ /usr/include] ignore line: [End of search list.] ignore line: [Linking CXX executable cmTC_84c00] ignore line: [/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_84c00.dir/link.txt --verbose=1] ignore line: [/usr/bin/c++ -v CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_84c00 ] ignore line: [FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)] ignore line: [Target: x86_64-unknown-freebsd13.0] ignore line: [Thread model: posix] ignore line: [InstalledDir: /usr/bin] link line: [ "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o cmTC_84c00 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o -lc++ -lm -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o] arg [/usr/bin/ld] ==> ignore arg [--eh-frame-hdr] ==> ignore arg [-dynamic-linker] ==> ignore arg [/libexec/ld-elf.so.1] ==> ignore arg [--hash-style=both] ==> ignore arg [--enable-new-dtags] ==> ignore arg [-o] ==> ignore arg [cmTC_84c00] ==> ignore arg [/usr/lib/crt1.o] ==> obj [/usr/lib/crt1.o] arg [/usr/lib/crti.o] ==> obj [/usr/lib/crti.o] arg [/usr/lib/crtbegin.o] ==> obj [/usr/lib/crtbegin.o] arg [-L/usr/lib] ==> dir [/usr/lib] arg [CMakeFiles/cmTC_84c00.dir/CMakeCXXCompilerABI.cpp.o] ==> ignore arg [-lc++] ==> lib [c++] arg [-lm] ==> lib [m] arg [-lgcc] ==> lib [gcc] arg [--as-needed] ==> ignore arg [-lgcc_s] ==> lib [gcc_s] arg [--no-as-needed] ==> ignore arg [-lc] ==> lib [c] arg [-lgcc] ==> lib [gcc] arg [--as-needed] ==> ignore arg [-lgcc_s] ==> lib [gcc_s] arg [--no-as-needed] ==> ignore arg [/usr/lib/crtend.o] ==> obj [/usr/lib/crtend.o] arg [/usr/lib/crtn.o] ==> obj [/usr/lib/crtn.o] collapse library dir [/usr/lib] ==> [/usr/lib] implicit libs: [c++;m;gcc;gcc_s;c;gcc;gcc_s] implicit objs: [/usr/lib/crt1.o;/usr/lib/crti.o;/usr/lib/crtbegin.o;/usr/lib/crtend.o;/usr/lib/crtn.o] implicit dirs: [/usr/lib] implicit fwks: []

Performing C++ SOURCE FILE Test cxx17_already_works succeeded with the following output: Change Dir: /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make -f Makefile cmTC_2a405/fast && /usr/bin/make -f CMakeFiles/cmTC_2a405.dir/build.make CMakeFiles/cmTC_2a405.dir/build Building CXX object CMakeFiles/cmTC_2a405.dir/src.cxx.o /usr/bin/c++ -Dcxx17_already_works -std=c++17 -MD -MT CMakeFiles/cmTC_2a405.dir/src.cxx.o -MF CMakeFiles/cmTC_2a405.dir/src.cxx.o.d -o CMakeFiles/cmTC_2a405.dir/src.cxx.o -c /opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeTmp/src.cxx Linking CXX executable cmTC_2a405 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2a405.dir/link.txt --verbose=1 /usr/bin/c++ CMakeFiles/cmTC_2a405.dir/src.cxx.o -o cmTC_2a405

Source file was:

include

 int main() { std::optional<int> a; }

Command used is "zkg install zeek/zeek/spicy-plugin"

clopmz commented 3 years ago

Sorry, spicy log:

root@norway:/opt/zeek/var/lib/zkg/logs # more spicy-plugin-build.log === STDERR ===

====================| Spicy Installation Summary |====================

Found Spicy: yes

Version: () Prefix: Build type: Have toolchain: Spicy compiler:

========================================================================

====================| Zeek Installation Summary |====================

Found Zeek: yes

Version: 4.0.3 (40003) Prefix: /opt/zeek Build type: relwithdebinfo

========================================================================

CMake Error at plugin/CMakeLists.txt:162 (set_target_properties): set_target_properties Can not find target to add properties to: spicyz

====================| Spicy Zeek Plugin |====================

Version: 1.1.1 (10101) Build type: RelWithDebInfo Modules directory: /usr/local/lib/spicy/zeek/modules Scripts directory: /usr/local/lib/spicy/zeek/scripts Zeek debug build: no spicy-config: /opt/spicy/bin/spicy-config zeek-config: /opt/zeek/bin/zeek-config

========================================================================

=== STDOUT === -- The CXX compiler identification is Clang 11.0.1 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found spicy-config: /opt/spicy/bin/spicy-config -- Found Spicy: yes -- Found zeek-config: /opt/zeek/bin/zeek-config -- Found Zeek: yes -- Performing Test cxx17_already_works -- Performing Test cxx17_already_works - Success -- Found BinPAC: /opt/zeek/bin/binpac -- Found CAF: 0.18.0 found components: core io openssl -- Found Broker: /opt/zeek/lib/libbroker.so -- Zeek executable : /opt/zeek/bin/zeek -- Zeek source : -- Zeek build : -- Zeek install prefix : /opt/zeek -- Zeek plugin directory: /opt/zeek/lib/zeek/plugins -- Zeek debug mode : -- Configuring incomplete, errors occurred! See also "/opt/zeek/var/lib/zkg/testing/spicy-plugin/clones/spicy-plugin/build/CMakeFiles/CMakeOutput.log"

rsmmr commented 3 years ago

Is /opt/spicy/bin in your PATH?

clopmz commented 3 years ago

Yes. My current env variables:

addsuffix anyerror argv () autoexpand autolist ambiguous autorehash cdtohome csubstnonl cwd /root dirstack /root echo_style bsd edit euid 0 euser root filec gid 0 group wheel history 1000 home /root killring 30 loginsh mail /var/mail/root owd /tmp/oo/spicy-plugin/build/CMakeFiles path (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin /usr/local/bin /root/bin /opt/zeek/bin /opt/spicy/bin) prompt %{\e[31;1m%}%N@%m:%{\e[34m%}%~ %#%{\e[0m%} prompt2 %R? prompt3 CORRECT>%R (y|n|e|a)? promptchars %# savehist (1000 merge) shell /bin/csh shlvl 1 status 0 tcsh 6.21.00 term xterm-256color tty pts/0 uid 0 user root version tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-amd-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec

rsmmr commented 3 years ago

I have tried this as well now and it goes smoothly for me:

# zkg -vvvv install spicy-plugin
2021-07-23 06:55:31 DEBUG    init Manager version 2.11.0
2021-07-23 06:55:31 DEBUG    found source clone of "zeek" at /home/ec2-user/.zkg/clones/source/zeek
2021-07-23 06:55:31 DEBUG    getting info on "spicy-plugin"
2021-07-23 06:55:32 DEBUG    checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1"
2021-07-23 06:55:32 DEBUG    getting info on "zeek/zeek/spicy-plugin"
2021-07-23 06:55:33 DEBUG    checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1"
The following packages will be INSTALLED:
  zeek/zeek/spicy-plugin (v1.1.1)

Proceed? [Y/n]
Running unit tests for "zeek/zeek/spicy-plugin"
2021-07-23 06:55:35 DEBUG    testing "zeek/zeek/spicy-plugin"
2021-07-23 06:55:35 DEBUG    getting info on "zeek/zeek/spicy-plugin"
2021-07-23 06:55:36 DEBUG    checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1"
2021-07-23 06:55:36 DEBUG    getting info on "zeek/zeek/spicy-plugin"
2021-07-23 06:55:37 DEBUG    checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1"
2021-07-23 06:55:38 DEBUG    building "zeek/zeek/spicy-plugin": version v1.1.1
2021-07-23 06:55:38 DEBUG    building "zeek/zeek/spicy-plugin": running build_command: mkdir -p build && cd build && cmake .. && make -j "${SPICY_ZKG_PROCESSES:-4}"
2021-07-23 06:55:38 INFO     installing "zeek/zeek/spicy-plugin": writing build log: /home/ec2-user/.zkg/logs/spicy-plugin-build.log
2021-07-23 06:56:59 DEBUG    running test_command for spicy-plugin with cwd="/home/ec2-user/.zkg/testing/spicy-plugin/clones/spicy-plugin" and ZEEKPATH/BROPATH="/home/ec2-user/.zkg/testing/spicy-plugin/scripts:.:/usr/local/share/zeek:/usr/local/share/zeek/policy:/usr/local/share/zeek/site": cd tests && btest -d -j "${SPICY_ZKG_PROCESSES:-2}"
2021-07-23 06:59:53 DEBUG    installing "zeek/zeek/spicy-plugin"
Installing "zeek/zeek/spicy-plugin".2021-07-23 06:59:54 DEBUG    building "zeek/zeek/spicy-plugin": version v1.1.1
2021-07-23 06:59:54 DEBUG    building "zeek/zeek/spicy-plugin": running build_command: mkdir -p build && cd build && cmake .. && make -j "${SPICY_ZKG_PROCESSES:-4}"
2021-07-23 06:59:54 INFO     installing "zeek/zeek/spicy-plugin": writing build log: /home/ec2-user/.zkg/logs/spicy-plugin-build.log
.............................................................................2021-07-23 07:01:14 DEBUG    creating link /home/ec2-user/.zkg/clones/package/spicy-plugin/build/plugin/bin/spicyz -> /home/ec2-user/.zkg/bin/spicyz
2021-07-23 07:01:14 DEBUG    installed "zeek/zeek/spicy-plugin"

Installed "zeek/zeek/spicy-plugin" (v1.1.1)
2021-07-23 07:01:14 DEBUG    loading "zeek/zeek/spicy-plugin"
2021-07-23 07:01:14 DEBUG    loaded "zeek/zeek/spicy-plugin"
Loaded "zeek/zeek/spicy-plugin"
2021-07-23 07:01:14 DEBUG    loading "spicy-plugin"
2021-07-23 07:01:14 DEBUG    loading "spicy-plugin": already loaded

# zeek -N _Zeek::Spicy
_Zeek::Spicy - Support for Spicy parsers (*.spicy, *.evt, *.hlto) (dynamic, version 1.1.1)

What is zkg -vvvv install spicy-plugin showing for you?

clopmz commented 3 years ago

Failed:

root@norway:/tmp # zkg -vvvv install spicy-plugin 2021-07-23 07:29:20 DEBUG init Manager version 2.7.1 2021-07-23 07:29:20 DEBUG found source clone of "zeek" at /opt/zeek/var/lib/zkg/clones/source/zeek 2021-07-23 07:29:20 DEBUG getting info on "spicy-plugin" 2021-07-23 07:29:22 DEBUG checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1" 2021-07-23 07:29:22 DEBUG getting info on "zeek/zeek/spicy-plugin" 2021-07-23 07:29:24 DEBUG checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1" 2021-07-23 07:29:24 DEBUG getting info on "zeek/salesforce/hassh" 2021-07-23 07:29:24 DEBUG getting info on "zeek/salesforce/ja3" 2021-07-23 07:29:24 DEBUG getting info on "zeek/corelight/zeek-community-id" 2021-07-23 07:29:24 DEBUG getting info on "zeek/corelight/zeek-long-connections" 2021-07-23 07:29:24 DEBUG getting info on "zeek/zeek/zeek-netmap" The following packages will be INSTALLED: zeek/zeek/spicy-plugin (v1.1.1)

Proceed? [Y/n] Running unit tests for "zeek/zeek/spicy-plugin" 2021-07-23 07:29:30 DEBUG testing "zeek/zeek/spicy-plugin" 2021-07-23 07:29:30 DEBUG getting info on "zeek/zeek/spicy-plugin" 2021-07-23 07:29:32 DEBUG checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1" 2021-07-23 07:29:32 DEBUG getting info on "zeek/zeek/spicy-plugin" 2021-07-23 07:29:34 DEBUG checked out "zeek/zeek/spicy-plugin", branch/version "v1.1.1" 2021-07-23 07:29:34 DEBUG getting info on "zeek/salesforce/hassh" 2021-07-23 07:29:34 DEBUG getting info on "zeek/salesforce/ja3" 2021-07-23 07:29:34 DEBUG getting info on "zeek/corelight/zeek-community-id" 2021-07-23 07:29:34 DEBUG getting info on "zeek/corelight/zeek-long-connections" 2021-07-23 07:29:34 DEBUG getting info on "zeek/zeek/zeek-netmap" 2021-07-23 07:29:36 DEBUG building "zeek/zeek/spicy-plugin": version v1.1.1 2021-07-23 07:29:36 DEBUG building "zeek/zeek/spicy-plugin": running build_command: mkdir -p build && cd build && cmake .. && make -j "${SPICY_ZKG_PROCESSES:-4}" 2021-07-23 07:29:36 INFO installing "zeek/zeek/spicy-plugin": writing build log: /opt/zeek/var/lib/zkg/logs/spicy-plugin-build.log error: failed to run tests for zeek/zeek/spicy-plugin: package build_command failed, see log in /opt/zeek/var/lib/zkg/logs/spicy-plugin-build.log Proceed to install anyway? [N/y] Abort.

rsmmr commented 3 years ago

So no idea right now why this isn't working for you. Something's wrong with cmake looking for Spicy. For comparison, this is my build.log:

=== STDERR ===

====================|  Spicy Installation Summary  |====================

Found Spicy:           yes

Version:               1.1.0 (72d88fbc) (10100)
Prefix:                /opt/spicy
Build type:            release
Have toolchain:        yes
Spicy compiler:        /opt/spicy/bin/spicyc

========================================================================

====================|  Zeek Installation Summary  |====================

Found Zeek:            yes

Version:          4.0.2 (40002)
Prefix:           /usr/local
Build type:       release

========================================================================

====================|  Spicy Zeek Plugin  |====================

Version:               1.1.1 (10101)
Build type:            RelWithDebInfo
Modules directory:     /usr/local/lib/spicy/zeek/modules
Scripts directory:     /usr/local/lib/spicy/zeek/scripts
Zeek debug build:      no
spicy-config:          /opt/spicy/bin/spicy-config
zeek-config:           /usr/local/bin/zeek-config

========================================================================

=== STDOUT ===
-- The CXX compiler identification is Clang 11.0.1
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found spicy-config: /opt/spicy/bin/spicy-config
-- Found Spicy: yes
-- Found zeek-config: /usr/local/bin/zeek-config
-- Found Zeek: yes
-- Performing Test cxx17_already_works
-- Performing Test cxx17_already_works - Success
-- Found BinPAC: /usr/local/include/binpac
-- Found CAF: 0.18.0  found components: core io openssl
-- Found Broker: /usr/local/lib/libbroker.a
-- Zeek executable      : /usr/local/bin/zeek
-- Zeek source          :
-- Zeek build           :
-- Zeek install prefix  : /usr/local
-- Zeek plugin directory: /usr/local/lib/zeek/plugins
-- Zeek debug mode      :
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/home/ec2-user/.zkg/clones/package/spicy-plugin/build
[  0%] Built target generate_outputs
[  3%] Building CXX object compiler/CMakeFiles/zeek-compiler.dir/driver.cc.o
[  3%] Built target copy-scripts-_Zeek_Spicy
[  6%] Building CXX object compiler/CMakeFiles/zeek-compiler.dir/glue-compiler.cc.o
[ 10%] [BIFCL] Processing src/events.bif
[ 10%] Built target copy-scripts
[ 10%] Built target bif-plugin-_Zeek_Spicy-events.bif
[ 13%] [BIFCL] Processing src/functions.bif
[ 17%] [BIFCL] Processing src/consts.bif
[ 17%] Built target bif-plugin-_Zeek_Spicy-functions.bif
[ 17%] Built target bif-plugin-_Zeek_Spicy-consts.bif
[ 20%] Creating __bro_plugin__ for _Zeek::Spicy
[ 20%] Built target bif-init-_Zeek_Spicy
[ 20%] Built target bro-plugin-_Zeek_Spicy
[ 20%] Built target zeek-compiler
[ 24%] Building CXX object compiler/CMakeFiles/spicyz.dir/bin/spicyz.cc.o
[ 27%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/driver.cc.o
[ 34%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/file-analyzer.cc.o
[ 34%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/plugin.cc.o
[ 37%] Linking CXX executable ../plugin/bin/spicyz
[ 37%] Built target spicyz
[ 41%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/packet-analyzer.cc.o
[ 44%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/protocol-analyzer.cc.o
[ 48%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/runtime-support.cc.o
[ 51%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/src/zeek-reporter.cc.o
[ 55%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/consts.bif.cc.o
[ 58%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/consts.bif.init.cc.o
[ 62%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/consts.bif.register.cc.o
[ 65%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/events.bif.cc.o
[ 68%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/events.bif.init.cc.o
[ 72%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/events.bif.register.cc.o
[ 75%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/functions.bif.cc.o
[ 79%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/functions.bif.init.cc.o
[ 82%] Building CXX object plugin/CMakeFiles/_Zeek-Spicy.freebsd-amd64.dir/functions.bif.register.cc.o
[ 86%] Linking CXX shared module lib/_Zeek-Spicy.freebsd-amd64.so
[ 96%] Built target _Zeek-Spicy.freebsd-amd64
[100%] Building binary plugin package: _Zeek_Spicy.tgz
[100%] Built target dist
clopmz commented 3 years ago

Uhmm ... one second ... My spicy release is 1.1.0 ... I can try to recompile release 1.1.1

clopmz commented 3 years ago

Yep ... @rsmmr this is wrong:

Version: 1.1.1 (10101) Build type: RelWithDebInfo Modules directory: /usr/local/lib/spicy/zeek/modules Scripts directory: /usr/local/lib/spicy/zeek/scripts

My modules and scripts dirs are not located under /usr/local. They are under /opt/spicy .... Maybe is this the problem?

rsmmr commented 3 years ago

Iirc, it's picking those paths from the Zeek installation prefix (and that may have changed recently in main, need to check). But either way, I don't think this is the problem here because it doesn't even get to build the plugin in the first place (those directories will be used only during runtime).

clopmz commented 3 years ago

My Zeek install is under /opt/zeek also ....

rsmmr commented 3 years ago

Looks like it's finding a zeek-config in /usr/local/bin/zeek-config though ...

clopmz commented 3 years ago

During compilation, spicy has located zeek-config in /opt/zeek/bin/zeek-config:

-- Found zeek-config: /opt/zeek/bin/zeek-config

rsmmr commented 3 years ago

But there's a different one in /usr/local/bin/? The plugin is finding that one, maybe because of building from inside zkg. Can you remove the 2nd Zeek installation?

clopmz commented 3 years ago

No. There is no zeek-config in /usr/local:

root@norway:/opt/zeek/lib/zeek/plugins # ls -la /usr/local/zeek* ls: No match. root@norway:/opt/zeek/lib/zeek/plugins #

rsmmr commented 3 years ago

Ah, I was getting confused. Ok, then back to not knowing what's going on unfortunately, not sure what's different your system (other than the Zeek prefix, but that shouldn't matter, I'm using /opt/zeek on other systems, too)

clopmz commented 3 years ago

I will keep an eye out for future versions of spicy and see if we can get it to work under FreeBSD. In the meantime, any test needed, let me know.

Many thanks for your help @rsmmr

0xxon commented 3 years ago

No. There is no zeek-config in /usr/local:

root@norway:/opt/zeek/lib/zeek/plugins # ls -la /usr/local/zeek* ls: No match. root@norway:/opt/zeek/lib/zeek/plugins #

just to check on this again - is there perhaps a zeek-config in /usr/local/bin? It seems you only might have looked in /usr/local :)

clopmz commented 3 years ago

No. There is no any Zeek's component under /usr/local .... All Zeek software is installed under /opt/zeek.

root@norway:/usr/local/bin # ls -l total 51760 -rwxr-xr-x 1 root wheel 101 Jul 4 01:12 2to3-3.8 -rwxr-xr-x 1 root wheel 941304 Jul 4 01:13 bash -r-xr-xr-x 1 root wheel 6796 Jul 4 01:13 bashbug -r-xr-xr-x 1 root wheel 550080 Jul 4 01:12 bison -rwxr-xr-x 1 root wheel 173952 Apr 15 01:15 bsdcat -rwxr-xr-x 1 root wheel 787792 Apr 15 01:15 bsdcpio -rwxr-xr-x 1 root wheel 817576 Apr 15 01:15 bsdtar lrwxr-xr-x 1 root wheel 9 Jul 4 14:21 btest -> btest-3.8 -rwxr-xr-x 1 root wheel 84440 Jul 4 14:21 btest-3.8 lrwxr-xr-x 1 root wheel 20 Jul 4 14:21 btest-ask-update -> btest-ask-update-3.8 -rwxr-xr-x 1 root wheel 1025 Apr 16 23:22 btest-ask-update-3.8 lrwxr-xr-x 1 root wheel 16 Jul 4 14:21 btest-bg-run -> btest-bg-run-3.8 -rwxr-xr-x 1 root wheel 679 Apr 16 23:22 btest-bg-run-3.8 lrwxr-xr-x 1 root wheel 23 Jul 4 14:21 btest-bg-run-helper -> btest-bg-run-helper-3.8 -rwxr-xr-x 1 root wheel 458 Apr 16 23:22 btest-bg-run-helper-3.8 lrwxr-xr-x 1 root wheel 17 Jul 4 14:21 btest-bg-wait -> btest-bg-wait-3.8 -rwxr-xr-x 1 root wheel 3046 Apr 16 23:22 btest-bg-wait-3.8 lrwxr-xr-x 1 root wheel 14 Jul 4 14:21 btest-diff -> btest-diff-3.8 -rwxr-xr-x 1 root wheel 7621 Apr 16 23:22 btest-diff-3.8 lrwxr-xr-x 1 root wheel 18 Jul 4 14:21 btest-diff-rst -> btest-diff-rst-3.8 -rwxr-xr-x 1 root wheel 398 Apr 16 23:22 btest-diff-rst-3.8 lrwxr-xr-x 1 root wheel 18 Jul 4 14:21 btest-progress -> btest-progress-3.8 -rwxr-xr-x 1 root wheel 737 Apr 16 23:22 btest-progress-3.8 lrwxr-xr-x 1 root wheel 17 Jul 4 14:21 btest-rst-cmd -> btest-rst-cmd-3.8 -rwxr-xr-x 1 root wheel 3423 Apr 16 23:22 btest-rst-cmd-3.8 lrwxr-xr-x 1 root wheel 21 Jul 4 14:21 btest-rst-include -> btest-rst-include-3.8 -rwxr-xr-x 1 root wheel 399 Apr 16 23:22 btest-rst-include-3.8 lrwxr-xr-x 1 root wheel 18 Jul 4 14:21 btest-rst-pipe -> btest-rst-pipe-3.8 -rwxr-xr-x 1 root wheel 146 Apr 16 23:22 btest-rst-pipe-3.8 lrwxr-xr-x 1 root wheel 16 Jul 4 14:21 btest-setsid -> btest-setsid-3.8 -rwxr-xr-x 1 root wheel 146 Jul 4 14:21 btest-setsid-3.8 -r-xr-xr-x 1 root wheel 139752 Jul 2 03:03 ccache -rwxr-xr-x 1 root wheel 50920 Apr 15 01:08 ccache-swig -r-xr-xr-x 1 root wheel 2168 Jul 2 03:03 ccache-update-links -rwxr-xr-x 1 root wheel 5966728 Jul 4 01:39 ccmake -r-xr-xr-x 1 root wheel 10744 Apr 15 19:17 cf -rwxr-xr-x 1 root wheel 6261792 Jul 4 01:39 cmake -rwxr-xr-x 1 root wheel 15384 Apr 15 01:10 corelist -rwxr-xr-x 1 root wheel 6450152 Jul 4 01:39 cpack -rwxr-xr-x 1 root wheel 8369 Apr 15 01:10 cpan -rwxr-xr-x 1 root wheel 7389808 Jul 4 01:39 ctest -rwxr-xr-x 1 root wheel 168304 Jul 4 01:11 curl -r-xr-xr-x 1 root wheel 7388 Jul 4 01:11 curl-config -rwxr-xr-x 1 root wheel 6016 Jul 1 01:22 curve_keygen -r-xr-xr-x 1 root wheel 69864 Apr 15 01:08 cvsps lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 ed2k-link -> rhash lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 edonr256-hash -> rhash lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 edonr512-hash -> rhash -rwxr-xr-x 1 root wheel 41761 Apr 15 01:10 enc2xs -rwxr-xr-x 1 root wheel 3078 Apr 15 01:10 encguess -rwxr-xr-x 1 root wheel 37248 Apr 15 01:06 envsubst -r-xr-xr-x 1 root wheel 54943 Apr 15 01:07 event_rpcgen.py -rwxr-xr-x 1 root wheel 37768 Apr 15 01:06 gettext -r-xr-xr-x 1 root wheel 5188 Apr 15 01:06 gettext.sh -rwxr-xr-x 138 root wheel 3200968 Jul 4 05:16 git -rwxr-xr-x 2 root wheel 163121 Jul 4 05:16 git-cvsserver -r-xr-xr-x 1 root wheel 169099 Jul 4 05:16 git-p4.py -rwxr-xr-x 138 root wheel 3200968 Jul 4 05:16 git-receive-pack -rwxr-xr-x 2 root wheel 1720032 Jul 4 05:16 git-shell -rwxr-xr-x 138 root wheel 3200968 Jul 4 05:16 git-upload-archive -rwxr-xr-x 138 root wheel 3200968 Jul 4 05:16 git-upload-pack -r-xr-xr-x 1 root wheel 276168 Apr 15 01:12 gm4 lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 gost12-256-hash -> rhash lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 gost12-512-hash -> rhash -rwxr-xr-x 1 root wheel 29236 Apr 15 01:10 h2ph -rwxr-xr-x 1 root wheel 60943 Apr 15 01:10 h2xs lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 has160-hash -> rhash -r-xr-xr-x 1 root wheel 39872 Apr 15 15:45 hf -rwxr-xr-x 1 root wheel 25904 Apr 15 01:06 iconv -rwxr-xr-x 1 root wheel 99 Jul 4 01:12 idle3.8 -rwxr-xr-x 1 root wheel 11176 Apr 15 01:06 indexinfo -rwxr-xr-x 1 root wheel 4299 Apr 15 01:10 instmodsh -rwxr-xr-x 1 root wheel 327232 Apr 15 17:42 jq -rwxr-xr-x 1 root wheel 5001 Apr 15 01:10 json_pp -rwxr-xr-x 1 root wheel 15787 Apr 15 01:10 libnetcfg -rwxr-xr-x 1 root wheel 69744 Apr 15 01:14 lz4 lrwxr-xr-x 1 root wheel 3 Apr 15 01:14 lz4c -> lz4 lrwxr-xr-x 1 root wheel 3 Apr 15 01:14 lz4cat -> lz4 lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 magnet-link -> rhash -rwxr-xr-x 1 root wheel 16856 Jul 4 09:28 mmdblookup -rwxr-xr-x 1 root wheel 37312 Apr 15 01:06 ngettext -r-xr-xr-x 1 root wheel 210024 Jul 4 01:14 ninja -r-xr-xr-x 1 root wheel 1380 Jul 4 07:01 onig-config -r-xr-xr-x 1 root wheel 2367 Apr 15 01:08 pcre-config -r-xr-xr-x 1 root wheel 2179 Jun 3 01:14 pcre2-config -rwxr-xr-x 1 root wheel 46840 Jun 3 01:14 pcre2grep -rwxr-xr-x 1 root wheel 171432 Jun 3 01:14 pcre2test -rwxr-xr-x 1 root wheel 36720 Apr 15 01:08 pcregrep -rwxr-xr-x 1 root wheel 106928 Apr 15 01:08 pcretest -rwxr-xr-x 1 root wheel 7592 Apr 15 01:10 perl lrwxr-xr-x 1 root wheel 4 Apr 15 01:10 perl5.32.1 -> perl -rwxr-xr-x 2 root wheel 45270 Apr 15 01:10 perlbug -rwxr-xr-x 1 root wheel 274 Apr 15 01:10 perldoc -rwxr-xr-x 1 root wheel 10831 Apr 15 01:10 perlivp -rwxr-xr-x 2 root wheel 45270 Apr 15 01:10 perlthanks -rwxr-xr-x 1 root wheel 8369 Apr 15 01:10 piconv -rwxr-xr-x 1 root wheel 4545 Apr 15 01:10 pl2pm -rwxr-xr-x 1 root wheel 4146 Apr 15 01:10 pod2html -rwxr-xr-x 1 root wheel 15046 Apr 15 01:10 pod2man -rwxr-xr-x 1 root wheel 10815 Apr 15 01:10 pod2text -rwxr-xr-x 1 root wheel 3954 Apr 15 01:10 pod2usage -rwxr-xr-x 1 root wheel 3664 Apr 15 01:10 podchecker -rwxr-xr-x 1 root wheel 13667 Apr 15 01:10 prove -rwxr-xr-x 1 root wheel 3561 Apr 15 01:10 ptar -rwxr-xr-x 1 root wheel 2640 Apr 15 01:10 ptardiff -rwxr-xr-x 1 root wheel 4404 Apr 15 01:10 ptargrep -rwxr-xr-x 1 root wheel 84 Jul 4 01:12 pydoc3.8 lrwxr-xr-x 1 root wheel 9 Jul 8 15:30 python3 -> python3.8 -r-xr-xr-x 1 root wheel 5248 Jul 4 01:12 python3.8 -r-xr-xr-x 1 root wheel 3153 Jul 4 01:12 python3.8-config lrwxr-xr-x 1 root wheel 4 Jul 4 01:13 rbash -> bash -rwxr-xr-x 1 root wheel 99112 Apr 15 01:11 rhash -rwxr-xr-x 1 root wheel 461736 Jul 4 08:52 rsync -rwxr-xr-x 1 root wheel 4914 Jul 4 08:52 rsync-ssl lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 sfv-hash -> rhash -rwxr-xr-x 1 root wheel 9988 Apr 15 01:10 shasum -rwxr-xr-x 1 root wheel 19423 Apr 15 01:10 splain -rwxr-xr-x 1 root wheel 1886080 Jul 4 01:12 sqlite3 -rwxr-xr-x 1 root wheel 5533 Apr 15 01:10 streamzip -rwxr-xr-x 1 root wheel 1585304 Apr 15 01:08 swig lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 tiger-hash -> rhash -r-xr-xr-x 1 root wheel 826120 Jul 4 12:30 tmux lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 tth-hash -> rhash lrwxr-xr-x 1 root wheel 3 Apr 15 01:14 unlz4 -> lz4 lrwxr-xr-x 1 root wheel 4 Jul 4 01:17 unzstd -> zstd lrwxr-xr-x 1 root wheel 5 Apr 15 01:11 whirlpool-hash -> rhash -rwxr-xr-x 1 root wheel 32352 Jun 15 01:11 xmlwf -rwxr-xr-x 1 root wheel 5176 Apr 15 01:10 xsubpp lrwxr-xr-x 1 root wheel 6 Apr 15 07:13 xxh128sum -> xxhsum lrwxr-xr-x 1 root wheel 6 Apr 15 07:13 xxh32sum -> xxhsum lrwxr-xr-x 1 root wheel 6 Apr 15 07:13 xxh64sum -> xxhsum -rwxr-xr-x 1 root wheel 72040 Apr 15 07:13 xxhsum -rwxr-xr-x 1 root wheel 51251 Apr 15 01:10 zipdetails -rwxr-xr-x 1 root wheel 146904 Jul 4 01:17 zstd -rwxr-xr-x 1 root wheel 97128 Jul 4 01:17 zstd-frugal lrwxr-xr-x 1 root wheel 4 Jul 4 01:17 zstdcat -> zstd -rwxr-xr-x 1 root wheel 3869 May 14 14:59 zstdgrep -rwxr-xr-x 1 root wheel 30 May 14 14:59 zstdless lrwxr-xr-x 1 root wheel 4 Jul 4 01:17 zstdmt -> zstd

0xxon commented 3 years ago

weird - thank you very much.

rsmmr commented 3 years ago

I will keep an eye out for future versions of spicy and see if we can get it to work under FreeBSD. In the meantime, any test needed, let me know.

You could give current main from git a try, along also with main versions for the zkg packages (the latter need the former). There was actually quite a bit of of overhauling of the build system recently, and maybe something change sufficiently to let it now work.

rsmmr commented 3 years ago

I'll close this as we can't reproduce it. Suggest you try the recent 1.2 release and see if that changes anything for you.