Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

Does not compile under Cygwin #11

Closed
@Herst

Description

@Herst

In a Python 3 inside Cygwin, meaning that it was installed over the Cygwin package manager and is not a Windows one accessed from Cygwin, python3 setup.py build will fail:

running build
running build_py
running build_ext
building '_ast27' extension
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/acceler.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/acceler.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/bitset.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/bitset.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/grammar.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar.o
ast27/Parser/grammar.c:16:12: warning: ‘Py_DebugFlag’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 extern int Py_DebugFlag;
            ^
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/grammar1.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar1.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/node.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/node.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/parser.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/parser.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/parsetok.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/parsetok.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Parser/tokenizer.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/tokenizer.o
ast27/Parser/tokenizer.c:41:7: warning: ‘_Ta27Parser_TokenNames’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 char *_Ta27Parser_TokenNames[] = {
       ^
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Python/ast.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Python/graminit.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/graminit.o
ast27/Python/graminit.c:2332:9: warning: ‘_Ta27Parser_Grammar’ redeclared without dllimport attribute: previous dllimport ignored [-Wattributes]
 grammar _Ta27Parser_Grammar = {
         ^
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Python/mystrtoul.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/mystrtoul.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Python/Python-ast.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/Python-ast.o
gcc -Wno-unused-result -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/build=/usr/src/debug/python3-3.4.3-1 -fdebug-prefix-map=/usr/src/ports/python3/python3-3.4.3-1.x86_64/src/Python-3.4.3=/usr/src/debug/python3-3.4.3-1 -Iast27/Include -I/usr/include/python3.4m -c ast27/Custom/typed_ast.c -o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Custom/typed_ast.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/acceler.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/bitset.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar1.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/node.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/parser.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/parsetok.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/tokenizer.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/graminit.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/mystrtoul.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/Python-ast.o build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Custom/typed_ast.o -L/usr/lib/python3.4/config -L/usr/lib -lpython3.4m -o build/lib.cygwin-2.6.0-x86_64-3.4/_ast27.cpython-34m.dll
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar.o: In function `_Py_translatelabels':
/home/phili/typed_ast/ast27/Parser/grammar.c:144: undefined reference to `__imp__Ta27Parser_TokenNames'
/home/phili/typed_ast/ast27/Parser/grammar.c:144:(.text+0x3ac): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__Ta27Parser_TokenNames'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Parser/grammar1.o: In function `Ta27Grammar_LabelRepr':
/home/phili/typed_ast/ast27/Parser/grammar1.c:52: undefined reference to `__imp__Ta27Parser_TokenNames'
/home/phili/typed_ast/ast27/Parser/grammar1.c:52:(.text+0x48): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__Ta27Parser_TokenNames'
/home/phili/typed_ast/ast27/Parser/grammar1.c:50: undefined reference to `__imp__Ta27Parser_TokenNames'
/home/phili/typed_ast/ast27/Parser/grammar1.c:50:(.text+0xb3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `__imp__Ta27Parser_TokenNames'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o: In function `compiler_complex_args':
/home/phili/typed_ast/ast27/Python/ast.c:681: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:681:(.text+0x8ec): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o: In function `ast_for_exprlist':
/home/phili/typed_ast/ast27/Python/ast.c:2448: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:2448:(.text+0x117f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o: In function `ast_for_expr':
/home/phili/typed_ast/ast27/Python/ast.c:1992: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:1992:(.text+0x131b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:2028: undefined reference to `_Py_asdl_int_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:2028:(.text+0x15ac): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_int_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:2031: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:2031:(.text+0x15cf): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o: In function `ast_for_atom':
/home/phili/typed_ast/ast27/Python/ast.c:1597: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:1597:(.text+0x17dc): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:1601: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:1601:(.text+0x17f3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o: In function `ast_for_trailer':
/home/phili/typed_ast/ast27/Python/ast.c:1817: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/ast.c:1817:(.text+0x193a): additional relocation overflows omitted from the output
/home/phili/typed_ast/ast27/Python/ast.c:1833: undefined reference to `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/ast.o:/home/phili/typed_ast/ast27/Python/ast.c:1578: more undefined references to `_Py_asdl_seq_new' follow
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/Python-ast.o: In function `obj2ast_expr':
/home/phili/typed_ast/ast27/Python/Python-ast.c:5516: undefined reference to `_Py_asdl_int_seq_new'
/home/phili/typed_ast/ast27/Python/Python-ast.c:5593: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/Python-ast.c:5541: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/Python-ast.c:5618: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/Python-ast.c:5880: undefined reference to `_Py_asdl_seq_new'
/home/phili/typed_ast/ast27/Python/Python-ast.c:5929: undefined reference to `_Py_asdl_seq_new'
build/temp.cygwin-2.6.0-x86_64-3.4/ast27/Python/Python-ast.o:/home/phili/typed_ast/ast27/Python/Python-ast.c:5284: more undefined references to `_Py_asdl_seq_new' follow
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

/edit: Same for 32 Bit and MSYS2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions