[Bug 297072] www/qt5-webengine: fails to link with "unable to find library -levent" — unbundled libevent.gn missing lib_dirs

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jul 27 00:39:11 BST 2026


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297072

            Bug ID: 297072
           Summary: www/qt5-webengine: fails to link with "unable to find
                    library -levent" — unbundled libevent.gn missing
                    lib_dirs
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: kde at FreeBSD.org
          Reporter: transitive at gmail.com
                CC:
             Flags: maintainer-feedback?(kde at FreeBSD.org)
          Assignee: kde at FreeBSD.org

Created attachment 273203
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=273203&action=edit
Patch: add lib_dirs to unbundled libevent.gn stub

www/qt5-webengine fails to build under poudriere on FreeBSD 15.1-STABLE with:

    FAILED: [code=1] host/character_data_generator
    ld.lld: error: unable to find library -levent
    c++: error: linker command failed with exit code 1

  The system libevent LIB_DEPENDS is present and correctly resolved
  (libevent.so exists in the jail), but the linker invocation for this
  target has no -L flag pointing at /usr/local/lib at all, so it can't
  find the port's libevent.

  Root cause: build/linux/unbundle/libevent.gn (the stub used when the
  port unbundles libevent via replace_gn_files.py) sets:

    libs = [ "event" ]

  with no corresponding lib_dirs, so nothing tells the linker where to
  look for -levent. Every other unbundled system library appears to
  either use pkg_config() (which supplies -L automatically) or already
  has lib_dirs set; this one stub was missing it.

  Fix: add lib_dirs = [ "/usr/local/lib" ] to that source_set. Patch
  attached and confirmed to build successfully all the way through
  under poudriere, and the resulting package works correctly as a
  dependency for audio/musescore3 (tested: launches, note entry, audio
  playback all functional).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the kde-freebsd mailing list