Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Fix OpenBSD build. #2080

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

Conversation

g0mb4
Copy link
Contributor

@g0mb4 g0mb4 commented Nov 15, 2024

Work in progress.

Using OpenBSD 7.6.

Try to close #2073, unfortunately #2075 is not enough.

Copy link

netlify bot commented Nov 15, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit 3ad7175
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/6738eda146e35c0008925ba7

@github-actions github-actions bot added sources PR modifies project sources 3rdparty Issue or PR that suggests changes to 3rd party dependencies power Issue or PR related to battery and power management code labels Nov 15, 2024
@g0mb4 g0mb4 changed the title [WIP] Fixing OpenBSD build. [WIP] Fix OpenBSD build. Nov 15, 2024
Work in progress.
@Caellian Caellian added bug Bug report or bug fix PR os: openbsd Issue or PR related to OpenBSD labels Nov 15, 2024
@Caellian

This comment was marked as outdated.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian
Copy link
Collaborator

Referencing #2052 as cause of issues.

@g0mb4
Copy link
Contributor Author

g0mb4 commented Nov 15, 2024

I'm just running make and fixing the warnings/errors :)

I want it to compile first, then fix the issues with the other platforms.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@g0mb4
Copy link
Contributor Author

g0mb4 commented Nov 15, 2024

And yes, void f(void) is done by my autopiloted brain.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
- Fix `~` substitution.
- Add more tests for to_real_path.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added the tests Issue or PR related to project tests label Nov 15, 2024
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added the gh-actions Issue or PR that suggest changing GitHub actions label Nov 15, 2024
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
This reverts commit b8c7012.

None of the workers work "out of the box". Better to put this into a
separate PR to avoid blocking the more important one.
@github-actions github-actions bot removed the gh-actions Issue or PR that suggest changing GitHub actions label Nov 15, 2024
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian
Copy link
Collaborator

Not me telling you to reduce changes and then refactoring the whole file 😅

Uhm... got carried away, bsdapm.cc needed some love.

Cleanup bsdapm.cc

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
They need to be removed because it's a leak not to do so even if they're
not used. OpenBSD doesn't guard their creation.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added the dependencies Issue or PR that affects dependencies label Nov 16, 2024
@Caellian Caellian force-pushed the fix/openbsd76-build branch 3 times, most recently from 243d3c1 to b80dbe0 Compare November 16, 2024 05:08
OpenBSD ld doesn't include /usr/local/lib for some reason, so
using find_library is the suggested way of dealing with this. Given that
MacOS already has this explicitly written out, I'm simplifying it to FindIntl which should work as expected universally.
This should fix the ld issue for *BSD targets.

See: conan-io/conan#11688

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added the audio Issue or PR related to audacious, pulseaudio, and other audio components label Nov 16, 2024
@github-actions github-actions bot added the build system Issues and PRs related to build system (CMake) and process label Nov 16, 2024
Also simplified HAVE_SOUNDCARD_H handling because it was unnecessarily
complicated, and added an option to disable mixer support completely
because why not.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian Caellian force-pushed the fix/openbsd76-build branch 3 times, most recently from 8b795e0 to 905aa15 Compare November 16, 2024 08:21
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Per documentation:
<XXX>_LIBRARIES - only the libraries (without the '-l')
<XXX>_LINK_LIBRARIES - the libraries and their absolute paths

Using _LIBRARIES assumes that appropriate default -L arguments will be
provided by the environment/system. CMake discourages directly adding
paths with -L or link_directiories because it polutes the environment
and can cause issues. So the only way to ensure correct build on some
platforms is to use absolute paths provided by _LINK_LIBRARIES.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
It's default so it only causes compile warnings

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian
Copy link
Collaborator

I believe that pretty much covers my intent behind #2075. I'm building this from a minimal VM environment and would appreciate if you could test it @g0mb4. Feel free to implement any of the added stubs before requesting review.

For future reference (CI?), package names:

Minimal package dependencies:

  • git (to clone)
  • cmake
  • gperf
  • lua-5.3
  • X11 (comes preinstalled)
    • imlib2

Optional pkg deps:

  • cairo (if BUILD_LUA_CAIRO, BUILD_LUA_CAIRO_XLIB)
  • imlib2 (if BUILD_LUA_IMLIB2)
  • librsvg (if BUILD_LUA_RSVG)

@g0mb4
Copy link
Contributor Author

g0mb4 commented Nov 16, 2024

Wow! Thank you for the help! I'll test is as soon as possible.

g0mb4 added a commit to g0mb4/conky that referenced this pull request Nov 16, 2024
A cross-platform solution is already implemented in brndnmtthws#2080.
This PR will be rebased *after* the OpenBSD fix was merged.
_LINK_LIBRARIES is used so there will be no more -lX11 args.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rdparty Issue or PR that suggests changes to 3rd party dependencies audio Issue or PR related to audacious, pulseaudio, and other audio components bug Bug report or bug fix PR build system Issues and PRs related to build system (CMake) and process dependencies Issue or PR that affects dependencies os: openbsd Issue or PR related to OpenBSD power Issue or PR related to battery and power management code sources PR modifies project sources tests Issue or PR related to project tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: unable to build due to Vc on OpenBSD 7.6
2 participants