Git Product home page Git Product logo

Comments (5)

rushter avatar rushter commented on May 29, 2024

What kind of errors do you get?

from selectolax.

antonyjosepha avatar antonyjosepha commented on May 29, 2024

Now I used MinGW compiler, error

build\temp.win-amd64-2.7\Release\selectolax\parser.o:parser.c:(.text+0xcd12): undefined reference to _imp__PyImport_ImportModule' build\temp.win-amd64-2.7\Release\selectolax\parser.o:parser.c:(.text+0xcd8a): undefined reference to _imp__PyErr_WriteUnraisable'
build\temp.win-amd64-2.7\Release\selectolax\parser.o:parser.c:(.text+0xcd8f): undefined reference to _imp__PyExc_RuntimeWarning' build\temp.win-amd64-2.7\Release\selectolax\parser.o:parser.c:(.text+0xcdaa): undefined reference to _imp__PyErr_WarnEx'
build\temp.win-amd64-2.7\Release\selectolax\parser.o:parser.c:(.text+0xcddc): undefined reference to _imp__PyErr_Clear' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\temp.win-amd64-2.7\Release\selectolax\parser.o: bad reloc address 0x0 in section .data'
collect2.exe: error: ld returned 1 exit status
error: command 'C:\MinGW\bin\gcc.exe' failed with exit status 1

from selectolax.

rushter avatar rushter commented on May 29, 2024

You need Visual Studio that supports Python 2.7, MinGW won't work. https://www.microsoft.com/en-us/download/details.aspx?id=44266

You also need to remove language_level=3 from the code.

from selectolax.

antonyjosepha avatar antonyjosepha commented on May 29, 2024

Sorry for the late reply.

I had removed the language_level=3 from the code and used the Microsoft Visual C++ Compiler for Python 2.7

I am getting following errors

C:\dev\mv\build\selectolax-0.2.7>python setup.py install
Compiling selectolax/parser.pyx because it changed.
[1/1] Cythonizing selectolax/parser.pyx
C:\Python27\lib\site-packages\Cython\Compiler\Main.py:369: FutureWarning: Cython
directive 'language_level' not set, using 2 for now (Py2). This will change in
a later release! File: C:\digitalglue\mv\build\selectolax-0.2.7\selectolax\parse
r.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
warning: selectolax\parser.pxd:497:4: 'mystatus_t' redeclared
warning: selectolax\parser.pxd:511:8: 'MyCSS_SELECTORS_FLAGS_UNDEF' redeclared
warning: selectolax\parser.pxd:512:8: 'MyCSS_SELECTORS_FLAGS_SELECTOR_BAD' redec
lared
running install
running bdist_egg
running egg_info
writing selectolax.egg-info\PKG-INFO
writing top-level names to selectolax.egg-info\top_level.txt
writing dependency_links to selectolax.egg-info\dependency_links.txt
reading manifest file 'selectolax.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'CONTRIBUTING.rst'
warning: no files found matching 'HISTORY.rst'
warning: no previously-included files found matching 'selectolax*.so'
warning: no files found matching 'modest\include*'
warning: no files found matching 'modest\source*'
warning: no previously-included files matching 'pycache' found under directo
ry ''
warning: no previously-included files matching '
.py[co]' found under directory
''
warning: no files found matching '
.jpg' under directory 'docs'
writing manifest file 'selectolax.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying selectolax.parser.pxd.un~ -> build\lib.win-amd64-2.7\selectolax
copying selectolax.parser.pyx.un~ -> build\lib.win-amd64-2.7\selectolax
copying selectolax\parser.c -> build\lib.win-amd64-2.7\selectolax
copying selectolax\parser.pxd -> build\lib.win-amd64-2.7\selectolax
copying selectolax\parser.pxd~ -> build\lib.win-amd64-2.7\selectolax
copying selectolax\parser.pyx -> build\lib.win-amd64-2.7\selectolax
copying selectolax\parser.pyx~ -> build\lib.win-amd64-2.7\selectolax
running build_ext
building 'selectolax.parser' extension
C:\Users\admin\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0
\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Imodest/include/ -IC:
\Python27\include -IC:\Python27\PC /Tcselectolax/parser.c /Fobuild\temp.win-amd6
4-2.7\Release\selectolax/parser.obj -DMODEST_BUILD_OS=Windows -DMyCORE_OS_Window
s -DMODEST_PORT_NAME=windows_nt -DMyCORE_BUILD_WITHOUT_THREADS=YES -DMyCORE_BUIL
D_DEBUG=NO -O2
parser.c
modest/include/mycore/myosi.h(25) : fatal error C1083: Cannot open include file:
'stdbool.h': No such file or directory
error: command 'C:\Users\admin\AppData\Local\Programs\Common\Microsoft\V
isual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2

Thanks

from selectolax.

rushter avatar rushter commented on May 29, 2024

https://stackoverflow.com/a/8549206/1202129

from selectolax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.