[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Some problems with the ctypes-python-bindings branch

From: Arfrever Frehtes Taifersar Arahesis <arfrever.fta_at_gmail.com>
Date: Tue, 1 Jul 2008 21:54:45 +0200

I tried to build ctypes Python bindings, but I got some errors.

$ python autogen.py
cd /tmp/tmpWGmhA9 && /usr/bin/python /home/Arfrever/ctypesgen_trunk/wrap.py --cpp 'i686-pc-linux-gnu-gcc -E -I/usr/include/apr-1 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -I/usr/include/db4.7 -I/usr/include/subversion-1' -L/usr/lib -lapr-1 -L/usr/lib -L/usr/lib -laprutil-1 -lsvn_subr-1 -lsvn_diff-1 -lsvn_delta-1 -lsvn_fs-1 -lsvn_repos-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_client-1 /usr/include/subversion-1/svn_*.h /usr/include/apr-1/ap[ru]_*.h -o svn_all.py
/home/Arfrever/ctypesgen_trunk/ctypesgencore/parser/yacc.py:72: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import re, types, sys, cStringIO, md5, os.path
/home/Arfrever/ctypesgen_trunk/ctypesgencore/parser/preprocessor.py:13: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
  import os, re, shlex, sys, tokenize, lex, yacc, traceback, popen2
Traceback (most recent call last):
  File "/home/Arfrever/ctypesgen_trunk/wrap.py", line 36, in <module>
import ctypesgencore
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/__init__.py", line 52, in <module>
import processor
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/processor/__init__.py", line 12, in <module>
from pipeline import process
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/processor/pipeline.py", line 4, in <module>
from ctypesgencore.processor.operations import *
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/processor/operations.py", line 12, in <module>
import ctypesgencore.libraryloader
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/libraryloader.py", line 226, in <module>
loader = loaderclass[sys.platform]()
KeyError: 'linux2'
$

I applied the attached patch (ctypesgen-libraryloader.py.patch) to ctypesgen
and I tried to build ctypes Python bindings again.

$ python autogen.py
cd /tmp/tmpTAKs1q && /usr/bin/python /home/Arfrever/ctypesgen_trunk/wrap.py --cpp 'i686-pc-linux-gnu-gcc -E -I/usr/include/apr-1 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -I/usr/include/db4.7 -I/usr/include/subversion-1' -L/usr/lib -lapr-1 -L/usr/lib -L/usr/lib -laprutil-1 -lsvn_subr-1 -lsvn_diff-1 -lsvn_delta-1 -lsvn_fs-1 -lsvn_repos-1 -lsvn_wc-1 -lsvn_ra-1 -lsvn_client-1 /usr/include/subversion-1/svn_*.h /usr/include/apr-1/ap[ru]_*.h -o svn_all.py
/home/Arfrever/ctypesgen_trunk/ctypesgencore/parser/yacc.py:72: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import re, types, sys, cStringIO, md5, os.path
/home/Arfrever/ctypesgen_trunk/ctypesgencore/parser/preprocessor.py:13: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
  import os, re, shlex, sys, tokenize, lex, yacc, traceback, popen2
Status: Preprocessing /tmp/tmpdmsAj6.h
Status: i686-pc-linux-gnu-gcc -E -I/usr/include/apr-1 -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include/apr-1 -I/usr/include/db4.7 -I/usr/include/subversion-1 -U __GNUC__ -dD "-Dinline=" "-D__inline__=" "-D__extension__=" "-D_Bool=uint8_t" "-D__const=const" "-D__asm__(x)=" "-D__asm(x)=" "-Dwith=with_" /tmp/tmpdmsAj6.h
Status: Parsing /tmp/tmpdmsAj6.h
Error: /usr/include/asm/types.h:16: Syntax error at 'short'
Error: /usr/include/subversion-1/svn_iter.h:40: Syntax error at 'svn_iter_apr_hash_cb_t'
Error: /usr/include/subversion-1/svn_iter.h:42: Syntax error at 'apr_ssize_t'
Error: /usr/include/subversion-1/svn_iter.h:43: Syntax error at 'apr_pool_t'
Error: /usr/include/subversion-1/svn_iter.h:77: Syntax error at 'svn_iter_apr_array_cb_t'
Error: /usr/include/subversion-1/svn_iter.h:79: Syntax error at 'apr_pool_t'
Error: /usr/include/lber.h:61: Syntax error at '\n'
Status: Processing description list.
Traceback (most recent call last):
  File "/home/Arfrever/ctypesgen_trunk/wrap.py", line 132, in <module>
ctypesgencore.processor.process(descriptions,options)
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/processor/pipeline.py", line 47, in process
find_source_libraries(data,options)
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/processor/operations.py", line 180, in find_source_libraries
library=ctypesgencore.libraryloader.load_library(library_name)
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/libraryloader.py", line 53, in load_library
for path in paths:
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/libraryloader.py", line 80, in getpaths
for path in self.getplatformpaths(libname):
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/libraryloader.py", line 186, in getplatformpaths
self._create_ld_so_cache()
  File "/home/Arfrever/ctypesgen_trunk/ctypesgencore/libraryloader.py", line 148, in _create_ld_so_cache
directories = self.other_paths.copy()
AttributeError: 'LinuxLibraryLoader' object has no attribute 'other_paths'
$

-- 
Arfrever Frehtes Taifersar Arahesis

Received on 2008-07-01 21:58:06 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.