RJVB / macstrop

RJVB's repository of alternative macports, with ports missing from or overriding those in the standard collection, including a set of KF5 ports.
20 stars 9 forks source link

kf5-kwayland requires wayland to be upgraded #89

Closed 21stcaveman closed 2 years ago

21stcaveman commented 2 years ago

I'm running into an issue while building kf5-kwayland, where build fails with a lot of these errors :

[  2%] Generating wayland-fake-input-protocol.c
cd /opt/local/var/macports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-kwayland/work/build/src/client && /opt/local/bin/wayland-scanner public-code /opt/local/var/macports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-kwayland/work/kwayland-5.60.0/src/client/protocols/fake-input.xml /opt/local/var/macports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-kwayland/work/build/src/client/wayland-fake-input-protocol.c
usage: wayland-scanner [OPTION] [client-header|server-header|code] [input_file output_file]

Converts XML protocol descriptions supplied on stdin or input file to client
headers, server headers, or protocol marshalling code.

options:
    -h,  --help                  display this help and exit.
    -v,  --version               print the wayland library version that
                                 the scanner was built against.
    -c,  --include-core-only     include the core version of the headers,
                                 that is e.g. wayland-client-core.h instead
                                 of wayland-client.h.

I have wayland @1.13.0_1 installed.

Seems like the "public-code" option was introduced in wayland 1.14 with this commit

RJVB commented 2 years ago

On Friday December 10 2021 13:40:20 Hamid wrote:

I have wayland @1.13.0_1 installed.

Seems like the "public-code" option was introduced in wayland 1.14 with this commit

This is weird, because kwayland 5.60.0 claims it needs only wayland 1.13 . I find no evidence of "public-code" in the source or my build tree. I'll try to rebuild the port on my end and see what gives, but I may need you to try and figure out where the "public-code" reference comes from. 1st thing to do would be

> fgrep public-code -R `port work kf5-kwayland`/build`

to see if it's given explicitly in one of the build commands. It isn't on my end (not even on my Linux machine where I did update port:wayland to 1.18).

I didn't upgrade it on Mac because patching out all code that cannot run (or replacing it with suitable "null code") is a lot of work. You may have caught wind that someone has been porting Wayland to Mac, so I hope to start tinkering with that as my new year's intentions ;)

21stcaveman commented 2 years ago

You may have caught wind that someone has been porting Wayland to Mac, so I hope to start tinkering with that as my new year's intentions ;)

I had not, that's good to know! I certainly appreciate your work and look forward to it :)

I tried grep -winr "public-code" /opt/local/var/macports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-kwayland/work/kwayland-5.60.0/ and it returns nothing. However, I can see 'public-code' showing up in /opt/local/var/macports/build/_opt_local_site-ports_kf5_KF5-Frameworks/kf5-kwayland/work/build/src/client/CMakeFiles/KF5WaylandClient.dir/build.make after the configure step.

So I looked, and followed the clues to find ecm_add_wayland_client_protocol, and I finally got to this

Which does seem like the culprit.

RJVB commented 2 years ago

So I looked, and followed the clues to find ecm_add_wayland_client_protocol, and I finally got to this

Which does seem like the culprit.

Good find, but that change was only made just before the 5.89.0 release: https://github.com/KDE/extra-cmake-modules/commit/04f4675cbb874b53f4e6024ecea5b0d9c472bf7c

Did you update your extra-cmake-modules port?

RJVB commented 2 years ago

If you did update port:kde-extra-cmake-modules, it should be easy to prevent the problem; revert the change referenced in my previous comment. That one was clearly made with KDE's usual "let's not bother with backwards compatibility" state of mind.

21stcaveman commented 2 years ago

sorry, was down a couple of days due to covid booster symptoms! I had to reinstall kde-extra-cmake-modules after upgrade to Monterey, I'm running 5.86.0 :

sudo port installed | grep kde-extra-cmake-modules
  kde-extra-cmake-modules @5.75.0_0
  kde-extra-cmake-modules @5.86.0_0 (active)

funny thing is, I can track that change back to version 5.81.0-rc1!! if you download the code from github , and look at 'FindWaylandScanner.cmake', public-code is there!

21stcaveman commented 2 years ago

I just changed 'public-code' to 'code' in 'FindWaylandScanner.cmake' on my system, and all else is good on 5.86.0 :)) I'll close this then, thanks.

RJVB commented 2 years ago

kde-extra-cmake-modules @5.86.0_0 (active)

This... My own version has been at 5.80.0 since Aug 23rd 2021 (#f6fa3e09e5fbdac8412de95da8ed428021cbe18f), so how come you're at that newer version?

I was going to propose the change you just made, so if you updated the port you probably should make a patch for it, and mention it in a comment in the wayland Portfile.

21stcaveman commented 2 years ago

This... My own version has been at 5.80.0 since Aug 23rd 2021 (#f6fa3e09e5fbdac8412de95da8ed428021cbe18f), so how come you're at that newer version?

Turns out, they upgraded the port in main macports repo to 5.86.0 on October 3rd. I see you are the maintainer for this port there as well.. check it out

RJVB commented 2 years ago

Ah, right, and I wasn't informed of this, great. Thanks for letting me know!

RJVB commented 2 years ago

FYI, I've upgraded my port:kde-extra-cmake-modules .