andreikop / qutepart

Code editor component for PyQt5
http://enki-editor.org
GNU Lesser General Public License v2.1
113 stars 29 forks source link

Compile Error On Windows 8.1 Using gcc #52

Closed Aldenis2112 closed 8 years ago

Aldenis2112 commented 8 years ago

Qutepart Installation Bug Report

On Windows 8.1, using Python 3.4.4 from the WinPython distribution, the following error occurred while attempting to run setup.py. This error occured because both the gcc and msvc compiler were installed, and the gcc compiler was selected rather than the msvc compiler.

The solution to this bug was to create a file named setup.cfg (Setup Configuration file) containing the lines:

[build_ext]
compiler=msvc

For more information regarding setup.cfg and the various availiable command line options, click here.

Output From Error:

C:\Users\Alden\Documents\GitHub\qutepart>python setup.py install --include-dir=.
./pcre-8.38/build --lib-dir=../pcre-8.38/build/Release --force 
running install
running bdist_egg
running egg_info
writing top-level names to qutepart.egg-info\top_level.txt
writing dependency_links to qutepart.egg-info\dependency_links.txt
writing qutepart.egg-info\PKG-INFO
reading manifest file 'qutepart.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'qutepart.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'qutepart.syntax.cParser' extension
C:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\scripts\..\python-3.4.4\Scri
pts\gcc.exe -mdll -O -Wall -DHAVE_PCRE_CONFIG_H -I../pcre-8.38/build -IC:\Users\
Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\include -IC:\Users\Alden
\Downloads\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\include -c qutepart/syntax/cP
arser.c -o build\temp.win32-3.4\Release\qutepart\syntax\cparser.o
In file included from qutepart/syntax/cParser.c:25:0:
../pcre-8.38/build/config.h:16:0: warning: "HAVE_STRERROR" redefined
 #define HAVE_STRERROR 1
 ^
In file included from C:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\python
-3.4.4\include/Python.h:8:0,
                 from qutepart/syntax/cParser.c:7:
C:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\python-3.4.4\include/pyconfi
g.h:64:0: note: this is the location of the previous definition
 #define HAVE_STRERROR
 ^
qutepart/syntax/cParser.c: In function 'Context_parseBlock':
qutepart/syntax/cParser.c:2818:17: warning: unknown conversion type character 'z
' in format [-Wformat=]
                 fprintf(stderr, ": matched rule %zu at %zu\n", i, currentColumn
Index);
                 ^
qutepart/syntax/cParser.c:2818:17: warning: unknown conversion type character 'z
' in format [-Wformat=]
qutepart/syntax/cParser.c:2818:17: warning: too many arguments for format [-Wfor
mat-extra-args]
writing build\temp.win32-3.4\Release\qutepart\syntax\cParser.def
C:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\scripts\..\python-3.4.4\Scri
pts\gcc.exe -shared -s build\temp.win32-3.4\Release\qutepart\syntax\cparser.o bu
ild\temp.win32-3.4\Release\qutepart\syntax\cParser.def -L../pcre-8.38/build/Rele
ase -LC:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\scripts\..\python-3.4.
4\libs -LC:\Users\Alden\Downloads\WinPython-32bit-3.4.4.2Qt5\scripts\..\python-3
.4.4\PCbuild -lpcre -lpython34 -lmsvcr100 -o build\lib.win32-3.4\qutepart\syntax
\cParser.pyd
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
Warning: corrupt .drectve at end of def file
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_set
_type_bits]+0x83): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_set
_start_bits]+0x656): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_set
_start_bits]+0x66c): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_set
_start_bits]+0x682): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_set
_start_bits]+0x696): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_study.obj):(.text[_pcr
e_study]+0x63): more undefined references to `@__security_check_cookie@4' follow

../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[@sljit_grow_stack@4]+0x11): undefined reference to `_alloca_probe_16'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[@sljit_grow_stack@4]+0x26): undefined reference to `@__security_check_cookie@4
'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_scan_prefix]+0x593): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_scan_prefix]+0x5a7): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_fast_forward_first_n_chars]+0xa9): undefined reference to `@__security_check_
cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_fast_forward_first_n_chars]+0x269): undefined reference to `@__security_check
_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_fast_forward_first_n_chars]+0x78e): more undefined references to `@__security
_check_cookie@4' follow
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_jit_machine_stack_exec]+0x9): undefined reference to `_chkstk'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_jit_compile.obj):(.tex
t[_jit_machine_stack_exec]+0x4b): undefined reference to `@__security_check_cook
ie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_exec.obj):(.text[_matc
h]+0x64): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_exec.obj):(.text[_matc
h]+0x7c): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_exec.obj):(.text[_matc
h]+0x65c): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_exec.obj):(.text[_matc
h]+0xd3e): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_exec.obj):(.text[_matc
h]+0x180d): more undefined references to `@__security_check_cookie@4' follow
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_compile.obj):(.text[_p
cre_compile2]+0x9): undefined reference to `_chkstk'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_compile.obj):(.text[_p
cre_compile2]+0x8b): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_compile.obj):(.text[_p
cre_compile2]+0xbf0): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_compile.obj):(.text[_p
cre_compile2]+0xd0d): undefined reference to `@__security_check_cookie@4'
../pcre-8.38/build/Release/pcre.lib(pcre.dir/Release/pcre_compile.obj):(.text[_p
cre_compile2]+0xd59): undefined reference to `@__security_check_cookie@4'
collect2.exe: error: ld returned 1 exit status
error: command 'C:\\Users\\Alden\\Downloads\\WinPython-32bit-3.4.4.2Qt5\\scripts
\\..\\python-3.4.4\\Scripts\\gcc.exe' failed with exit status 1
andreikop commented 8 years ago

@bjones1, can we write compiler=msvc in the setup.py if platform is windows?

bjones1 commented 8 years ago

Doing a bit of digging...

@Aldenis2112, would you come by to discuss?

andreikop commented 8 years ago

It seems like distutils is used for dependency checking. Any fix is welcome!

andreikop commented 8 years ago

@Aldenis2112, I tried to workaround this bug by dynamically creating setup.cfg on Windows but not on Linux. Could you test windows installation now?