Skip to content

zeek-perf-support package fails to install on MacOS (Sequoia 15.4) #3

@marlitt16

Description

@marlitt16

When I try to install zeek-perf-support on my Macbook (running Sequoia 15.4) it fails:

(myenv) $ /usr/local/zeek/bin/zkg --user install zeek-perf-support
The following packages will be INSTALLED:
  zeek/zeek/zeek-perf-support (v0.6.0)

Proceed? [Y/n] Y
Running unit tests for "zeek/zeek/zeek-perf-support"
2025-04-14 14:09:20 WARNING  installing "zeek/zeek/zeek-perf-support": no __load__.zeek in implicit script_dir, skipped installing scripts
error: failed to run tests for zeek/zeek/zeek-perf-support: test_command failed with exit code 1
Proceed to install anyway? [N/y] N
Abort.

(myenv) $ /usr/local/zeek/bin/zkg --user info zeek-perf-support
"zeek/zeek/zeek-perf-support" info:
url: https://github.com/zeek/zeek-perf-support
versions: ['v0.0.1', 'v0.0.2', 'v0.1.0', 'v0.2.0', 'v0.3.0', 'v0.4.0', 'v0.5.0', 'v0.6.0']
metadata file: /Users/arlitt/.zkg/scratch/zeek-perf-support/zkg.meta
metadata (from version "v0.6.0"):
build_command = ./configure && cmake --build build
description =
summary = perf support
test_command = cd testing && btest -c btest.cfg

If I manually build zeek-perf-support it seems to work:

(myenv) $ cmake --build build
[  0%] Built target Zeek_PerfSupport_symlink
[ 25%] Building CXX object CMakeFiles/Zeek_PerfSupport.dir/src/Plugin.cc.o
[ 50%] Building C object CMakeFiles/Zeek_PerfSupport.dir/src/Trampoline.S.o
[ 75%] Linking CXX shared module lib/Zeek-PerfSupport.darwin-arm64.so
[ 75%] Built target Zeek_PerfSupport
[100%] Building binary plugin package: /Users/arlitt/Downloads/zeek-perf-support-main/build/Zeek_PerfSupport.tgz
[100%] Built target Zeek_PerfSupport_tarball

However, the tests all fail:

(myenv) $ cd testing
(myenv) $ btest -c btest.cfg
[  0%] tests.basic-test ... failed
[ 33%] tests.basic-test-zam ... failed
[ 67%] tests.show-plugin ... failed
3 of 3 tests failed

Here are the error messages reported by btest:

(myenv) $ btest -d
[  0%] tests.basic-test ... failed
  % 'bash /Users/arlitt/Downloads/zeek-perf-support-main/testing/.tmp/tests.basic-test/basic-test.sh' failed unexpectedly (exit code 1)
  % cat .stderr
  + PID=5872
  + wait 5872
  + ZEEKPERFSUPPORT=1
  + zeek -e 'event zeek_init() {}'
  error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: cannot load plugin library /Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so: dlopen(/Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so, 0x000A): symbol not found in flat namespace '__Zeek_trampoline_func_end'
  fatal error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: aborting after plugin errors

[ 33%] tests.basic-test-zam ... failed
  % 'bash /Users/arlitt/Downloads/zeek-perf-support-main/testing/.tmp/tests.basic-test-zam/basic-test-zam.sh' failed unexpectedly (exit code 1)
  % cat .stderr
  + PID=5876
  + wait 5876
  + ZEEKPERFSUPPORT=1
  + zeek -O ZAM -e 'event zeek_init() {}'
  error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: cannot load plugin library /Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so: dlopen(/Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so, 0x000A): symbol not found in flat namespace '__Zeek_trampoline_func_end'
  fatal error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: aborting after plugin errors

[ 67%] tests.show-plugin ... failed
  % 'btest-diff output' failed unexpectedly (exit code 1)
  % cat .diag
  == File ===============================
  == Diff ===============================
  --- /dev/fd/63 2025-04-14 20:59:17
  +++ /dev/fd/62 2025-04-14 20:59:17
  @@ -1,2 +0,0 @@
  -Zeek::PerfSupport - Produce map files for perf's JIT interface (dynamic, version)
  -
  =======================================

  % cat .stderr
  error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: cannot load plugin library /Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so: dlopen(/Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so, 0x000A): symbol not found in flat namespace '__Zeek_trampoline_func_end'
  fatal error in /usr/local/zeek/share/zeek/base/init-bare.zeek, line 1: aborting after plugin errors

3 of 3 tests failed

I confirmed that the file (i.e., the plugin library) in question exists:

(myenv) $ ls -l /Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so
-rwxr-xr-x@ 1 arlitt  staff  73216 Apr 14 14:58 /Users/arlitt/Downloads/zeek-perf-support-main/build//lib/Zeek-PerfSupport.darwin-arm64.so

Lastly, I should point out that I had to set up a virtual environment to get gitPython and semantic-version installed to use zkg. These are the steps that I used to create the virtual environment and install gitPython and semantic-version:
$ python3 -m venv myenv
$ source myenv/bin/activate
(myenv) $ pip3 install GitPython semantic-version

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions