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

CURSES_CURSES_LIBRARY being set NOTFOUND #156

Open
sfalken opened this issue Jan 11, 2025 · 14 comments
Open

CURSES_CURSES_LIBRARY being set NOTFOUND #156

sfalken opened this issue Jan 11, 2025 · 14 comments
Labels
bug Something isn't working question Further information is requested

Comments

@sfalken
Copy link
Contributor

sfalken commented Jan 11, 2025

I'm trying to package wlmaker 0.4.1 for openSUSE, roughly adapting the rpm .spec file from Fedora:

https://src.fedoraproject.org/rpms/wlmaker/blob/rawhide/f/wlmaker.spec

But I'm hitting an error, and I'm not sure how to fix it:

[   20s] CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
[   20s] Please set them or make sure they are set and tested correctly in the CMake files:
[   20s] CURSES_CURSES_LIBRARY (ADVANCED)
[   20s]     linked by target "base" in directory /home/abuild/rpmbuild/BUILD/wlmaker-0.4.1/submodules/libbase
[   20s] 

Do you have any insight as to what might be happening here? (It's not impossible that our cmake macro within the build system may be messing with things)

@phkaeser
Copy link
Owner

Thank you for reporting!
Not sure what's causing this... do you have libncurses-dev available & installed?
And: Is there any more verbose error reporting?

@phkaeser phkaeser added bug Something isn't working question Further information is requested labels Jan 12, 2025
@sfalken
Copy link
Contributor Author

sfalken commented Jan 12, 2025

Thank you for reporting! Not sure what's causing this... do you have libncurses-dev available & installed? And: Is there any more verbose error reporting?

It's ncurses-devel in the case of openSUSE, but same difference, just naming conventions.

Here's the complete buildlog that I have available:

https://build.opensuse.org/package/live_build_log/home:sfalken/wlmaker/openSUSE_Tumbleweed/x86_64

@phkaeser
Copy link
Owner

Curious... this is from https://github.com/phkaeser/libbase/blob/main/CMakeLists.txt, and I suspect the CMake configuration may have been using some cargo cult.

Could you try editing the file there and replace:

  • CURSES_CURSES_INCLUDE_DIRS with CURSES_INCLUDE_DIR on line 112,
  • CURSES_CURSES_LIBRARY with CURSES_LIBRARY on line 114 ?

(so far, my systems hadn't shown the error, so it'd be great if you could help fixing it)

@sfalken
Copy link
Contributor Author

sfalken commented Jan 12, 2025

Making those changes, it no longer throws the error:

[   21s] CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
[   21s] Please set them or make sure they are set and tested correctly in the CMake files:
[   21s] CURSES_CURSES_LIBRARY (ADVANCED)
[   21s]     linked by target "base" in directory /home/abuild/rpmbuild/BUILD/wlmaker-0.4.1/submodules/libbase

And now the error is:

[   25s] -- Build files have been written to: /home/abuild/rpmbuild/BUILD/wlmaker-0.4.1/build
[   25s] + /usr/bin/make -O VERBOSE=1 -j16 --target doc
[   25s] /usr/bin/make: unrecognized option '--target'
[   25s] Usage: make [options] [target] ...

If I change from %cmake_build --target doc to %cmake_build

The build does start, as expected, but it fails, please see buildlog:

https://paste.opensuse.org/pastes/aef7b57cf2c5

@sfalken
Copy link
Contributor Author

sfalken commented Jan 12, 2025

I did just notice I had a typo in my sed statements, where I was setting CURSES_CURSES_INCLUDE_DIRS to CURSES_INCLUDE_DIRS rather than DIR, but fixing that didn't fix the build failure.

@phkaeser
Copy link
Owner

The curses variables should be fixed with #160.

That additional build error in https://paste.opensuse.org/pastes/aef7b57cf2c5 looks surprising, though. I noticed you're pulling in libbase in your build somehow (`/usr/lib/rpm/rpmuncompress -x /home/abuild/rpmbuild/SOURCES/libbase-27aae1898bcc9bd125f260c42c370896159afbee.tar.gz/usr/lib/rpm/rpmuncompress -x /home/abuild/rpmbuild/SOURCES/libbase-27aae1898bcc9bd125f260c42c370896159afbee.tar.gz).

Can you verify and confirm that libbase is recent? (with #160 , it should be today's https://github.com/phkaeser/libbase/ at HEAD).
The compile error appears as if it didn't include phkaeser/libbase@179fc58 yet.

@sfalken
Copy link
Contributor Author

sfalken commented Jan 13, 2025

That did the trick. Pulling from libbase HEAD, and the compile goes through just fine.

I'm not getting any docs included, but that's something I'll get sorted out.

@sfalken
Copy link
Contributor Author

sfalken commented Jan 13, 2025

That did the trick. Pulling from libbase HEAD, and the compile goes through just fine.

I'm not getting any docs included, but that's something I'll get sorted out.

Got it figured out, even though make docs still fails. (I assume that the docs just really aren't so much a thing yet)

I don't need them to get it packaged, they're just nice to have.

@phkaeser
Copy link
Owner

phkaeser commented Jan 14, 2025

Happy to hear it compiles on OpenSUSE, @sfalken !

The make doc are likely not that end-user relevant -- all it generates is the code documentation. I should probably add proper user documentation at sonme point.

Still, it shouldn't fail, unless something is missing. Could you paste the failing build log for make doc?

@sfalken
Copy link
Contributor Author

sfalken commented Jan 14, 2025

Here's a copy of the complete build log, with the flags set to enable make doc

https://build.opensuse.org/package/live_build_log/home:sfalken/wlmaker/openSUSE_Tumbleweed/x86_64

@phkaeser
Copy link
Owner

There appears to be a problem with plantuml and fontconfig:

[   26s] Generating graException in thread "main" java.lang.RuntimeException: Fontconfig head is null, check your fonts or fonts configuration
[   26s] 	at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1263)
[   26s] 	at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:221)
[   26s] 	at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:105)
[   26s] 	at java.desktop/sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:696)
[   26s] 	at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:352)
[   26s] 	at java.desktop/sun.font.SunFontManager$2.run(SunFontManager.java:309)
[   26s] 	at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
[   26s] 	at java.desktop/sun.font.SunFontManager.<init>(SunFontManager.java:309)
[   26s] 	at java.desktop/sun.awt.FcFontManager.<init>(FcFontManager.java:35)
[   26s] 	at java.desktop/sun.awt.X11FontManager.<init>(X11FontManager.java:55)
[   26s] 	at java.desktop/sun.font.PlatformFontInfo.createFontManager(PlatformFontInfo.java:37)
[   26s] 	at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:51)
[   26s] 	at java.desktop/sun.font.SunFontManager.getInstance(SunFontManager.java:242)
[   26s] 	at java.desktop/sun.font.FontDesignMetrics.getMetrics(FontDesignMetrics.java:260)
[   26s] 	at java.desktop/sun.java2d.SunGraphics2D.getFontMetrics(SunGraphics2D.java:870)
[   26s] 	at net.sourceforge.plantuml.Run.forceOpenJdkResourceLoad(Unknown Source)
[   26s] 	at net.sourceforge.plantuml.Run.main(Unknown Source)
[   26s] /home/abuild/rpmbuild/BUILD/wlmaker-0.4.1/src/toolkit/toolkit.md:256: error: Problems running PlantUML. Verify that the command 'java -jar "/usr/share/java/plantuml.jar" -h' works from the command line. Exit code: 1.

The versions for both are slightly newer than on my machine. I'm afraid I don't have an idea what's wrong there. Maybe trying whether plantuml runs in standalone?

@sfalken
Copy link
Contributor Author

sfalken commented Jan 17, 2025

I don't know if you want to add it to the checks for existing packages, but at least on openSUSE, our ghostscript-fonts or other compatible "URW Type 1 fonts" need to exist in the build environment.

I've still got the error, when it comes to packaging it into an .rpm but that's an openSUSE problem I need to solve, and not wlmakers issue. It builds fine if I just unpack the sources locally and make sure that ghostscript-fonts is installed.

@sfalken
Copy link
Contributor Author

sfalken commented Jan 17, 2025

Got it done. Just had to add a few more bits to the build environment.

Just leaving this link, mostly for folks that might be building it in non-debian/ubuntu environments, so they can see the BuildRequires: that I needed.

https://build.opensuse.org/projects/home:sfalken/packages/wlmaker/files/wlmaker.spec?expand=1

The installation locations for the icons and .desktop files isn't suitable for inclusion in the main openSUSE Repos for now, but it's packaged well enough for folks to be able to install it, and have it work.

@phkaeser
Copy link
Owner

Thank you so much for getting this to work, @sfalken !

Curious finding, about the fonts. On Debian, these fonts appear to be in package fonts-urw-base35 (formerly: gsfonts). On the automated github build, these are not even pulled in, but other fonts are.
Would be useful to flag the fonts explicitly, for people running into build issues.

(leaving open for now; I might later move that into a separate issue, since the original "curses" dependency has been fixed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants