[oi-dev] Error in mesa gl,h

Udo Grabowski (IMK) udo.grabowski at kit.edu
Mon Mar 13 13:25:41 UTC 2023


On 08/03/2023 17:45, Udo Grabowski (IMK) wrote:
> When compiling (gcc10) the perl OpenGL package with the mesa header
> /usr/X11/include/mesa/gl.h, it fails :
>
> In file included from gl_util.h:20,
>                  from OpenGL.xs:60:
> /usr/X11R6/include/GL/gl.h:93:28: error: expected declaration specifiers or
> '...' before '*' token
>    93 | #define APIENTRYP APIENTRY *
>       |                            ^
> glext_procs.h:11563:17: note: in expansion of macro 'APIENTRYP'
>
> Following the definition chain to APIENTRYP shows that it ends
> in a single * because GLAPIENTRY is empty, which can't work:
>
> .....
> #elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 303
> #  define GLAPI __attribute__((visibility("default")))
> #  define GLAPIENTRY
> #endif /* WIN32 && !CYGWIN */
> ....
> #ifndef GLAPIENTRY
> #define GLAPIENTRY
> #endif
>
> #ifndef APIENTRY
> #define APIENTRY GLAPIENTRY
> #endif
>
> /* "P" suffix to be used for a pointer to a function */
> #ifndef APIENTRYP
> #define APIENTRYP APIENTRY *
> #endif
>
> #ifndef GLAPIENTRYP
> #define GLAPIENTRYP GLAPIENTRY *
> #endif
>
> Any idea how to fix that (apart from the fact that the mesa gl.h
> shouldn't be here, because the NVIDIA headers are missing, see
> my previous post) ?


Turned out that this package only compiles correctly if you
are on an actual OpenGL-capable session, the detection of
OpenGL capabilities by the package needs that. That package
is somewhat broken as also the tests only work when you manually
perform them. But it's installed now and functions as expected.
-- 
Dr.Udo Grabowski   Inst.f.Meteorology & Climate Research IMK-ASF-SAT
http://www.imk-asf.kit.edu/english/sat.php
KIT - Karlsruhe Institute of Technology           http://www.kit.edu
Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5221 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20230313/7466d718/attachment.bin>


More information about the oi-dev mailing list