Bug 291142 - x11/polybar doesn't compile on Freebsd 15.0
Summary: x11/polybar doesn't compile on Freebsd 15.0
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Joel Bodenmann
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-22 00:27 UTC by Philippe Michaud-Boudreault
Modified: 2025-12-04 04:12 UTC (History)
2 users (show)

See Also:
jbo: maintainer-feedback+


Attachments
build log for polybar on fbsd 15.0-stable (3.03 KB, text/plain)
2025-11-23 05:25 UTC, Philippe Michaud-Boudreault
no flags Details
Patch proposal (1.43 KB, patch)
2025-12-03 10:35 UTC, Matthieu Volat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Michaud-Boudreault 2025-11-22 00:27:54 UTC
I apologize for not providing more details here because I'm not on my FreeBSD box. But x11/polybar doesn't compile on 15.0. It is an error with a missing library not getting picked up by cmake.
Comment 1 Joel Bodenmann freebsd_committer freebsd_triage 2025-11-22 14:40:22 UTC
I'll need a couple of days to dive into this.

Could you provide a full build log?
Comment 2 Philippe Michaud-Boudreault 2025-11-23 05:25:43 UTC
Created attachment 265582 [details]
build log for polybar on fbsd 15.0-stable

This is the build log which indicates a failure in build on FBSD-15.0 STABLE.
As you can see, the cmake is not picking up library libInotify correctly, probably the version is too old?)
Comment 3 Joel Bodenmann freebsd_committer freebsd_triage 2025-12-02 10:36:04 UTC
Starting with FreeBSD 15, inotify is part of libc so the devel/libnotify dependency is no longer needed (and actually breaks the build as observed).

Patching this would consist of modifying upstream CMake to no longer run find_package(LibInotify) and removing the corresponding LIB_DEPENDS entry.
THis needs to be conditional on FreeBSD >= 15.

I won't be able to get to this the next week or two. If somebody wants to submit a patch I'll gladly review it.
Comment 4 Matthieu Volat 2025-12-03 10:35:55 UTC
Created attachment 265796 [details]
Patch proposal

Hi,

I've find this issue and looked around how other ports deal with inotify arrival, I added a patch that change:

1. libinotify now depending on the presence of /usr/include/sys/inotify.h (rather than a specific os version)
2. in polybar cmake file, same logic is applied to search or not for libinotify

Have a nice day,
Comment 5 Philippe Michaud-Boudreault 2025-12-04 04:12:29 UTC
Thank you Matt, Joel.

The issue still seems to exist after patching. Maybe I am doing something wrong(TM).

CMake Error at /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
  Could NOT find LibInotify (missing: LibInotify_INCLUDE_DIRS
  LibInotify_LIBRARIES) (found version "20240724")
Call Stack (most recent call first):
  /usr/local/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
  cmake/common/utils.cmake:61 (find_package_handle_standard_args)
  cmake/modules/FindLibInotify.cmake:10 (find_package_impl)
  cmake/libpoly.cmake:105 (find_package)
  CMakeLists.txt:57 (include)

Cheers;