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

Fix builds on MacOS Ventura #444

Merged
merged 1 commit into from
Jan 29, 2024
Merged

Conversation

deriamis
Copy link
Contributor

Apple has apparently changed the location of glut.h in recent versions of MacOS. This is a small change to get things building again on the platform.

@mohawk2
Copy link
Member

mohawk2 commented Jul 27, 2023

Since the location has only changed on MacOS, you'll need to use a #if or similar to keep it working elsewhere, not just change it globally.

@deriamis
Copy link
Contributor Author

Since the location has only changed on MacOS, you'll need to use a #if or similar to keep it working elsewhere, not just change it globally.

The change is already wrapped in an #ifdef HAVE_AGL_GLUT. My understanding is that AGL is the Apple-specific OpenGL implementation. Is this not the case?

@mohawk2
Copy link
Member

mohawk2 commented Jul 28, 2023

Ah, excellent point! Is there a version of MacOS where this changed, which could be added as a comment and/or #if-ed as well?

@coveralls
Copy link

Coverage Status

coverage: 28.887% (-0.004%) from 28.891% when pulling 6132858 on deriamis:fix-ventura-build into 91e4886 on PDLPorters:master.

@deriamis
Copy link
Contributor Author

Ah, excellent point! Is there a version of MacOS where this changed, which could be added as a comment and/or #if-ed as well?

I don't know at the moment, but I can try to find out. I'll let you know what I discover.

However, that brings up the question of what we're trying to support for builds. It may be the case that the change happened a while ago in a version Apple no longer supports. Do we still need the #if if that's the case?

@mohawk2
Copy link
Member

mohawk2 commented Jul 28, 2023

What I'm after is adding at least a comment in the .h file showing what version that new location applies from, if possible. I'm not overly concerned with support vastly far back in every possible combination of OS, version, library, etc.

@deriamis
Copy link
Contributor Author

@mohawk2 From what I'm seeing, the GLUT/glut.h include has actually been the documented (by Apple) way to use GLUT since at least 10.4, if not before. I see example code from 2005 that used it that way.

However, it looks like there was a symlink that made OpenGL/glut.h work right up until I think Sierra, if not maybe Mojave (when Apple deprecated OpenGL). In any case, this change is likely backwards-compatible farther back than we would ever need to care about.

Apple has apparently changed the location of glut.h in recent versions
of MacOS. This is a small change to get things building again on the
platform.
@mohawk2 mohawk2 merged commit 7c19f16 into PDLPorters:master Jan 29, 2024
1 of 5 checks passed
@mohawk2
Copy link
Member

mohawk2 commented Jan 29, 2024

Thank you! This will be released soon.

@mohawk2
Copy link
Member

mohawk2 commented Jan 30, 2024

This has now been released with 2.085.

@deriamis How do you feel about making a Homebrew recipe for PDL? Having had a look in the past, it doesn't seem like it should be hugely taxing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants