-
Notifications
You must be signed in to change notification settings - Fork 1
Build failure on MacOS #5
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
Comments
|
The key difference between your setup and mine is that OpenGL::GLUT's Makefile.PL on mine finds "FREEGLUT", while yours finds AGL (near the top of the gist). That's Homebrew (I think Free)GLUT, which also pulls in a dependency on XQuartz. Since it's too much to ask for you to install Homebrew, FreeGLUT, and XQuartz, it looks to me like I need to get it working on AGL (the Apple-supplied OpenGL and GLUT), which really ought to work anyway. I'm actually a little baffled that's even really a "thing", but the Perl OpenGL stuff last got worked on about 10 years ago, and I suspect the MacOS world has improved its availability of OpenGL/GLUT since. |
When I build PDL 2.090 (and prior versions as well) on my Mac, during the Makefile.PL stage I get warnings:
I think it comes from OpenGL-GLUT's Makefile.PL. In addition to the "improved availability" mentioned above, it's likely that the frameworks have moved around substantially on MacOS since that Makefile.PL was written. See for example the question, answer, and updated answers to this Stack Overflow question (which is about the headers, not the libraries). I'm not using the OpenGL or PDL::Graphics::TriD so this is not too important to me, but since I did the digging I figured I'd post the links here so that they are easily found later. |
Thank you for making the effort! I haven't forgotten about this issue. |
I fail to compile OpenGL::GLUT. |
@oalders @d-lamb @goosh-gh I've just released 0.7201, which incorporates the fix in Perl-GPU/OpenGL-GLUT#11 and I think should fix this for all of you. Could you please try it, and say here whether it did in fact work for you? |
Sorry for a long reply, hoping this helps you!!
OpenGL Test App (using hires timer) Using POGL v0.70 Installed extensions (* implemented in the module):
Using POGL v0.7 |
@goosh-gh If it's possible to upgrade to Perl 5.40, that should show far fewer warnings, which might let us see warnings which actually matter, since whatever's going wrong here is probably something simple the compiler knows about. Separately from that, the second case is actually quite good because we should be able to see exactly where it's crashing. Could you look at Perl-GPU/OpenGL-GLUT#8 to see instructions for how to build with |
Unfortunately, perl5.40.1 using perlbrew does not reduce warning with my environment (e.g. more than 5000 lines with "Wcompound-token-split-by-macro" while make), sorry I do not know the reason. I tried -d option with the test.pl as follows: Loading DB routines from perl5db.pl version 1.80 Enter h or 'h h' for help, or 'man perldebug' for more help. main::(test.pl:4): my $stat = OpenGL Test App (using hires timer) Using POGL v0.7002 Installed extensions (* implemented in the module):
Using POGL v0.7002 . . . Anything else I can do? If we need gdb enabled perl5.40.1, I will newly install it! |
Yes. The Perl version doesn't matter, don't worry. I'm still asking you to do the steps in the first comment (mine) on Perl-GPU/OpenGL-GLUT#8, and say here what the backtrace is. I requested that in my last comment here. It is still what I am asking. |
|
Apologies, I forgot that MacOS is much better with
Regarding |
|
As noted in the above-linked commit, all this time |
I re-downloaded the pogl-master today, and tried using lldb (provided by Apple at /usr/bin/lldb, instead of /opt/local/bin/lldb-19, provided by MacPorts and I used above) with the "second case" machine. The results including back trace follow (looks like basically the same?).
Is there anything else I can do to clarify the situation? |
You'll notice you're referring to You may think it's confusing and/or redundant to have two similar but not identical things. I do too, and will soon be reunifying them; but I want to get them both working properly first, which involves finding and fixing various bugs. This has included adding error-checking (which you'd think was important in a test program), which caught the wrong enum being passed, since about 2008. |
Another thing I intend to do on MacOS is to get it finding the "frameworks" as Derek highlighted; this is because the current Makefile.PL treats all of the things returned by its lib-finding function should be prefixed with |
I think I'm different hardware now, so I tested this on a newer and older iMac and both of them installed cleanly. Both are running 5.40.0 |
Transferring this to |
(
While the lldb session, I can see a separate window titled "OpenGL Test App" is successfully opened but it shows nothing |
@goosh-gh Thank you for sticking with this! I didn't fully spell it out, but will here: OpenGL::GLUT is now just part of this repo, which should simplify things a bit. The above stacktrace says to me that what's now crashing is nothing to do with GLUT, and is just Line 1624 in ed2bcc3
My latest ask is: can you please run Then, doing |
I am not sure the above process is what you really want. FYI, Anything else I can do? |
@goosh-gh The error you're getting resembles that in https://www.reddit.com/r/opengl/comments/gimkve/comment/fqha41s/ especially the address (0x3b0). That implies that a I note you're using MacPorts, which as discussed elsewhere isn't fantastic at keeping up with the latest versions of things. Are you able to switch to Homebrew, which to my mind is far superior? If not, please can you say what versions you have of:
The last one is especially important because I think with FreeGLUT as it currently is (though there's movement to actually support Cocoa, i.e. native MacOS) it uses Mesa, which uses XQuartz and this might be a bug in older Mesa that's now fixed. But first could you please start over but having installed the latest ExtUtils::MakeMaker? That has fixes for |
MacPorts latest is 24.3.4 (https://ports.macports.org/port/mesa/details/). Let's see what version we're dealing with on @goosh-gh's system! |
This machine has some old setup, as described above as the "second case". |
That's quite an old version of MacOS - I have 15.3 here. Is it possible at all to try all this code on a newer MacOS version? Or at least, with Homebrew versions of these programs rather than the MacPorts versions? EDIT And to be clear, you're still getting the same results with the latest EUMM? |
On the "first case" above;
stucks here and does not return to the command prompt, so I cannot try lldb here as reported above. But I can examine GL_VERSION after make finished;
|
@goosh-gh Could I ask you to try installing OpenGL::Modern on your two machine? That uses GLEW-like semantics and may avoid this problem. That's partly motivated because PDL is about to switch to using GLFW and OpenGL::Modern, and I aim to switch this distro over to using OpenGL::Modern "under the hood" also, so this will give me early warning of whether these problems will exist in that scenario too. |
Installation of OpenGL::Modern module did not change the situation in both cases. |
I don't know what situation you mean. Did OGL:M install OK? Its presence won't (currently) affect how "pogl" (this module) works. Could I also ask you to see if OpenGL::GLFW installs OK? |
Both OpenGL::Modern and OpenGL::GLFW were successfully installed for both machines (after installing glfw3.3.8 via macports). 'Make test' for OpenGL::GLFW showed an opengl window with a rotating triangle of rainbow color.
FWI, mesa was upgraded to 25.0.2 via macports, and above examinations were done after this upgrade. |
@goosh-gh @HaraldJoerg @shawnlaffan Could I ask you all to try the latest If not, I have a backup plan to drop FreeGLUT's teapot and use a tetrahedron, but let's see if that drastic step is needed. |
Sorry, still no luck. pogl 313d08a + freeglut 3.6, both compiled with -g:
|
I do not have Nvidia/Intel machines.
I think this version presents a good progress, |
Thank you, the tetrahedron it will be then! |
After further recent developments, the latest code apparently started working at least on Linux/NVidia, still with the teapot. I unfortunately discovered those changes had broken things on Windows, but that's now all fixed. The Linux situation required an increase of the test timeout to 8 seconds. @HaraldJoerg Could you confirm @shawnlaffan Could you try the latest, and see if this has fixed things yet? @goosh-gh I need to fix the build to find your FreeGLUT, but please could you let me know how we're doing across your range of environments? |
I can confirm: Master 8ed3e18 works for me. Tests pass, and test.pl shows the animated teapot! |
Also works on Strawberry Perl 5.40.0.1 and 5.38.0.1. |
Folks, thank you for your rapid feedback! Above all, I'm glad it works. @goosh-gh I've added the path stuff so your setups should at least get to the failures we saw with |
With the latest master, I cannot reach to make, because 'perl Makefile.PL' fails to write a Makefile on both 2 real (not virtual) machines (the Case1: Sequoia15.4, the Case2: Ventura13.7.4). I tried 2 versions of Perl (perl5.34 via macports and perl5.40.1 via perlbrew) on both cases, the results were the same.
FYI, I tried to get glversion.txt,
There are OpenGL.framework, GLUT.framework, AGL.framework folders, under /System/Library/Frameworks/, but not under /opt/local/Library/Frameworks/, on both machines. |
@goosh-gh Thank you for the detailed reporting. You're not supposed to run those sub-Makefiles yourself, as the updated files hopefully make a bit clearer. Could you try the latest EDIT: I've also added the ability on MacOS to select |
・On the machine with Sequoia15.4, Xcode16.3(16E140), MacPorts2.10.5, freeglut3.6.0 via MacPorts;
run as 'perl Makefile.PL help' to show user options found libs: Using interface: FREEGLUT resulting libs: Testing for OpenGL Extensions ... it stops here and does not return to the command prompt for at least 20min. If I skip the directory adding section (ll240 ~ ll245), it succeeds to
・On the machine with Ventura13.7.4, Xcode14.3.1(14E300c), MacPorts2.10.5; |
@goosh-gh Great to hear there is some success, thank you. Let's figure out this last little bit. I'm baffled by you saying you skipped the "directory adding" section, since lines 240-245 add libraries on Win32. Please could you check exactly what you did, and paste in here the output of |
Sorry about the wrong line number. 'perl Makefile.2.PL; make; make test` works fine showing the rotating teapot on the Sequoia machine.
Before change:
It stops here and does not return to the command prompt.
Although 'make test' works fine, I am not quite sure if it is good or bad to skip -lglut. |
The alternative way that's now possible to skip FreeGLUT is to specify You could see what's happening with that command that's hanging, by copy-pasting what it says it's trying. As you can see, it needs to run in the
I note that's quite a long line, so I'd ask you to try that as one line first, then try as two separate commands (the |
I copied into a shell script 00_test.sh and ran it. I use bash 3.2, via macports
This is what it says (where it stops). |
I copied 00_test.sh to 01_test.sh and edited 01_test.sh as not having -lgut
It returns quickly to the prompt, but fails at some functions while compiling (, probably due to missing -lglut?) |
OK, glad we've ruled out the shell as a problem. Could I ask you to try again but running the Having just checked the code, it probably won't. Therefore, I'd ask you to edit
and then please put the results here, together with the |
Without redirecting only './glversion' generated from the original glversion.c hangs and does not show anything.
it hangs here, so CTRL-C, then I got:
After the prompt came back, I tried:
I tried to uninstall and reinstall of 'freeglut' via macports, but no change. |
Thank you. Just a note on the That said, we've reach the point where POGL is successfully establishing the build environment for a simple C program to compile and link against FreeGLUT. That C program is then hanging when it calls Before we conclude that, let's check one thing: please could you run
Please note that PDL::Graphics::TriD currently relies on having FreeGLUT available, so the AGL interface here won't really help with that. However, I've just yesterday got P:G:TriD working with GLFW. As soon as I've got text rendering working (which OpenGL doesn't have natively, it's in GLX and GLUT, not GLFW), I'll be releasing that and the need for FreeGLUT will go away. After that, I'll be finishing OpenGL::Modern (which doesn't have/need GLUT support at all) and making P:G:TriD use that. |
Thank you for your instruction about how to use git. And It is really a very good news about the progress of P::G::TriD.
stops here and CTRL-C
Linking of this glvresion:
I aimed "pure macport" glversion, removing /opt/X11 and /usr/local for both -I and -L components:
It returned to the command prompt immediately. Linking by the last one:
Is the last one the same as interface=AGL? I got the utils/glversion.txt. If you need, I can paste it here, which is not short. |
Your The above extremely thorough investigation leads me to conclude that your installation of FreeGLUT, from MacPorts, is broken in some way, and you should definitely report that to MacPorts. There is nothing plausible that Perl OpenGL to fix that. The workaround for you would be to either manually install this library with However, PDL::Graphics::TriD with GLFW support has now been released to CPAN. You'll need GLFW installed (MacPorts has it, called |
https://gist.githubusercontent.com/oalders/bf99678279926568fdd02d574705489d/raw/bb556d5652585558f89e53c0c03bbf20971b60c1/gistfile1.txt shows:
The text was updated successfully, but these errors were encountered: