Issue #9 new

Pyd cannot build extensions with gdc

lehibou
created an issue

Hello,

Pyd won't build the examples :

[code] gdc -fproperty -c -fversion=Python_2_4_Or_Later -fversion=Python_2_5_Or_Later -fversion=Python_2_6_Or_Later -fversion=Python_2_7_Or_Later -fversion=Python_3_0_Or_Later -fversion=Python_3_1_Or_Later -fversion=Python_3_2_Or_Later -fversion=Python_3_3_Or_Later -fversion=Python_Unicode_UCS4 -fdebug -I /usr/local/lib/python3.3/dist-packages/celerid/infrastructure -o build/temp.linux-x86_64-3.3/infra/temp.o hello.d /usr/local/lib/python3.3/dist-packages/celerid/infrastructure/pyd/class_wrap.d /usr/local/lib/python3.3/dist-packages/celerid/infrastructure/pyd/ctor_wrap.d ... [lot of text here, won't copy-paste everything, should I] ... def: hello wrap_struct: 'RangeWrapper' class.def: iter class.def: next wrapped_struct_init, S is 'struct pyd.make_object.RangeWrapper' library_dirs: [] runtime_library_dirs: [] libraries: ['python3.3m'] gdc -fdebug -o build/lib.linux-x86_64-3.3/hello build/temp.linux-x86_64-3.3/infra/temp.o -lpython3.3m /usr/bin/ld: cannot find -lpython3.3m collect2: error: ld returned 1 exit status error: command 'gdc' failed with exit status 1 [/code]

Even after hacking the dcompiler.py, cannot find a reason.

Are the empty library path normal ?

There is no dmd/ldc on debian sid. Just gdc.

Comments (5)

  1. lehibou reporter

    Ok python3-dev was missing.

    Now, it is a gdc problem:

    [code] def: hello wrap_struct: 'RangeWrapper' class.def: iter class.def: next wrapped_struct_init, S is 'struct pyd.make_object.RangeWrapper' library_dirs: [] runtime_library_dirs: [] libraries: [] gdc -fPIC -nostartfiles -shared -fdebug -o build/lib.linux-x86_64-3.3/hello.cpython-33m.so build/temp.linux-x86_64-3.3/infra/temp.o -Wl,-soname,hello.cpython-33m.so /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.8/libgphobos2.a(object_.o): relocation R_X86_64_32S against `_D10TypeInfo_m6__initZ' can not be used when making a shared object; recompile with -fPIC /usr/lib/gcc/x86_64-linux-gnu/4.8/libgphobos2.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status error: command 'gdc' failed with exit status

    [/code]

    This line is a mess to manage.. : [code] /usr/lib/gcc/x86_64-linux-gnu/4.8/libgphobos2.a: error adding symbols: Bad value [/code]

    Does anyone has a clue on what has to be done ?

    I am on a Debian sid 64bits system.

  2. ariovistus repo owner

    as far as I know, gdc does not support building shared libraries yet (well, officially none of the d compilers do to the extent that pyd needs, but dmd more or less works).

    can you build the pyind example with gdc?

  3. Log in to comment