Gem
Gem copied to clipboard
failed to init GLEW: your system only supports openGL-1.0
I get this error on osx 10.14.6 in 64 bit Pd 0.51.0, both compiled from master and downloaded via deken.
then there are a whole bunch of: "[gemmacoswindow]: unable to switch to current window (do you have one?), cannot render!"
my configure flags (using homebrew llvm/libomp):
./configure \
--with-libvlc-CFLAGS=-I/Applications/VLC.app/Contents/MacOS/include --with-libvlc-LIBS="-L/Applications/VLC.app/Contents/MacOS/lib -lvlc" \
--with-pd=/Applications/Pd.app/Contents/Resources \
--without-QuickTime-framework --without-Carbon-framework --with-defaultwindow=gemmacoswindow \
--with-pd=/Applications/Pd-0.51-0-Next.app/Contents/Resources/src \
LDFLAGS="-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -L/usr/local/lib" \
CPPFLAGS="-I/usr/local/opt/llvm/include -I/usr/local/opt/llvm/include/c++/v1 -I/usr/local/include" \
--prefix=/Users/sebshader/Library/Pd/Gem
(I also tried gemcocoawindow) I notice that this has come up before in #204
huh, when I create it in gemmacoswindow-help it works sending [create(, but not in for instance cone-help using gemwin and gemdefaultwindow.. edit: now that's not working anymore again either.. very bizarre.. edit2: ok, if I create a gemglutwindow before the gemmacoswindow it works (Though the lines and points in cone-help are flickering a lot and "destroy" seems to freeze the window, I get the "spinning ball"), but if I create a macoswindow first and then a glutwindow it crashes pd.
One student has recently encountered this error after a macOS system upgrade (I believe upgraded to Big Sur... which was rather foolish right before exams given the heightened compatibility requirements for audio software, but, no control over that)... She had completed Gem-related homework before, but now is unable to open a Gem window, receiving the two error messages noted in this thread.
Is there any way forward?
@jamshark70 i don't really know, but she could try changing the windowing backend, by changing the gemdefaultwindow.pd
abstraction in the Gem/-folder and replacing the [gemmacoswindow]
(or whatever is there) to one of the other gem*window
options installed on your system. (just look out for any externals (.pd_darwin
,...) in the Gem/-folder that match the "gem*window" pattern).
possibly good choices are:
-
[gemglfw3window]
-
[gemglutwindow]
changing to [gemglutwindow] works... ish.... I have a simple live input delay patch for my laptop's webcam feed but when i change the delay time Pd crashes
i don't really know, but she could try changing the windowing backend, by changing the gemdefaultwindow.pd abstraction in the Gem/-folder and replacing the [gemmacoswindow] (or whatever is there) to one of the other gem*window options installed on your system.
Ok, I wrote this up for her and will wait for a reply back. Hope it works (though based on celestialtomes's comment, I'm not quite optimistic).
@celestialtomes your crash could be totally unrelated to the current issue (your variable delay could be buggy). If you don't change the delay time, does it still crash?
no it it does not crash as long as i don't change delay time
So i'd say you've successfully solved (locally) the current issue.
Your crash is another thing, so maybe you can ask help (and post your patch) elsewhere if you need, e.g in the Pd mailing list.
turns out the "your system only supports openGL-1.0" part of this is wrong since in src/Base/GemContext.cpp (and in src/Gem/Manager.cpp) it should be if (GLEW_ERROR_GL_VERSION_10_ONLY == err)
instead of just if (GLEW_ERROR_GL_VERSION_10_ONLY)
around line 156 I think. (which will always evaluate true obviously)
I think I'm getting GLEW_ERROR_NO_GL_VERSION which seems to indicate that opengl is failing to initialize. If I pop post("OpenGL version: %s", glGetString(GL_VERSION));
in there before the call to glewInit()
I get OpenGL version: (null)
. If I run it in vanilla compiled by miller I get OpenGL Version: 2.1 NVIDIA-blah
and everything works
This issue only happens with self-compiled pd (with OSX 10.14.6), using pd distributed from miller's site doesn't have this issue (even when I compile Gem myself). perhaps it has to do with the order of initialization/events of various versions of CoreFoundation or something
maybe the cocoa window isn't made before the context tries to access it? It seems like some events aren't getting to the window creation before the context is made, at least
could you try with [gemglfw3window]
? (you need to have glfw
installed before running ./configure
)
@umlaeute so far that's working fine, except that if I open certain patches from the examples folder before opening a gemwin (like from another help file) it crashes pd. (without a crash log).. for instance 02.advanced/04.Fog.pd. Many examples open fine without having opened a gemwin though..
the window also can't be closed by clicking the close button but that's not too big of a deal.
the window also can't be closed by clicking the close button but that's not too big of a deal.
that's actually a feature.
the [gemwin]
object (well, the [gemglfw3window]
object, really), emits a [window destroy(
message, that you can use to trigger a [destroy(
message to the object itself (if you actually want that).
the crash is weirder (but should probably be discussed in a separate ticket)
had the above problem ("[gemmacoswindow]: unable to switch to current window (do you have one?), cannot render!") on silicon mac m1 OS X 12.0.1 , replacing [gemmacoswindow] with [gemglfw3window] helped after installing glfw with brew, did only test some simple examples, they work, despite getting error: [gemglfw3window]: Cocoa: Failed to retrieve display name.
i hope that you only get the error message once.
also it seems that this was fixed (by just not emitting the error mesage) in upstream:https://github.com/glfw/glfw/commit/6a8ade99c753be7511c866782ef4dde1ba92cedc
in opening Gem->examples-> 01.basic->01.redSqauare.pd 3 times, but that's it. I'm using glfw 3.3.5 , thats what brew installes on my machine and tells me its up to date
dear all. i'm having troubles to get pd running on a m1 macbook. can somebody summarize what makes pd/gem work on those machines? i downloaded Pd 0.52.1, go to help/find externals online/tipe in gem and download the newest version. the iy go to "/Library/Pd/Gem/gemdefaultwindow.pd" and find this:
#N canvas 3 45 450 300 10;
#X obj 125 66 inlet;
#X obj 125 243 outlet;
#X obj 125 145 t a a;
#X obj 175 187 route bang;
#X obj 175 167 spigot;
#X obj 208 143 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 232 208 print gem\$0win;
#X obj 125 100 gemglutwindow;
#X connect 0 0 7 0;
#X connect 2 0 1 0;
#X connect 2 1 4 0;
#X connect 3 1 6 0;
#X connect 4 0 3 0;
#X connect 5 0 4 1;
#X connect 7 0 2 0;
should i change gemglutwindow to something else? do i have to recompile something and if so, where could i find instructions to do that (for somebody who hasn't done this on a mac)?
thank you very very much for any help!
see the comments above how I got it to run on an M1
seppong. thanks a lot! i replaced gemlutwindow with gemglfw3window in gemdefaultwindow.pd after installing glfw 3.3.6 with brew (brew install glfw). but still get the message "[gemmacoswindow]: unable to switch to current window (do you have one?), cannot render!" what's wrong with me ;o) i must admit that i'm a user of pd and not good programmer...
make sure to restart Pd.
if the problem persists, you might have multiple copies on your system, and modify the wrong one :-) if this is the case, start Pd in "verbose" mode (Preferences->Path, check the verbose
checkbox; restart) to see where Gem is actually loaded from, and us the gemdefaultwindow.pd
that resides besides Gem.
or just:
- create a new patch with a
[gemwin]
object - open the
[gemwin]
object (it's an abstraction) - find the
[pd window]
object (somewhere in the middle of the patch) - open the
[pd window]
object (it's a subpatch) - find the
[gemdefaultwindow]
object (somewhere in the middle of the patch) - open the
[gemdefaultwindow]
object (it's an abstraction) - find the
[gemmacoswindow]
object -
replace it with a
[gemglfw3window]
object - save the gemdefaultwindow.pd abstraction
- restart Pd & happily live after
umlaut
wow. thank you very much! but i’m still too stupid. i get the following message with this preferences (and i changed the default in both of the gems).
looks like i can't be helped ;o(
sonnige grüsse, roman
/Library/Pd/Gem/Gem.d_fat: dlopen(/Library/Pd/Gem/Gem.d_fat, 0x000A): tried: '/Library/Pd/Gem/Gem.d_fat' (fat file, but missing compatible architecture (have 'unknown,i386', need 'x86_64')), '/usr/lib/Gem.d_fat' (no such file)
GEM: Graphics Environment for Multimedia
GEM: ver: 0.94.git v0.94
GEM: compiled on Feb 12 2019
GEM: maintained by IOhannes m zmoelnig
GEM: Authors : Mark Danks (original version)
GEM: Chris Clepper
GEM: Cyrille Henry
GEM: IOhannes m zmoelnig
GEM: with help by Guenter Geiger, Daniel Heckenberg, James Tittle, Hans-Christoph Steiner, et al.
GEM: found a bug? miss a feature? please report it:
GEM: homepage https://gem.iem.at/
GEM: bug-tracker https://bugs.gem.iem.at/
GEM: mailing-list https://lists.puredata.info/listinfo/gem-dev/
GEM: compiled for MMX/SSE2 architecture
GEM: using SSE2 optimization
GEM: detected 10 CPUs
GEM: image loading plugins: magick SGI STB imageIO jpeg tiff
GEM: film loading plugins: AVF quicktime4linux
GEM: image saving plugins: SGI STB imageIO jpeg magick tiff
GEM: model loading plugins: ASSIMP3 OBJ
GEM: video record plugins: QT4L
GEM: video capture plugins: AVF decklink
sigmund~ -npts 8192 -hop 2048 -npeak 36 peaks
... couldn't create
/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin: dlopen(/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin, 0x000A): Library not loaded: @loader_path/libglfw.3.dylib
Referenced from: /Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin
Reason: tried: '/Users/romankeller/Documents/Pd/externals/Gem/libglfw.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libglfw.3.dylib' (no such file)
/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin: dlopen(/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin, 0x000A): Library not loaded: @loader_path/libglfw.3.dylib
Referenced from: /Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin
Reason: tried: '/Users/romankeller/Documents/Pd/externals/Gem/libglfw.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libglfw.3.dylib' (no such file)
/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin: dlopen(/Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin, 0x000A): Library not loaded: @loader_path/libglfw.3.dylib
Referenced from: /Users/romankeller/Documents/Pd/externals/Gem/gemglfw3window.pd_darwin
Reason: tried: '/Users/romankeller/Documents/Pd/externals/Gem/libglfw.3.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libglfw.3.dylib' (no such file)
gemglfw3window
... couldn't create
[pix_texture]: using mode 1: TEXTURE_RECTANGLE
err-corr: no such object
aye. we are getting somewhere...
it seems you do have two concurrent installations of Gem: one in /Library/Pd/Gem/
, the other in /Users/romankeller/Documents/Pd/externals/Gem/
.
and you end up using the one in /Users/romankeller/Documents/Pd/externals/Gem/
(as you should).
now the problem is, that you have an architecture mismatch: the libglfw.3.dylib
seems to be compiled for the M1 (arm64
), but Gem is compiled for x86_64
, and you cannot load an arm-binary into an intel-process (and vice-versa). that's a general limitations of cross-architecture library loading on all OSs i know of.
now, the libglfw.3.dylib
that ships with Gem is not used for whatever reasons
afaict, this also happened to @seppog , so he installed glfw3 via brew.
however, in seppo's case, (i guess) he got an x86_64-version of glfw3 (via brew), which worked; whereas you got the library for your native architecture (arm64).
so: @seppog how did you manage to get the x86_64 version? (it might be a matter of timing: e.g. installing the brew-package when there were only x86_64 pre-compiled packages available; and now there are arm64 binaries available as well). i don't know if it's possible to force brew into downloading an older version...
to be honest, I don't know, installed glfw3 dec 21 but did upgrade my brew install just recently. Brew info glfw shows:
glfw: stable 3.3.6 (bottled), HEAD
Multi-platform library for OpenGL applications
https://www.glfw.org/
/opt/homebrew/Cellar/glfw/3.3.6 (14 files, 475.8KB) *
Poured from bottle on 2021-12-20 at 22:31:27
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/glfw.rb
Am 28.02.2022 um 11:15 schrieb umläute @.***>:
aye. we are getting somewhere...
it seems you do have two concurrent installations of Gem: one in /Library/Pd/Gem/, the other in /Users/romankeller/Documents/Pd/externals/Gem/. and you end up using the one in /Users/romankeller/Documents/Pd/externals/Gem/ (as you should).
thanks for telling me. i deleted the gem in /Library/PD...
now the problem is, that you have an architecture mismatch: the libglfw.3.dylib seems to be compiled for the M1 (arm64), but Gem is compiled for x86_64, and you cannot load an arm-binary into an intel-process (and vice-versa). that's a general limitations of cross-architecture library loading on all OSs i know of.
now, the libglfw.3.dylib that ships with Gem is not used for whatever reasons afaict, this also happened to @seppog https://github.com/seppog , so he installed glfw3 via brew.
however, in seppo's case, (i guess) he got an x86_64-version of glfw3 (via brew), which worked; whereas you got the library for your native architecture (arm64).
so: @seppog https://github.com/seppog how did you manage to get the x86_64 version? (it might be a matter of timing: e.g. installing the brew-package when there were only x86_64 pre-compiled packages available; and now there are arm64 binaries available as well). i don't know if it's possible to force brew into downloading an older version…
maybe i have to wait until gem ships in arm64 then ;o(
— Reply to this email directly, view it on GitHub https://github.com/umlaeute/Gem/issues/257#issuecomment-1054098356, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUUSSVBC6HC4CGQN7OCPTDU5NDKVANCNFSM4PCXMODQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.
does this website suggest glfw to be for both plattforms?
https://formulae.brew.sh/formula/glfw
when i download the precompiled version i can select the architecture by only copying the subsequent files.
but unfortunately i don't know where to put them ;o(
https://www.glfw.org/download.html
this is totally untested, but there's some experimental universal builds (x86_64 + amd64) available at our CI
EDIT: i've fixed the broken link to the CI (originally it was ~~https://git.iem.at/pd/Gem/-/jobs/artifacts/develop/download?job=macOS~~).
dear umläute
i’m unable again. the link ends at 404 on my browser.
https://git.iem.at/pd/Gem/-/jobs/artifacts/develop/download?job=macOS https://git.iem.at/pd/Gem/-/jobs/artifacts/develop/download?job=macOS
and i can’t find it here;
https://git.iem.at/pd/Gem/-/jobs https://git.iem.at/pd/Gem/-/jobs
sunny greetings, roman
Am 28.02.2022 um 23:13 schrieb umläute @.***>:
this is totally untested, but there's some experimental universal builds (x86_64 + amd64) available at our CI https://git.iem.at/pd/Gem/-/jobs/artifacts/develop/download?job=macOS.
— Reply to this email directly, view it on GitHub https://github.com/umlaeute/Gem/issues/257#issuecomment-1054713780, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABUUSSQKFSIU7BKQUVC6QSDU5PXQJANCNFSM4PCXMODQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you commented.
sorry, i pasted the wrong link: https://git.iem.at/pd/Gem/-/jobs/artifacts/master/download?job=Darwin_snapshot
afaict, this includes universal binaries for all Gem stuff, but not for any helper libraries.
(so for (advanced) model-loading, and image-reading you might need to install additional libraries via brew
as well; glfw
you already have...)