Re: Undefined glutInit

Andrew Grace <[email protected]> Fri, 10 May 2019 11:54:59 -0400
Newsgroups gmane.comp.python.opengl.user
Message-ID <[email protected]>
--===============6144991410264457053==
Content-Type: multipart/alternative;
	boundary="Apple-Mail=_2BAADBF2-EA70-497D-A02D-E277CEEFAA2E"


--Apple-Mail=_2BAADBF2-EA70-497D-A02D-E277CEEFAA2E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

By the way, I meant this as a bug report.  Even if GLUT is not so good =
to use, it would still be good to fix this bug since a bunch of demo =
scripts won=E2=80=99t work.

Is this mailing list the right place to report a bug?  Or should I =
create an issue on github (https://github.com/mcfletch/pyopengl =
<https://github.com/mcfletch/pyopengl>)?=20

Thanks,
Andrew=20

> On May 9, 2019, at 2:36 PM, Andrew Grace <[email protected]> wrote:
>=20
> I=E2=80=99m getting this error:
>=20
> "OpenGL.error.NullFunctionError: Attempt to call an undefined function =
glutInit, check for bool(glutInit) before calling=E2=80=9D
>=20
> I=E2=80=99m using MacOS 10.13.6 High Sierra, and I=E2=80=99m getting =
the error when trying to use PyOpenGL 3.1.0.  I get the error whether =
using Python 2.7.16 or 3.7.3.
>=20
> I installed pyopengl with the command `pip install pyOpenGL` and I =
installed glut with the command `brew install freeglut`.
>=20
> I=E2=80=99m guessing that there is a library loading issue.  So, =
I=E2=80=99ll describe where the glut binaries are located.
>=20
> When freeglut gets installed, it puts a symlink into =
`/usr/local/lib/libglut.dylib` which points to where homebrew installed =
freeglut in `/usr/local/Cellar/freeglut/3.0.0/lib`.
>=20
> When I just try searching Google for the error I=E2=80=99m getting, I =
have only found Windows users discussing it.  The answers were typically =
to suggest using a precompiled wheel (that includes glut binaries) =
rather than installing it from pip, or maybe copying the glut.dll file =
into the same directory that the python program is running.  I=E2=80=99ve =
tried to copy libglut.dylib into the same directory, and I still got the =
same error.
>=20
> I tried using pudb to walk through the code and see if I could find =
anything obvious.  The line it seems to fail on is `glutInit =
special.py`.  I=E2=80=99m unfamiliar with the code, so I don=E2=80=99t =
know how to debug further.
>=20
> Please help!
>=20
> Thanks,
> Andrew


--Apple-Mail=_2BAADBF2-EA70-497D-A02D-E277CEEFAA2E
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html; =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; line-break: after-white-space;" class=3D"">By =
the way, I meant this as a bug report. &nbsp;Even if GLUT is not so good =
to use, it would still be good to fix this bug since a bunch of demo =
scripts won=E2=80=99t work.<div class=3D""><br class=3D""></div><div =
class=3D"">Is this mailing list the right place to report a bug? =
&nbsp;Or should I create an issue on github (<a =
href=3D"https://github.com/mcfletch/pyopengl" =
class=3D"">https://github.com/mcfletch/pyopengl</a>)?&nbsp;</div><div =
class=3D""><br class=3D""></div><div class=3D"">Thanks,</div><div =
class=3D"">Andrew&nbsp;</div><div class=3D""><div><br =
class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On May =
9, 2019, at 2:36 PM, Andrew Grace &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D"">I=E2=80=
=99m getting this error:<br class=3D""><br =
class=3D"">"OpenGL.error.NullFunctionError: Attempt to call an undefined =
function glutInit, check for bool(glutInit) before calling=E2=80=9D<br =
class=3D""><br class=3D"">I=E2=80=99m using MacOS 10.13.6 High Sierra, =
and I=E2=80=99m getting the error when trying to use PyOpenGL 3.1.0. =
&nbsp;I get the error whether using Python 2.7.16 or 3.7.3.<br =
class=3D""><br class=3D"">I installed pyopengl with the command `pip =
install pyOpenGL` and I installed glut with the command `brew install =
freeglut`.<br class=3D""><br class=3D"">I=E2=80=99m guessing that there =
is a library loading issue. &nbsp;So, I=E2=80=99ll describe where the =
glut binaries are located.<br class=3D""><br class=3D"">When freeglut =
gets installed, it puts a symlink into `/usr/local/lib/libglut.dylib` =
which points to where homebrew installed freeglut in =
`/usr/local/Cellar/freeglut/3.0.0/lib`.<br class=3D""><br class=3D"">When =
I just try searching Google for the error I=E2=80=99m getting, I have =
only found Windows users discussing it. &nbsp;The answers were typically =
to suggest using a precompiled wheel (that includes glut binaries) =
rather than installing it from pip, or maybe copying the glut.dll file =
into the same directory that the python program is running. &nbsp;I=E2=80=99=
ve tried to copy libglut.dylib into the same directory, and I still got =
the same error.<br class=3D""><br class=3D"">I tried using pudb to walk =
through the code and see if I could find anything obvious. &nbsp;The =
line it seems to fail on is `glutInit special.py`. &nbsp;I=E2=80=99m =
unfamiliar with the code, so I don=E2=80=99t know how to debug =
further.<br class=3D""><br class=3D"">Please help!<br class=3D""><br =
class=3D"">Thanks,<br class=3D"">Andrew</div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_2BAADBF2-EA70-497D-A02D-E277CEEFAA2E--


--===============6144991410264457053==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============6144991410264457053==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
_______________________________________________
PyOpenGL-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyopengl-users

--===============6144991410264457053==--