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

projectm 4.1.4 #198257

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

eleanordoesntcode
Copy link
Contributor

Created with brew bump-formula-pr.

@github-actions github-actions bot added the bump-formula-pr PR was created using `brew bump-formula-pr` label Nov 19, 2024
@daeho-ro
Copy link
Member

For v4, we have to change the build process to use cmake and maybe there should be more dependent.

@daeho-ro daeho-ro added the build failure CI fails while building the software label Nov 20, 2024
@eleanordoesntcode
Copy link
Contributor Author

Yeah dw, I've managed to get a reliable build process, I've asked for a test program from them since I don't know much the project

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Nov 20, 2024
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. To keep this pull request open, add a help wanted or in progress label.

@github-actions github-actions bot added the stale No recent activity label Nov 23, 2024
@eleanordoesntcode
Copy link
Contributor Author

not stale. in progress

@github-actions github-actions bot removed the stale No recent activity label Nov 24, 2024
@daeho-ro daeho-ro added the in progress Stale bot should stay away label Nov 24, 2024
@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Nov 26, 2024
@daeho-ro daeho-ro force-pushed the bump-projectm-4.1.2 branch from 9e5121c to 4fcb9d9 Compare December 7, 2024 07:21
@github-actions github-actions bot removed automerge-skip `brew pr-automerge` will skip this pull request autosquash Automatically squash pull request commits according to Homebrew style. labels Dec 7, 2024
@daeho-ro
Copy link
Member

daeho-ro commented Dec 7, 2024

I have tried to pass the test but got an error, projectM instance creation failed.

@eleanordoesntcode
Copy link
Contributor Author

Can't currently contribute to fixing the tests, I do not have access to my main machine (motherboard died) with the environment I created and it would probably take hours to get everything working. I'll get back to this once I get my machine back.

@eleanordoesntcode
Copy link
Contributor Author

I got my computer back, but my brew installation was wiped, so it's going to take me a while to contribute again.

@daeho-ro daeho-ro added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Dec 16, 2024
@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Dec 22, 2024
@eleanordoesntcode eleanordoesntcode changed the title projectm 4.1.2 projectm 4.1.3 Dec 22, 2024
@daeho-ro daeho-ro force-pushed the bump-projectm-4.1.2 branch from 08d8682 to f6153e2 Compare December 29, 2024 09:39
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Dec 29, 2024
@daeho-ro daeho-ro force-pushed the bump-projectm-4.1.2 branch 2 times, most recently from 280fd66 to c8bb1f9 Compare December 29, 2024 10:33
@daeho-ro
Copy link
Member

opengl is not linked well.

  ==> pkgconf --cflags --libs projectM-4 sdl2
  Package opengl was not found in the pkg-config search path.
  Perhaps you should add the directory containing `opengl.pc'
  to the PKG_CONFIG_PATH environment variable
  Package 'opengl', required by 'projectM-4', not found

@eleanordoesntcode
Copy link
Contributor Author

I'm not sure the OpenGL that ships with macOS has a .pc file, as macOS does not include pkg-config by default.
This is why I had disabled the flags for projectM iirc, we can always add them manually if needed.

@cho-m cho-m added the upstream issue An upstream issue report is needed label Dec 31, 2024
@eleanordoesntcode
Copy link
Contributor Author

I've found myself less and less motivated to try to get back at this PR again, so unless someone manifests themselves to take it over and complete the work I'll be closing it in a few days.

@daeho-ro daeho-ro removed the in progress Stale bot should stay away label Jan 19, 2025
@daeho-ro daeho-ro added the help wanted Task(s) needing PRs from the community or maintainers label Jan 19, 2025
@SMillerDev
Copy link
Member

I added a commit that resolves the pkgconf situation, but I can't get the test binary to work either. I think upstream needs to help here, since as far as I can tell there is just no way to get this working on macOS.

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Jan 19, 2025
@eleanordoesntcode
Copy link
Contributor Author

pinging @kblaschke since he's the owner of the project and probably knows what's wrong with this

@SMillerDev
Copy link
Member

macOS seems to print: " projectM instance creation failed: "
Linux just fails to compile.

@kblaschke
Copy link

kblaschke commented Jan 20, 2025

Yup, my bad! Issue was fixed in master long ago (using a function introduced in core OpenGL 4.2), but I seemingly failed to backport the fix to the 4.1 release branch.

Did that now, opened PR projectM-visualizer/projectm#866 and will create a 4.1.4 release once this fix is merged.

@kblaschke
Copy link

I've just released a fixed version: https://github.com/projectM-visualizer/projectm/releases/tag/v4.1.4

If you bump the brew formula directly to 4.1.4, skipping 4.1.3, it should now compile & run properly on macOS/OpenGL 4.1.

@kblaschke
Copy link

kblaschke commented Jan 24, 2025

Note that this issue here might also affect some users when using pkgconfig to resolve package dependencies for projectM: projectM-visualizer/projectm#868

I've only seen this while adding a vcpkg port for projectm. A fix for this will be released in v4.1.5, probably due in early March.

If you already want to patch it in the formula, just apply this diff here:

--- src/libprojectM/CMakeLists.txt      2025-01-24 16:19:05.235818993 +0100
+++ src/libprojectM/CMakeLists.txt        2025-01-24 16:18:52.445824000 +0100
@@ -212,7 +212,9 @@
 
         set(PKGCONFIG_PACKAGE_NAME "${PROJECTM_LIBRARY_BASE_OUTPUT_NAME}")
         set(PKGCONFIG_PACKAGE_DESCRIPTION "projectM Music Visualizer")
-        set(PKGCONFIG_PACKAGE_REQUIREMENTS_ALL "opengl")
+        if(NOT APPLE)
+            set(PKGCONFIG_PACKAGE_REQUIREMENTS_ALL "opengl")
+        endif()
 
         generate_pkg_config_files(projectM ${PROJECTM_LIBRARY_BASE_OUTPUT_NAME})
 

@eleanordoesntcode
Copy link
Contributor Author

I'll add this later, currently I'm sick and it's exam period for me so I'm kinda busy

@SMillerDev
Copy link
Member

Linux now passes, but doesn't actually run the executable because it's headless. macOS still fails with:

projectM instance creation failed:

projectm_handle pm = projectm_create();
if (pm == NULL)
{
fprintf(stderr, "projectM instance creation failed: %s", SDL_GetError());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kblaschke is this the correct function to get information on the project-m failure here?

Copy link

@kblaschke kblaschke Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, since projectM internally doesn't use SDL, this won't give you a usable feedback, if any.

We're planning to add a proper logging/debug API for the v4.2 release, which will make debugging such issues much easier. So for now, the usual GL things apply:

  • Check if the GL context created by SDL is valid and made current (via SDL_GL_MakeCurrent())
  • Make sure the GL context's core profile is set to at least 3.3 core before creating the context/window via:
      SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
      SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
      SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
    AFAIR macOS by default creates a 1.1 or 2.x context for compatibility.
  • Check the GL version (3.3 or higher) and shading language (3.30 or higher) via glGetString(GL_VERSION) and glGetString(GL_SHADING_LANGUAGE_VERSION)
  • Make sure that the terminal the homebrew test script runs in is attached to a UI session on macOS (e.g. not run via SSH)

If all these checks pass and the problem persists, it can help compiling projectM with the DEBUG and MILKDROP_PRESET_DEBUG preprocessor defines set, which will enable additional output to stdout, like shader compilation errors etc. - those messages will later be available over the new logging API in v4.2.

@iMichka iMichka changed the title projectm 4.1.3 projectm 4.1.4 Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosquash Automatically squash pull request commits according to Homebrew style. build failure CI fails while building the software bump-formula-pr PR was created using `brew bump-formula-pr` CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. help wanted Task(s) needing PRs from the community or maintainers upstream issue An upstream issue report is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants