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

Gem won't work in Pd-0.51-4 Next #3

Closed
MikeMorenoDSP opened this issue Mar 22, 2021 · 10 comments
Closed

Gem won't work in Pd-0.51-4 Next #3

MikeMorenoDSP opened this issue Mar 22, 2021 · 10 comments

Comments

@MikeMorenoDSP
Copy link

Hello,

First, thanks Seb for saving my eyes, the background color trick in Pd-0.51 isn't working anymore, so I resorted to Pd-next.
Long overdue for me, but it is amazing.

So, Gem loads fine, and I can create objects, but it won't let gemwin create a window, don't know why.
It works fine with regular pd vanilla 0.51-4.

When I try to create a window appears on the console:

[gemmacoswindow]: failed to init GLEW: your system only supports openGL-1.0
[gemmacoswindow]: unable to switch to current window (do you have one?), cannot render!

Any clues?
Thanks again! :)

@sebshader
Copy link
Owner

sebshader commented Mar 22, 2021

Hi @MikeMorenoDSP. Unfortunately, Pd vanilla compiled on my system (OSX 10.14.6) has this issue as well. It must have to do with the newer vs. older MacOs compiler/command line tools/system libraries somehow.

I've run into this issue before with Gem I compiled myself as well, as have others (can't remember if it was with Pd compiled myself or not. edit: it probably was). umlaeute/Gem#257 umlaeute/Gem#204 umlaeute/Gem#263.

It seems like if either Gem or Pd is compiled on a newer mac it will not work. (there are some workarounds in those threads but it sounds like they aren't completely stable)

maybe it has something to do with OSX deprecating OpenGL in mojave..
we might have luck with Pd-next compiled on an older osx platform (10.9-10.13 perhaps?).. I tried compiling with "-mmacosx-version-min=10.6" and that didn't work..
I don't know all that much about it but Ophelia is working fine, not sure what the difference is there.. perhaps the version of glew just hasn't been updated to a recent enough version to compile right for modern macs in GEM umlaeute/Gem#264

anyhow this is mainly a Gem issue imo, since it is an issue regardless of pd version (it just has to do with which OS Pd and/or Gem was compiled on.) For instance I get this same error with the current distribution of the current Pd-ceammc pre-release. Maybe if Pd-Next were compiled on an older OS (like miller's OSX used for Pd-vanilla distribution) it would work.

so really the resolution is to get Gem to work when linked against modern osx system libraries, but compiling pd-next on osx <= 10.13 might work as well (I think 10.9-10.13 are probably safest with modern tk)

@sebshader
Copy link
Owner

sebshader commented Mar 23, 2021

I managed to compile GEM again and it worked with pd-vanilla, which leads me to believe that it's the OS that pd is compiled with that's the factor, and not the OS that GEM is compiled with. (but it still pretty much has to be fixed in GEM I think)

@60-hz
Copy link

60-hz commented Oct 20, 2021

It's possible to use gem by replacing [gemmacoswindow] with [gemglfw3window] in [gemwin] but then there are many strange problems with this windows manager (viewport is only visible in 1/4 of the screen, single buffering don't work etc...)

Is there any easy way to fix this? I failed to compile pd-next with those output:

x_misc.c:861:5: error: implicit declaration of function 'closebang_setup' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
closebang_setup();
^
x_misc.c:861:5: note: did you mean 'loadbang_setup'?
x_misc.c:121:13: note: 'loadbang_setup' declared here
static void loadbang_setup(void)
^
x_misc.c:862:5: error: implicit declaration of function 'initbang_setup' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
initbang_setup();
^
x_misc.c:862:5: note: did you mean 'loadbang_setup'?
x_misc.c:121:13: note: 'loadbang_setup' declared here
static void loadbang_setup(void)
^
2 errors generated.
make[2]: *** [pd-x_misc.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

@sebshader
Copy link
Owner

@60-hz oh I missed that. For me those are warnings, not errors (due to some different compiler flags no doubt).
Anyways, it should be fixed in the "next" (default) branch now

@60-hz
Copy link

60-hz commented Oct 20, 2021

Ok great, it compile now ;)

But when I launch pd then I have empty patch, no boxes and this message:

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
2021-10-20 23:40:02.844 Wish[44557:1010230] CoreText note: Client requested name ".SFNSMono-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].
2021-10-20 23:40:02.844 Wish[44557:1010230] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2021-10-20 23:40:02.845 Wish[44557:1010230] CoreText note: Client requested name ".SF NS Mono", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].

@sebshader
Copy link
Owner

sebshader commented Oct 20, 2021

@60-hz are you launching pd from the command line executable without it being in an app?
Usually on osx it is packaged into an app, and these days tcl/tk/wish 8.6.10 is packaged/used.
See the ./osx-app.sh script in the mac folder for using the default tcl/tk/wish, or you can also use ./tcltk-wish.sh script to download/use a different version of wish (I distribute Next with 8.6.11, though there are some issues with the helpbrowser updating as well as the issue with transparent checkboxes you noticed with properties for ceammc objects. So for stability I would recommend 8.6.10 which is the default/included when you run ./osx-app.sh)

@60-hz
Copy link

60-hz commented Oct 20, 2021

Wow thank you @sebshader, it works now ;)
Edit: I have re-compiled Gem and I can use [gemmacoswindow] with pdnext now.

But I have some blinky / choppy animation on the screen... so still searching a way to make it work with pdnext!

@sebshader
Copy link
Owner

sebshader commented Oct 20, 2021

@60-hz I have had many issues with GEM as well (as documented in the issues linked above), I don't think those issues are specific to pd-next though. just any pd compiled on modern osx unfortunately.
edit: I don't think [gemmacoswindow] is the recommended one anymore, I think you're supposed to use [gemglfw3window] now. More info in the GEM issues

@60-hz
Copy link

60-hz commented Oct 20, 2021

Yes. The problem is that as stated here, [gemglfw3window] only display viewport one quarter of the screen on modern apple computers...

As pd-vanilla from Miller puckette website works well with [gemmacoswindow] and gem from deken repository, I try to make pd-next works the same. But its a real mess...

@sebshader
Copy link
Owner

sebshader commented Oct 20, 2021

@60-hz I think the only practical way would be to compile Pd on an older Mac machine. Seems like Miller uses MacOS 10.9ish?
Other than that, you have to get into configuring GLEW/OpenGL stuff I think. But OpenGL & graphics cards might be too integrated into the OSX system to change idk. (the OpenGL compatibility might be in system libraries/compile toolchains and such. Maybe if you get an older version of Xcode/command line tools?)

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

No branches or pull requests

3 participants