Giter Club home page Giter Club logo

Comments (6)

scoder avatar scoder commented on August 30, 2024

Could you provide the complete output?

from lupa.

secauvr avatar secauvr commented on August 30, 2024

Using setup.py install --no-luajit

C:\Users\emilio\AppData\Local\Continuum\Anaconda\python.exe "C:\Program Files (x86)\JetBrains\PyCharm 3.1.1\helpers\pydev\pydevd.py" --multiproc --client 127.0.0.1 --port 51468 --file F:/python64/lupa/setup.py install --no-luajit
pydev debugger: process 4520 is connecting

Connected to pydev debugger (build 133.881)
No local build of LuaJIT2 found in lupa directory
Checking for installed lua5.1 library using pkg-config
Did not find lua5.1 using pkg-config: pkg-config cannot find an installed lua5.1
Checking for installed lua-5.1 library using pkg-config
Did not find lua-5.1 using pkg-config: pkg-config cannot find an installed lua-5.1
Checking for installed lua library using pkg-config
Did not find lua using pkg-config: pkg-config cannot find an installed lua
Neither LuaJIT2 nor Lua 5.1 were found, please install the library and its development packages, or put a local build into the lupa main directory
building without Cython
running install
running bdist_egg
running egg_info
writing lupa.egg-info\PKG-INFO
writing top-level names to lupa.egg-info\top_level.txt
writing dependency_links to lupa.egg-info\dependency_links.txt
reading manifest file 'lupa.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MANIFEST'
writing manifest file 'lupa.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
copying lupa\version.py -> build\lib.win-amd64-2.7\lupa
running build_ext
building 'lupa._lupa' extension
C:\MinGW\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall "-IC:\Program Files (x86)\Lua\5.1\include" -IC:\Users\emilio\AppData\Local\Continuum\Anaconda\include -IC:\Users\emilio\AppData\Local\Continuum\Anaconda\PC -c lupa/_lupa.c -o build\temp.win-amd64-2.7\Release\lupa\_lupa.o
lupa/_lupa.c: In function '__Pyx_RaiseArgtupleInvalid':
lupa/_lupa.c:20022:18: warning: unknown conversion type character 'z' in format [-Wformat=]
                  (num_expected == 1) ? "" : "s", num_found);
                  ^
lupa/_lupa.c:20022:18: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'Py_ssize_t' [-Wformat=]
lupa/_lupa.c:20022:18: warning: unknown conversion type character 'z' in format [-Wformat=]
lupa/_lupa.c:20022:18: warning: too many arguments for format [-Wformat-extra-args]
lupa/_lupa.c: In function '__Pyx_RaiseNeedMoreValuesError':
lupa/_lupa.c:20636:18: warning: unknown conversion type character 'z' in format [-Wformat=]
                  index, (index == 1) ? "" : "s");
                  ^
lupa/_lupa.c:20636:18: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'Py_ssize_t' [-Wformat=]
lupa/_lupa.c:20636:18: warning: too many arguments for format [-Wformat-extra-args]
lupa/_lupa.c: In function '__Pyx_RaiseTooManyValuesError':
lupa/_lupa.c:20641:18: warning: unknown conversion type character 'z' in format [-Wformat=]
                  "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
                  ^
lupa/_lupa.c:20641:18: warning: too many arguments for format [-Wformat-extra-args]
writing build\temp.win-amd64-2.7\Release\lupa\_lupa.def
C:\MinGW\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\lupa\_lupa.o "C:\Program Files (x86)\Lua\5.1\lib\lua51.dll" build\temp.win-amd64-2.7\Release\lupa\_lupa.def -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\libs -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\lupa\_lupa.pyd
build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0x89): undefined reference to `_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0xbe): undefined reference to `_imp___Py_NoneStruct'
[...]
build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0x183ea): undefined reference to `_imp__PyType_Ready'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\temp.win-amd64-2.7\Release\lupa\_lupa.o: bad reloc address 0x0 in section `.data'
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

Process finished with exit code -1

-----------------------------------------------------------------------------------------------------------------
Using command line I got a access violation window with mingw32 and mingw64, below are both outputs:

F:\python64\lupa>C:\mingw64\bin\gcc.exe --version
gcc.exe (rubenvb-4.8.0) 4.8.0
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

F:\python64\lupa>C:\mingw\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd
64-2.7\Release\lupa\_lupa.o "C:\Program Files (x86)\Lua\5.1\lib\lua51.dll" build
\temp.win-amd64-2.7\Release\lupa\_lupa.def -LC:\Users\emilio\AppData\Local\Conti
nuum\Anaconda\libs -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\PCbuild\am
d64 -lpython27-lmsvcr90 -o build\lib.win-amd64-2.7\lupa\_lupa.pyd
collect2.exe: error: ld returned 5 exit status


F:\python64\lupa>C:\mingw\bin\gcc.exe --version
gcc.exe (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

F:\python64\lupa>C:\mingw\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64
-2.7\Release\lupa\_lupa.o "C:\Program Files (x86)\Lua\5.1\lib\lua51.dll" build\t
emp.win-amd64-2.7\Release\lupa\_lupa.def -LC:\Users\emilio\AppData\Local\Continu
um\Anaconda\libs -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\PCbuild\amd6
4 -lpython27-lmsvcr90 -o build\lib.win-amd64-2.7\lupa\_lupa.pyd
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot fin
d -lpython27-lmsvcr90
collect2.exe: error: ld returned 1 exit status

from lupa.

scoder avatar scoder commented on August 30, 2024

Thanks. I removed the redundant parts of the output and formatted them. The gcc failures in your manual tries at the and are due to copy&paste errors (there is a space missing between the library references).

Not sure why the normal compilation fails, though. Well, one thing: it shouldn't be linking against libpython (i.e. the "-lpython27" is incorrect). Does it build when you remove that?

from lupa.

secauvr avatar secauvr commented on August 30, 2024

Thanks, the library file was generated, but I got a error in the second step, where is generates the pyd file.
The command line used is: C:\MinGW\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\lupa_lupa.o F:\python64\Lua\5.1\lib\lua51.dll build\temp.win-amd64-2.7\Release\lupa_lupa.def -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\libs -LC:\Users\emilio\AppData\Local\Continuum\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\lupa_lupa.pyd
And the error is:
build\temp.win-amd64-2.7\Release\lupa_lupa.o:_lupa.c:(.text+0x89): undefined reference to _imp___Py_NoneStruct' build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0xbe): undefined reference to_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\lupa_lupa.o:_lupa.c:(.text+0xf3): undefined reference to _imp___Py_NoneStruct' build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0x213): undefined reference to_imp___Py_NoneStruct'
build\temp.win-amd64-2.7\Release\lupa_lupa.o:_lupa.c:(.text+0x257): undefined reference to _imp___PyThreadState_Current' build\temp.win-amd64-2.7\Release\lupa\_lupa.o:_lupa.c:(.text+0x2e4): undefined reference to_imp___PyThreadState_Current'
build\temp.win-amd64-2.7\Release\lupa_lupa.o:_lupa.c:(.text+0x32c): undefined reference to `_imp___PyThreadState_Current'

... (a lot of undefined references)

build\temp.win-amd64-2.7\Release\lupa_lupa.o:_lupa.c:(.text+0x183ea): undefined reference to _imp__PyType_Ready' c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: build\temp.win-amd64-2.7\Release\lupa\_lupa.o: bad reloc address 0x0 in section.data'
collect2.exe: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I researched about this problem and the solution mentioned is use the -DMS_WIN64 flag, but I'm already use this one an not fix de problem.

I put the files in sendspace if it heps you: http://www.sendspace.com/filegroup/rsKiq7tvIVWCr%2BQvOjFUWg

Thanks for you help

from lupa.

secauvr avatar secauvr commented on August 30, 2024

I successful built lupa, but lupa.pyd throw a access violation in the 64 bits version with this simple code:

from lupa import LuaRuntime
lua_rt = LuaRuntime()
print(lua_rt)

Do you know where can I find the binary installation for python 2.7 64 bits windows ?

from lupa.

coolq1000 avatar coolq1000 commented on August 30, 2024

I know this is an old thread, but you can find Python 2.7.5 64bit here: https://www.python.org/downloads/windows/

Scroll down until you see Python 2.7.5 - 2013-05-12
Then look for Download Windows x86-64 MSI installer

from lupa.

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.