{"action":"created","issue":{"url":"https://api.github.com/repos/google/gumbo-parser/issues/356","repository_url":"https://api.github.com/repos/google/gumbo-parser","labels_url":"https://api.github.com/repos/google/gumbo-parser/issues/356/labels{/name}","comments_url":"https://api.github.com/repos/google/gumbo-parser/issues/356/comments","events_url":"https://api.github.com/repos/google/gumbo-parser/issues/356/events","html_url":"https://github.com/google/gumbo-parser/issues/356","id":118964799,"number":356,"title":"Python interface seems to not work.","user":{"login":"fake-name","id":1401239,"avatar_url":"https://avatars.githubusercontent.com/u/1401239?v=3","gravatar_id":"","url":"https://api.github.com/users/fake-name","html_url":"https://github.com/fake-name","followers_url":"https://api.github.com/users/fake-name/followers","following_url":"https://api.github.com/users/fake-name/following{/other_user}","gists_url":"https://api.github.com/users/fake-name/gists{/gist_id}","starred_url":"https://api.github.com/users/fake-name/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fake-name/subscriptions","organizations_url":"https://api.github.com/users/fake-name/orgs","repos_url":"https://api.github.com/users/fake-name/repos","events_url":"https://api.github.com/users/fake-name/events{/privacy}","received_events_url":"https://api.github.com/users/fake-name/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-11-26T03:28:44Z","updated_at":"2016-04-20T15:17:31Z","closed_at":null,"body":"I'm trying to get gumbo to work with python on ubuntu 14.04, and not having much work.\r\n\r\nI built and installed gumbo by cloning the master branch:\r\n```\r\ndurr@bigsrv:~/gumbo-parser⟫ ./autogen.sh\r\n+ libtoolize\r\nlibtoolize: putting auxiliary files in `.'.\r\nlibtoolize: linking file `./ltmain.sh'\r\nlibtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.\r\nlibtoolize: linking file `m4/libtool.m4'\r\nlibtoolize: linking file `m4/ltoptions.m4'\r\nlibtoolize: linking file `m4/ltsugar.m4'\r\nlibtoolize: linking file `m4/ltversion.m4'\r\nlibtoolize: linking file `m4/lt~obsolete.m4'\r\n+ aclocal -I m4\r\n+ autoconf\r\n+ automake --add-missing\r\nconfigure.ac:13: installing './compile'\r\nconfigure.ac:33: installing './config.guess'\r\nconfigure.ac:33: installing './config.sub'\r\nconfigure.ac:31: installing './install-sh'\r\nconfigure.ac:31: installing './missing'\r\nMakefile.am: installing './depcomp'\r\nparallel-tests: installing './test-driver'\r\ndurr@bigsrv:~/gumbo-parser⟫ ./configure\r\nchecking for g++... g++\r\nchecking whether the C++ compiler works... yes\r\nchecking for C++ compiler default output file name... a.out\r\nchecking for suffix of executables...\r\nchecking whether we are cross compiling... no\r\nchecking for suffix of object files... o\r\nchecking whether we are using the GNU C++ compiler... yes\r\nchecking whether g++ accepts -g... yes\r\nchecking for gcc... gcc\r\nchecking whether we are using the GNU C compiler... yes\r\nchecking whether gcc accepts -g... yes\r\nchecking for gcc option to accept ISO C89... none needed\r\nchecking whether gcc understands -c and -o together... yes\r\nchecking for gcc option to accept ISO C99... -std=gnu99\r\nchecking how to run the C preprocessor... gcc -std=gnu99 -E\r\nchecking for grep that handles long lines and -e... /bin/grep\r\nchecking for egrep... /bin/grep -E\r\nchecking for ANSI C header files... yes\r\nchecking for sys/types.h... yes\r\nchecking for sys/stat.h... yes\r\nchecking for stdlib.h... yes\r\nchecking for string.h... yes\r\nchecking for memory.h... yes\r\nchecking for strings.h... yes\r\nchecking for inttypes.h... yes\r\nchecking for stdint.h... yes\r\nchecking for unistd.h... yes\r\nchecking stddef.h usability... yes\r\nchecking stddef.h presence... yes\r\nchecking for stddef.h... yes\r\nchecking for stdlib.h... (cached) yes\r\nchecking for string.h... (cached) yes\r\nchecking for strings.h... (cached) yes\r\nchecking for inline... inline\r\nchecking for size_t... yes\r\nchecking for main in -lgtest_main... no\r\nchecking for a BSD-compatible install... /usr/bin/install -c\r\nchecking whether build environment is sane... yes\r\n/bin/bash: /home/durr/missing: No such file or directory\r\nconfigure: WARNING: 'missing' script is too old or missing\r\nchecking for a thread-safe mkdir -p... /bin/mkdir -p\r\nchecking for gawk... gawk\r\nchecking whether make sets $(MAKE)... yes\r\nchecking for style of include used by make... GNU\r\nchecking whether make supports nested variables... yes\r\nchecking dependency style of gcc -std=gnu99... gcc3\r\nchecking dependency style of g++... gcc3\r\nchecking whether make supports nested variables... (cached) yes\r\nchecking build system type... x86_64-unknown-linux-gnu\r\nchecking host system type... x86_64-unknown-linux-gnu\r\nchecking how to print strings... printf\r\nchecking for a sed that does not truncate output... /bin/sed\r\nchecking for fgrep... /bin/grep -F\r\nchecking for ld used by gcc -std=gnu99... /usr/bin/ld\r\nchecking if the linker (/usr/bin/ld) is GNU ld... yes\r\nchecking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B\r\nchecking the name lister (/usr/bin/nm -B) interface... BSD nm\r\nchecking whether ln -s works... yes\r\nchecking the maximum length of command line arguments... 1572864\r\nchecking whether the shell understands some XSI constructs... yes\r\nchecking whether the shell understands \"+=\"... yes\r\nchecking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop\r\nchecking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop\r\nchecking for /usr/bin/ld option to reload object files... -r\r\nchecking for objdump... objdump\r\nchecking how to recognize dependent libraries... pass_all\r\nchecking for dlltool... no\r\nchecking how to associate runtime and link libraries... printf %s\\n\r\nchecking for ar... ar\r\nchecking for archiver @FILE support... @\r\nchecking for strip... strip\r\nchecking for ranlib... ranlib\r\nchecking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok\r\nchecking for sysroot... no\r\nchecking for mt... mt\r\nchecking if mt is a manifest tool... no\r\nchecking for dlfcn.h... yes\r\nchecking for objdir... .libs\r\nchecking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no\r\nchecking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC\r\nchecking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes\r\nchecking if gcc -std=gnu99 static flag -static works... yes\r\nchecking if gcc -std=gnu99 supports -c -o file.o... yes\r\nchecking if gcc -std=gnu99 supports -c -o file.o... (cached) yes\r\nchecking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes\r\nchecking whether -lc should be explicitly linked in... no\r\nchecking dynamic linker characteristics... GNU/Linux ld.so\r\nchecking how to hardcode library paths into programs... immediate\r\nchecking whether stripping libraries is possible... yes\r\nchecking if libtool supports shared libraries... yes\r\nchecking whether to build shared libraries... yes\r\nchecking whether to build static libraries... yes\r\nchecking how to run the C++ preprocessor... g++ -E\r\nchecking for ld used by g++... /usr/bin/ld -m elf_x86_64\r\nchecking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes\r\nchecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes\r\nchecking for g++ option to produce PIC... -fPIC -DPIC\r\nchecking if g++ PIC flag -fPIC -DPIC works... yes\r\nchecking if g++ static flag -static works... yes\r\nchecking if g++ supports -c -o file.o... yes\r\nchecking if g++ supports -c -o file.o... (cached) yes\r\nchecking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes\r\nchecking dynamic linker characteristics... (cached) GNU/Linux ld.so\r\nchecking how to hardcode library paths into programs... immediate\r\nchecking that generated files are newer than configure... done\r\nconfigure: creating ./config.status\r\nconfig.status: creating Makefile\r\nconfig.status: creating gumbo.pc\r\nconfig.status: executing depfiles commands\r\nconfig.status: executing libtool commands\r\ndurr@bigsrv:~/gumbo-parser⟫ make\r\n  CC       src/libgumbo_la-attribute.lo\r\n  CC       src/libgumbo_la-char_ref.lo\r\n  CC       src/libgumbo_la-error.lo\r\n  CC       src/libgumbo_la-parser.lo\r\n  CC       src/libgumbo_la-string_buffer.lo\r\n  CC       src/libgumbo_la-string_piece.lo\r\n  CC       src/libgumbo_la-tag.lo\r\n  CC       src/libgumbo_la-tokenizer.lo\r\n  CC       src/libgumbo_la-utf8.lo\r\n  CC       src/libgumbo_la-util.lo\r\n  CC       src/libgumbo_la-vector.lo\r\n  CCLD     libgumbo.la\r\n  CXX      examples/clean_text.o\r\n  CXXLD    clean_text\r\n  CXX      examples/find_links.o\r\n  CXXLD    find_links\r\n  CC       examples/get_title.o\r\n  CCLD     get_title\r\n  CXX      examples/positions_of_class.o\r\n  CXXLD    positions_of_class\r\n  CXX      benchmarks/benchmark.o\r\n  CXXLD    benchmark\r\n  CXX      examples/serialize.o\r\n  CXXLD    serialize\r\n  CXX      examples/prettyprint.o\r\n  CXXLD    prettyprint\r\ndurr@bigsrv:~/gumbo-parser⟫ sudo make install\r\n[sudo] password for durr:\r\nmake[1]: Entering directory `/home/durr/gumbo-parser'\r\n /bin/mkdir -p '/usr/local/lib'\r\n /bin/bash ./libtool   --mode=install /usr/bin/install -c   libgumbo.la '/usr/local/lib'\r\nlibtool: install: /usr/bin/install -c .libs/libgumbo.so.1.0.0 /usr/local/lib/libgumbo.so.1.0.0\r\nlibtool: install: (cd /usr/local/lib && { ln -s -f libgumbo.so.1.0.0 libgumbo.so.1 || { rm -f libgumbo.so.1 && ln -s libgumbo.so.1.0.0 libgumbo.so.1; }; })\r\nlibtool: install: (cd /usr/local/lib && { ln -s -f libgumbo.so.1.0.0 libgumbo.so || { rm -f libgumbo.so && ln -s libgumbo.so.1.0.0 libgumbo.so; }; })\r\nlibtool: install: /usr/bin/install -c .libs/libgumbo.lai /usr/local/lib/libgumbo.la\r\nlibtool: install: /usr/bin/install -c .libs/libgumbo.a /usr/local/lib/libgumbo.a\r\nlibtool: install: chmod 644 /usr/local/lib/libgumbo.a\r\nlibtool: install: ranlib /usr/local/lib/libgumbo.a\r\nlibtool: finish: PATH=\"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin\" ldconfig -n /usr/local/lib\r\n----------------------------------------------------------------------\r\nLibraries have been installed in:\r\n   /usr/local/lib\r\n\r\nIf you ever happen to want to link against installed libraries\r\nin a given directory, LIBDIR, you must either use libtool, and\r\nspecify the full pathname of the library, or use the `-LLIBDIR'\r\nflag during linking and do at least one of the following:\r\n   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable\r\n     during execution\r\n   - add LIBDIR to the `LD_RUN_PATH' environment variable\r\n     during linking\r\n   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag\r\n   - have your system administrator add LIBDIR to `/etc/ld.so.conf'\r\n\r\nSee any operating system documentation about shared libraries for\r\nmore information, such as the ld(1) and ld.so(8) manual pages.\r\n----------------------------------------------------------------------\r\n /bin/mkdir -p '/usr/local/include'\r\n /usr/bin/install -c -m 644 src/gumbo.h src/tag_enum.h '/usr/local/include'\r\n /bin/mkdir -p '/usr/local/lib/pkgconfig'\r\n /usr/bin/install -c -m 644 gumbo.pc '/usr/local/lib/pkgconfig'\r\nmake[1]: Leaving directory `/home/durr/gumbo-parser'\r\n\r\n```\r\n\r\nAnd then the python extensions:\r\n```\r\ndurr@bigsrv:~/gumbo-parser⟫ sudo python setup.py install\r\nrunning install\r\nrunning bdist_egg\r\nrunning egg_info\r\nwriting python/gumbo.egg-info/PKG-INFO\r\nwriting top-level names to python/gumbo.egg-info/top_level.txt\r\nwriting dependency_links to python/gumbo.egg-info/dependency_links.txt\r\nwriting pbr to python/gumbo.egg-info/pbr.json\r\nreading manifest file 'python/gumbo.egg-info/SOURCES.txt'\r\nwriting manifest file 'python/gumbo.egg-info/SOURCES.txt'\r\ninstalling library code to build/bdist.linux-x86_64/egg\r\nrunning install_lib\r\nrunning build_py\r\ncreating build/lib.linux-x86_64-2.7\r\ncreating build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/html5lib_adapter.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/gumboc.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/soup_adapter.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/__init__.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/html5lib_adapter_test.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/gumboc_tags.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/soup_adapter_test.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncopying python/gumbo/gumboc_test.py -> build/lib.linux-x86_64-2.7/gumbo\r\ncreating build/bdist.linux-x86_64/egg\r\ncreating build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/html5lib_adapter.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/gumboc.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/soup_adapter.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/__init__.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/html5lib_adapter_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/gumboc_tags.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/soup_adapter_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib.linux-x86_64-2.7/gumbo/gumboc_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/html5lib_adapter.py to html5lib_adapter.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc.py to gumboc.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/soup_adapter.py to soup_adapter.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/__init__.py to __init__.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/html5lib_adapter_test.py to html5lib_adapter_test.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc_tags.py to gumboc_tags.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/soup_adapter_test.py to soup_adapter_test.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc_test.py to gumboc_test.pyc\r\ncreating build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/pbr.json -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncreating 'dist/gumbo-0.10.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it\r\nremoving 'build/bdist.linux-x86_64/egg' (and everything under it)\r\nProcessing gumbo-0.10.1-py2.7.egg\r\ncreating /usr/local/lib/python2.7/dist-packages/gumbo-0.10.1-py2.7.egg\r\nExtracting gumbo-0.10.1-py2.7.egg to /usr/local/lib/python2.7/dist-packages\r\nAdding gumbo 0.10.1 to easy-install.pth file\r\n\r\nInstalled /usr/local/lib/python2.7/dist-packages/gumbo-0.10.1-py2.7.egg\r\nProcessing dependencies for gumbo==0.10.1\r\nFinished processing dependencies for gumbo==0.10.1\r\ndurr@bigsrv:~/gumbo-parser⟫ python\r\nPython 2.7.6 (default, Jun 22 2015, 17:58:13)\r\n[GCC 4.8.2] on linux2\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import gumbo\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python2.7/dist-packages/gumbo-0.10.1-py2.7.egg/gumbo/__init__.py\", line 33, in <module>\r\n    from gumbo.gumboc import *\r\n  File \"/usr/local/lib/python2.7/dist-packages/gumbo-0.10.1-py2.7.egg/gumbo/gumboc.py\", line 44, in <module>\r\n    os.path.dirname(__file__), _name_of_lib))\r\n  File \"/usr/lib/python2.7/ctypes/__init__.py\", line 443, in LoadLibrary\r\n    return self._dlltype(name)\r\n  File \"/usr/lib/python2.7/ctypes/__init__.py\", line 365, in __init__\r\n    self._handle = _dlopen(self._name, mode)\r\nOSError: /usr/local/lib/python2.7/dist-packages/gumbo-0.10.1-py2.7.egg/gumbo/libgumbo.so: cannot open shared object file: No such file or directory\r\n>>>\r\n```\r\n\r\nOn python 3:\r\n```\r\ndurr@bigsrv:~/gumbo-parser⟫ sudo python3 setup.py install\r\nrunning install\r\nChecking .pth file support in /usr/local/lib/python3.4/dist-packages/\r\n/usr/bin/python3 -E -c pass\r\nTEST PASSED: /usr/local/lib/python3.4/dist-packages/ appears to support .pth files\r\nrunning bdist_egg\r\nrunning egg_info\r\nwriting dependency_links to python/gumbo.egg-info/dependency_links.txt\r\nwriting python/gumbo.egg-info/PKG-INFO\r\nwriting top-level names to python/gumbo.egg-info/top_level.txt\r\nreading manifest file 'python/gumbo.egg-info/SOURCES.txt'\r\nwriting manifest file 'python/gumbo.egg-info/SOURCES.txt'\r\ninstalling library code to build/bdist.linux-x86_64/egg\r\nrunning install_lib\r\nrunning build_py\r\ncreating build/bdist.linux-x86_64/egg\r\ncreating build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/html5lib_adapter.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/gumboc.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/soup_adapter.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/__init__.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/html5lib_adapter_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/gumboc_tags.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/soup_adapter_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\ncopying build/lib/gumbo/gumboc_test.py -> build/bdist.linux-x86_64/egg/gumbo\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/html5lib_adapter.py to html5lib_adapter.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc.py to gumboc.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/soup_adapter.py to soup_adapter.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/__init__.py to __init__.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/html5lib_adapter_test.py to html5lib_adapter_test.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc_tags.py to gumboc_tags.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/soup_adapter_test.py to soup_adapter_test.cpython-34.pyc\r\nbyte-compiling build/bdist.linux-x86_64/egg/gumbo/gumboc_test.py to gumboc_test.cpython-34.pyc\r\ncreating build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncopying python/gumbo.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO\r\ncreating 'dist/gumbo-0.10.1-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it\r\nremoving 'build/bdist.linux-x86_64/egg' (and everything under it)\r\nProcessing gumbo-0.10.1-py3.4.egg\r\ncreating /usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg\r\nExtracting gumbo-0.10.1-py3.4.egg to /usr/local/lib/python3.4/dist-packages\r\nAdding gumbo 0.10.1 to easy-install.pth file\r\n\r\nInstalled /usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg\r\nProcessing dependencies for gumbo==0.10.1\r\nFinished processing dependencies for gumbo==0.10.1\r\n\r\n\r\ndurr@bigsrv:~⟫ python3\r\nPython 3.4.3 (default, Oct 14 2015, 20:28:29)\r\n[GCC 4.8.4] on linux\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import gumbo\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/__init__.py\", line 33, in <module>\r\n    from gumbo.gumboc import *\r\n  File \"/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/gumboc.py\", line 29, in <module>\r\n    import gumboc_tags\r\nImportError: No module named 'gumboc_tags'\r\n>>>\r\n\r\n{{{ moved array to fix that import issue }}}\r\n\r\n>>> import gumbo\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/gumboc.py\", line 198, in <module>\r\n    os.path.dirname(__file__), '..', '..', '.libs', _name_of_lib))\r\n  File \"/usr/lib/python3.4/ctypes/__init__.py\", line 429, in LoadLibrary\r\n    return self._dlltype(name)\r\n  File \"/usr/lib/python3.4/ctypes/__init__.py\", line 351, in __init__\r\n    self._handle = _dlopen(self._name, mode)\r\nOSError: /usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/../../.libs/libgumbo.so: cannot open shared object file: No such file or directory\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/__init__.py\", line 33, in <module>\r\n    from gumbo.gumboc import *\r\n  File \"/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/gumboc.py\", line 202, in <module>\r\n    os.path.dirname(__file__), _name_of_lib))\r\n  File \"/usr/lib/python3.4/ctypes/__init__.py\", line 429, in LoadLibrary\r\n    return self._dlltype(name)\r\n  File \"/usr/lib/python3.4/ctypes/__init__.py\", line 351, in __init__\r\n    self._handle = _dlopen(self._name, mode)\r\nOSError: /usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/libgumbo.so: cannot open shared object file: No such file or directory\r\n\r\n\r\n```\r\n\r\n\r\nI patched the import to `gumboc_tags` by just copying the contents of that file (it's just a single big array) into `gumboc.py`, then fixed the library search path issue (I just hardcoded the library path to `\"/usr/local/lib/libgumbo.so.1.0.0\"`), and it then imports, but `gumbo.soup_parse` (which is what I want) doesn't seem to be present:\r\n\r\n```\r\n>>> import gumbo\r\n>>> gumbo\r\n<module 'gumbo' from '/usr/local/lib/python3.4/dist-packages/gumbo-0.10.1-py3.4.egg/gumbo/__init__.py'>\r\n>>> gumbo.soup_parse\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\nAttributeError: 'module' object has no attribute 'soup_parse'\r\n>>>\r\n\r\n```\r\n\r\n\r\nI also attempted to see if the version in PyPi would work, and it's non-functional after install for python3 (my app is python 3, I tested python 2 just to be thorough). "},"comment":{"url":"https://api.github.com/repos/google/gumbo-parser/issues/comments/212473477","html_url":"https://github.com/google/gumbo-parser/issues/356#issuecomment-212473477","issue_url":"https://api.github.com/repos/google/gumbo-parser/issues/356","id":212473477,"user":{"login":"kevinhendricks","id":8493752,"avatar_url":"https://avatars.githubusercontent.com/u/8493752?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinhendricks","html_url":"https://github.com/kevinhendricks","followers_url":"https://api.github.com/users/kevinhendricks/followers","following_url":"https://api.github.com/users/kevinhendricks/following{/other_user}","gists_url":"https://api.github.com/users/kevinhendricks/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinhendricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinhendricks/subscriptions","organizations_url":"https://api.github.com/users/kevinhendricks/orgs","repos_url":"https://api.github.com/users/kevinhendricks/repos","events_url":"https://api.github.com/users/kevinhendricks/events{/privacy}","received_events_url":"https://api.github.com/users/kevinhendricks/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T15:17:31Z","updated_at":"2016-04-20T15:17:31Z","body":"FWIW, since 0x10ffff * 16 easily fits inside an int, we do not need to catch int overlfow, we just need to catch overflow of 0x10ffff.\r\n\r\nSo this patch in char_ref.c did the trick for me:\r\n\r\n```\r\n--- char_ref.c.keep\t2016-04-20 10:42:38.000000000 -0400\r\n+++ char_ref.c\t2016-04-20 10:48:08.000000000 -0400\r\n@@ -166,8 +166,10 @@\r\n \r\n   int codepoint = 0;\r\n   bool status = true;\r\n+  bool bad_value = false;\r\n   do {\r\n-    codepoint = (codepoint * (is_hex ? 16 : 10)) + digit;\r\n+    if (!bad_value) codepoint = (codepoint * (is_hex ? 16 : 10)) + digit;\r\n+    bad_value = codepoint > 0x10ffff;\r\n     utf8iterator_next(input);\r\n     digit = parse_digit(utf8iterator_current(input), is_hex);\r\n   } while (digit != -1);\r\n```\r\n\r\n"}}