Error message from SUMA (part of science/afni) ** ERROR: glwMDrawingAreaWidgetClass is NULL This might be an error in GLwDrawA.h where the class is not referenced using 'extern'. An alternative is to use the local build of libGLws.a. Adding extern to the declaration in /usr/local/include/GL/GLwDrawA.h did eliminate the error. Would probably do the same for glwDrawingAreaWidgetClass.
Hi! I haven't looked at the details, but assuming this is from mesa, I don't want to change those headers unless it is first changed (or slated to be changed) upstream.
Thanks for the feedback. Out of curiosity, do you see any specific problems with using extern? It seems like an innocuous change to me, but there might be some nuance I'm overlooking. It also seems improper to define a variable in a header file without extern, but again I'm open to the possibility that there may be a good reason for it. Cheers, JB
Yes, AFNI is a rare application still using Motif. I think the problem may be a failure of the logic defining GLAPI in /usr/local/include/GL/gl.h. I think it should expand to "extern" in GLwDrawA.h. I also think it needs to be defined in GLwDrawA.c if properly declared as extern in the header. A recursive grep of the code revealed no other definitions.
One more thing that might be noteworthy: There appear to be only 5 ports dependent on libGLw: FreeBSD cray.acadix bacon ~ 1005: port-grep glw databases/grass7/Makefile:MOTIF_USE= GL=glw databases/grass7/Makefile:MOTIF_CONFIGURE_ON= --with-motif --with-glw games/critterding/Makefile: ${WRKSRC}/src/gui/textprinter.cpp ${WRKSRC}/src/gl/glwindow.cpp graphics/inventor/Makefile:USE_GL= gl glu glw graphics/libGLw/Makefile:MASTER_SITES= ftp://ftp.freedesktop.org/pub/mesa/glw/ graphics/libGLw/Makefile:DISTNAME= glw-${PORTVERSION} science/afni/Makefile:USE_GL= gl glu glw science/xmakemol/Makefile:USE_GL= glut glw The last distfile is from 2012, so I don't think this will be fixed upstream.
Created attachment 206308 [details] Update libGLw with patches from upstream Hi! Sorry for sitting on this for so long. Can you try the attached patch, that pulls in two fixes from upstream. As a side note, libGLw has been deprecated upstream, so support is very limited, and it should probably be deprecated in FreeBSD ports at some point as well.
Seems to work now, but I'll continue to use AFNI's bundled GLw since the port may be deprecated soon. Thanks, JB
A commit references this bug: Author: zeising Date: Thu Aug 15 14:37:14 UTC 2019 New revision: 508996 URL: https://svnweb.freebsd.org/changeset/ports/508996 Log: graphics/libGLw: Fix extern visibility Import upstream patches to graphics/libGLw to fix extern visibility of some symbols. While here, also add a patch to fix a typo. These patches pulls libGLw on par with upstream git master. PR: 237917 Reported by: Jason W. Bacon MFH: 2019Q3 (fixes issues in other ports) Changes: head/graphics/libGLw/Makefile head/graphics/libGLw/files/ head/graphics/libGLw/files/patch-b060a07.c head/graphics/libGLw/files/patch-c4f7cdf.c
A commit references this bug: Author: zeising Date: Thu Aug 15 14:43:51 UTC 2019 New revision: 508997 URL: https://svnweb.freebsd.org/changeset/ports/508997 Log: MFH: r508996 graphics/libGLw: Fix extern visibility Import upstream patches to graphics/libGLw to fix extern visibility of some symbols. While here, also add a patch to fix a typo. These patches pulls libGLw on par with upstream git master. PR: 237917 Reported by: Jason W. Bacon Approved by: ports-secteam (joneum) Changes: _U branches/2019Q3/ branches/2019Q3/graphics/libGLw/Makefile branches/2019Q3/graphics/libGLw/files/