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

SyntaxError: invalid syntax during "make" #43

Closed
felibb opened this issue Mar 17, 2015 · 5 comments
Closed

SyntaxError: invalid syntax during "make" #43

felibb opened this issue Mar 17, 2015 · 5 comments
Labels

Comments

@felibb
Copy link

felibb commented Mar 17, 2015

Hi,

I am trying to compile libepoxy on AWS Linux, and I get this error during "make":

/bin/mkdir -p ../include/epoxy
  GEN      gl_generated_dispatch.c
  File "./gen_dispatch.py", line 67
    'glBegin',
             ^
SyntaxError: invalid syntax
make[2]: *** [gl_generated_dispatch.c] Error 1
make[2]: Leaving directory `/opt/libepoxy-1.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/libepoxy-1.2'
make: *** [all] Error 2

autogen.sh ran without errors. Any help is appreciated.

@anholt
Copy link
Owner

anholt commented Jul 16, 2015

It looks like maybe you've got a python error, except that it looks truncated somehow? It doesn't make any sense to me.

@nwnk
Copy link
Collaborator

nwnk commented Oct 28, 2015

It's not truncated. The bug is that's not legal syntax in python 2.6.

@nwnk
Copy link
Collaborator

nwnk commented Oct 28, 2015

Something like this gets it to build on RHEL6.7, though obviously can't be merged as-is since it drops the wgl and gles bits.

diff -up libepoxy-1.2/src/gen_dispatch.py.jx libepoxy-1.2/src/gen_dispatch.py
--- libepoxy-1.2/src/gen_dispatch.py.jx 2015-10-28 11:23:44.441741032 -0400
+++ libepoxy-1.2/src/gen_dispatch.py    2015-10-28 11:24:03.604898390 -0400
@@ -63,14 +63,7 @@ class GLFunction(object):
         # These are functions with hand-written wrapper code in
         # dispatch_common.c.  Their dispatch entries are replaced with
         # non-public symbols with a "_unwrapped" suffix.
-        wrapped_functions = {
-            'glBegin',
-            'glEnd',
-            'wglMakeCurrent',
-            'wglMakeContextCurrentEXT',
-            'wglMakeContextCurrentARB',
-            'wglMakeAssociatedContextCurrentAMD',
-        }
+        wrapped_functions = [ 'glBegin', 'glEnd' ]

         if name in wrapped_functions:
             self.wrapped_name = name + '_unwrapped'
@@ -204,7 +197,7 @@ class Generator(object):

     def parse_typedefs(self, reg):
         for t in reg.findall('types/type'):
-            if 'name' in t.attrib and t.attrib['name'] not in {'GLhandleARB'}:
+            if 'name' in t.attrib and t.attrib['name'] not in ['GLhandleARB']:
                 continue

             # The gles1/gles2-specific types are redundant
@@ -401,7 +394,7 @@ class Generator(object):
                 condition = 'epoxy_conservative_has_wgl_extension("{0}")'.format(extname)
                 loader = 'wglGetProcAddress({0})'
                 self.process_require_statements(extension, condition, loader, human_name)
-            if {'gl', 'gles1', 'gles2'}.intersection(apis):
+            if 'gl' in apis:
                 human_name = 'GL extension \\"{0}\\"'.format(extname)
                 condition = 'epoxy_conservative_has_gl_extension("{0}")'.format(extname)
                 loader = 'epoxy_get_proc_address({0})'

@ebassi ebassi added the question label Feb 6, 2017
@ebassi
Copy link
Collaborator

ebassi commented Feb 6, 2017

Is this still an issue, or can we close it?

@ebassi
Copy link
Collaborator

ebassi commented Feb 8, 2017

RHEL 6 won't be rebased, and RHEL 7 has Python 2.7, which means gen_dispatch.py does not need to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants