Jump to page: 1 2
Thread overview
Linker error when building dmd backend
Dec 22, 2018
Thomas Mader
Dec 22, 2018
Stefan Koch
Dec 22, 2018
Thomas Mader
Dec 22, 2018
Thomas Mader
Dec 22, 2018
Thomas Mader
Dec 23, 2018
Walter Bright
Dec 23, 2018
Thomas Mader
Dec 23, 2018
Walter Bright
Dec 23, 2018
Jacob Carlborg
Dec 23, 2018
Walter Bright
Dec 23, 2018
Thomas Mader
Dec 23, 2018
Thomas Mader
Dec 23, 2018
Johan Engelen
Dec 23, 2018
Thomas Mader
Dec 23, 2018
Joakim
December 22, 2018
Hello,

I updated dmd on NixOS from 2.081.2 to 2.083.1 but get the following linker errors when the backend is linked:

../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
collect2: error: ld returned 1 exit status
Error: /nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/c++ failed with status: 1

I use ldc 1.13.0 as my bootstrap compiler but Archlinux does that too so I don't think that's the reason.
Anybody an idea?

Thomas

December 22, 2018
On Saturday, 22 December 2018 at 21:58:13 UTC, Thomas Mader wrote:
> Hello,
>
> I updated dmd on NixOS from 2.081.2 to 2.083.1 but get the following linker errors when the backend is linked:
>
> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
> collect2: error: ld returned 1 exit status
> Error: /nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/c++ failed with status: 1
>
> I use ldc 1.13.0 as my bootstrap compiler but Archlinux does that too so I don't think that's the reason.
> Anybody an idea?
>
> Thomas

run a make clean.
probably files which changed in the backend are not recompiled?

Otherwise it's mangling bugs.
December 22, 2018
On Saturday, 22 December 2018 at 22:40:18 UTC, Stefan Koch wrote:
> On Saturday, 22 December 2018 at 21:58:13 UTC, Thomas Mader wrote:
>> Hello,
>>
>> I updated dmd on NixOS from 2.081.2 to 2.083.1 but get the following linker errors when the backend is linked:
>>
>> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
>> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
>> ../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
>> collect2: error: ld returned 1 exit status
>> Error: /nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/c++ failed with status: 1
>>
>> I use ldc 1.13.0 as my bootstrap compiler but Archlinux does that too so I don't think that's the reason.
>> Anybody an idea?
>>
>> Thomas
>
> run a make clean.
> probably files which changed in the backend are not recompiled?
>
> Otherwise it's mangling bugs.

It's always a fresh build when building a NixOS package.
I looked into backend.a for the symbol:

objdump -D backend.a | grep modulo
0000000000000040 <_Z7_moduloee>:
  40:	e9 00 00 00 00       	jmpq   45 <_Z7_moduloee+0x5>

Maybe that's connected to https://forum.dlang.org/post/odimguuqtekosmtliyhf@forum.dlang.org

December 22, 2018
On Saturday, 22 December 2018 at 23:02:04 UTC, Thomas Mader wrote:
> It's always a fresh build when building a NixOS package.
> I looked into backend.a for the symbol:
>
> objdump -D backend.a | grep modulo
> 0000000000000040 <_Z7_moduloee>:
>   40:	e9 00 00 00 00       	jmpq   45 <_Z7_moduloee+0x5>
>
> Maybe that's connected to https://forum.dlang.org/post/odimguuqtekosmtliyhf@forum.dlang.org

I enabled more debug output from the Nix environment so the compiler flags can be seen.

CC="c++" ldmd2 -of../generated/linux/release/64/dmd -m64 -vtls -J../generated/linux/release/64 -J../res -L-lstdc++  -version=MARS -fPIC -J../generated/linux/release/64 -w -de -O -release -inline dmd/access.d dmd/aggregate.d dmd/aliasthis.d dmd/apply.d dmd/argtypes.d dmd/arrayop.d dmd/arraytypes.d dmd/astcodegen.d dmd/attrib.d dmd/builtin.d dmd/canthrow.d dmd/cli.d dmd/clone.d dmd/compiler.d dmd/complex.d dmd/cond.d dmd/constfold.d dmd/cppmangle.d dmd/cppmanglewin.d dmd/ctfeexpr.d dmd/ctorflow.d dmd/dcast.d dmd/dclass.d dmd/declaration.d dmd/delegatize.d dmd/denum.d dmd/dimport.d dmd/dinifile.d dmd/dinterpret.d dmd/dmacro.d dmd/dmangle.d dmd/dmodule.d dmd/doc.d dmd/dscope.d dmd/dstruct.d dmd/dsymbol.d dmd/dsymbolsem.d dmd/dtemplate.d dmd/dversion.d dmd/escape.d dmd/expression.d dmd/expressionsem.d dmd/func.d dmd/hdrgen.d dmd/id.d dmd/impcnvtab.d dmd/imphint.d dmd/init.d dmd/initsem.d dmd/inline.d dmd/inlinecost.d dmd/intrange.d dmd/json.d dmd/lambdacomp.d dmd/lib.d dmd/libelf.d dmd/libmach.d dmd/link.d dmd/mars.d dmd/mtype.d dmd/nogc.d dmd/nspace.d dmd/objc.d dmd/opover.d dmd/optimize.d dmd/parse.d dmd/permissivevisitor.d dmd/sapply.d dmd/templateparamsem.d dmd/sideeffect.d dmd/statement.d dmd/staticassert.d dmd/target.d dmd/typesem.d dmd/traits.d dmd/transitivevisitor.d dmd/parsetimevisitor.d dmd/visitor.d dmd/typinf.d dmd/utils.d dmd/scanelf.d dmd/scanmach.d dmd/statement_rewrite_walker.d dmd/statementsem.d dmd/staticcond.d dmd/safe.d dmd/blockexit.d dmd/printast.d dmd/semantic2.d dmd/semantic3.d dmd/irstate.d dmd/toctype.d dmd/glue.d dmd/gluelayer.d dmd/todt.d dmd/tocsym.d dmd/toir.d dmd/dmsc.d dmd/tocvdebug.d dmd/s2ir.d dmd/toobj.d dmd/e2ir.d dmd/eh.d dmd/iasm.d dmd/iasmdmd.d dmd/iasmgcc.d dmd/objc_glue.d dmd/backend/cc.d dmd/backend/cdef.d dmd/backend/cgcv.d dmd/backend/code.d dmd/backend/cv4.d dmd/backend/dt.d dmd/backend/el.d dmd/backend/global.d dmd/backend/obj.d dmd/backend/oper.d dmd/backend/outbuf.d dmd/backend/rtlsym.d dmd/backend/code_x86.d dmd/backend/iasm.d dmd/backend/ty.d dmd/backend/type.d dmd/backend/exh.d dmd/backend/mach.d dmd/backend/mscoff.d dmd/backend/dwarf.d dmd/backend/dwarf2.d dmd/backend/xmm.d dmd/backend/dlist.d dmd/backend/melf.d dmd/backend/varstats.d dmd/root/aav.d dmd/root/man.d dmd/root/response.d dmd/root/speller.d dmd/root/longdouble.d ../generated/linux/release/64/newdelete.o ../generated/linux/release/64/backend.a ../generated/linux/release/64/lexer.a
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
HARDENING: enabling fortify
HARDENING: enabling stackprotector
HARDENING: enabling strictoverflow
HARDENING: enabling format
HARDENING: enabling pic
extra flags before to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -O2
  -D_FORTIFY_SOURCE=2
  -fstack-protector-strong
  --param
  ssp-buffer-size=4
  -fno-strict-overflow
  -Wformat
  -Wformat-security
  -Werror=format-security
  -fPIC
  -Wl\,-dynamic-linker
  -Wl\,/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/ld-linux-x86-64.so.2
original flags to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  ../generated/linux/release/64/dmd.o
  ../generated/linux/release/64/newdelete.o
  ../generated/linux/release/64/backend.a
  ../generated/linux/release/64/lexer.a
  -o
  ../generated/linux/release/64/dmd
  -fuse-ld=gold
  -lstdc++
  -L/nix/store/r29igl9gz0r6cvb3i28xh03anx936qbl-ldcBuild-1.13.0/lib
  -lphobos2-ldc
  -ldruntime-ldc
  -Wl\,--gc-sections
  -lrt
  -ldl
  -lpthread
  -lm
  -m64
extra flags after to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -B/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -B/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/
  -idirafter
  /nix/store/psqblh5bsgkbkhn4r648pgjw5rq4npkv-glibc-2.27-dev/include
  -idirafter
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed
  -B/nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
  -Wl\,-rpath
  -Wl\,/nix/store/r2xapv59sz4cpa9zy9ydzck857r6xmrx-dmdBuild-2.083.1/lib64
  -Wl\,-rpath
  -Wl\,/nix/store/r2xapv59sz4cpa9zy9ydzck857r6xmrx-dmdBuild-2.083.1/lib
  -L/nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/lib
  -L/nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/lib
  -L/nix/store/9vh9ysqr8hahnph1gppniv7zrdf218ds-nghttp2-1.35.0-lib/lib
  -L/nix/store/nsrwlly5ikwhppcslaazp547kh7q7j6s-zlib-1.2.11/lib
  -L/nix/store/yi0pwf9hybx6vhj2qdfa6krvxgvcbyi0-libkrb5-1.15.2/lib
  -L/nix/store/3lk4hcp1r6pnrvf91kd5p0ni97nd2dj3-openssl-1.0.2q/lib
  -L/nix/store/za7psqbn9laq73vc5rh657jqpiqn0wag-libssh2-1.8.0/lib
  -L/nix/store/blrfb9855rrxva4xch4r7knwya0il5rl-curl-7.62.0/lib
  -L/nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/lib
  -L/nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/lib
  -L/nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/lib
  -L/nix/store/9vh9ysqr8hahnph1gppniv7zrdf218ds-nghttp2-1.35.0-lib/lib
  -L/nix/store/nsrwlly5ikwhppcslaazp547kh7q7j6s-zlib-1.2.11/lib
  -L/nix/store/yi0pwf9hybx6vhj2qdfa6krvxgvcbyi0-libkrb5-1.15.2/lib
  -L/nix/store/3lk4hcp1r6pnrvf91kd5p0ni97nd2dj3-openssl-1.0.2q/lib
  -L/nix/store/za7psqbn9laq73vc5rh657jqpiqn0wag-libssh2-1.8.0/lib
  -L/nix/store/blrfb9855rrxva4xch4r7knwya0il5rl-curl-7.62.0/lib
  -L/nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/lib
  -L/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib
  -L/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
HARDENING: enabling bindnow
HARDENING: enabling relro
extra flags before to /nix/store/jdlb06c0kp6sms277xcclfr3gdl8pb9r-binutils-2.30/bin/ld.gold:
  -z
  now
  -z
  relro
original flags to /nix/store/jdlb06c0kp6sms277xcclfr3gdl8pb9r-binutils-2.30/bin/ld.gold:
  -plugin
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/libexec/gcc/x86_64-unknown-linux-gnu/7.3.0/liblto_plugin.so
  -plugin-opt=/nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/libexec/gcc/x86_64-unknown-linux-gnu/7.3.0/lto-wrapper
  -plugin-opt=-fresolution=/build/ccNnlge1.res
  -plugin-opt=-pass-through=-lgcc_s
  -plugin-opt=-pass-through=-lgcc
  -plugin-opt=-pass-through=-lc
  -plugin-opt=-pass-through=-lgcc_s
  -plugin-opt=-pass-through=-lgcc
  --eh-frame-hdr
  -m
  elf_x86_64
  -dynamic-linker
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib64/ld-linux-x86-64.so.2
  -o
  ../generated/linux/release/64/dmd
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/crt1.o
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/crti.o
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/crtbegin.o
  -L/nix/store/r29igl9gz0r6cvb3i28xh03anx936qbl-ldcBuild-1.13.0/lib
  -L/nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/lib
  -L/nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/lib
  -L/nix/store/9vh9ysqr8hahnph1gppniv7zrdf218ds-nghttp2-1.35.0-lib/lib
  -L/nix/store/nsrwlly5ikwhppcslaazp547kh7q7j6s-zlib-1.2.11/lib
  -L/nix/store/yi0pwf9hybx6vhj2qdfa6krvxgvcbyi0-libkrb5-1.15.2/lib
  -L/nix/store/3lk4hcp1r6pnrvf91kd5p0ni97nd2dj3-openssl-1.0.2q/lib
  -L/nix/store/za7psqbn9laq73vc5rh657jqpiqn0wag-libssh2-1.8.0/lib
  -L/nix/store/blrfb9855rrxva4xch4r7knwya0il5rl-curl-7.62.0/lib
  -L/nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/lib
  -L/nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/lib
  -L/nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/lib
  -L/nix/store/9vh9ysqr8hahnph1gppniv7zrdf218ds-nghttp2-1.35.0-lib/lib
  -L/nix/store/nsrwlly5ikwhppcslaazp547kh7q7j6s-zlib-1.2.11/lib
  -L/nix/store/yi0pwf9hybx6vhj2qdfa6krvxgvcbyi0-libkrb5-1.15.2/lib
  -L/nix/store/3lk4hcp1r6pnrvf91kd5p0ni97nd2dj3-openssl-1.0.2q/lib
  -L/nix/store/za7psqbn9laq73vc5rh657jqpiqn0wag-libssh2-1.8.0/lib
  -L/nix/store/blrfb9855rrxva4xch4r7knwya0il5rl-curl-7.62.0/lib
  -L/nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/lib
  -L/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib
  -L/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -L/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -L/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib
  -L/nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin
  -L/nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0
  -L/nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/../../../../lib64
  -L/nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/../../..
  -dynamic-linker
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/ld-linux-x86-64.so.2
  ../generated/linux/release/64/dmd.o
  ../generated/linux/release/64/newdelete.o
  ../generated/linux/release/64/backend.a
  ../generated/linux/release/64/lexer.a
  -lstdc++
  -lphobos2-ldc
  -ldruntime-ldc
  --gc-sections
  -lrt
  -ldl
  -lpthread
  -rpath
  /nix/store/r2xapv59sz4cpa9zy9ydzck857r6xmrx-dmdBuild-2.083.1/lib64
  -rpath
  /nix/store/r2xapv59sz4cpa9zy9ydzck857r6xmrx-dmdBuild-2.083.1/lib
  -lstdc++
  -lm
  -lgcc_s
  -lgcc
  -lc
  -lgcc_s
  -lgcc
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/crtend.o
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/crtn.o
extra flags after to /nix/store/jdlb06c0kp6sms277xcclfr3gdl8pb9r-binutils-2.30/bin/ld.gold:
  -rpath
  /nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib
  -rpath
  /nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
../generated/linux/release/64/backend.a(evalu8.o):dmd/backend/evalu8.d:function evalu8(elem*, unsigned int): error: undefined reference to '_Z7_moduloeS_'
collect2: error: ld returned 1 exit status
December 22, 2018
On Saturday, 22 December 2018 at 23:29:13 UTC, Thomas Mader wrote:
> I enabled more debug output from the Nix environment so the compiler flags can be seen.

The part with fp.c:

  (CC)  BACK_OBJS  dmd/backend/fp.c
c++ -c -o../generated/linux/release/64/fp.o -Wno-deprecated -Wstrict-aliasing -Werror -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -m64 -fPIC -std=gnu++98 -O2 -Idmd/root -Idmd/tk -Idmd/backend -I../generated/linux/release/64 -Idmd -DDMDV2=1 -MMD -MF ../generated/linux/release/64/fp.deps dmd/backend/fp.c
  (CC)  BACK_OBJS  dmd/backend/cgen.c
c++ -c -o../generated/linux/release/64/cgen.o -Wno-deprecated -Wstrict-aliasing -Werror -fno-exceptions -fno-rtti -D__pascal= -DMARS=1 -DTARGET_LINUX=1 -DDM_TARGET_CPU_X86=1 -m64 -fPIC -std=gnu++98 -O2 -Idmd/root -Idmd/tk -Idmd/backend -I../generated/linux/release/64 -Idmd -DDMDV2=1 -MMD -MF ../generated/linux/release/64/cgen.deps dmd/backend/cgen.c
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
HARDENING: enabling fortify
HARDENING: enabling stackprotector
HARDENING: enabling strictoverflow
HARDENING: enabling format
HARDENING: enabling pic
extra flags before to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -O2
  -D_FORTIFY_SOURCE=2
  -fstack-protector-strong
  --param
  ssp-buffer-size=4
  -fno-strict-overflow
  -Wformat
  -Wformat-security
  -Werror=format-security
  -fPIC
original flags to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -c
  -o../generated/linux/release/64/os.o
  -Wno-deprecated
  -Wstrict-aliasing
  -Werror
  -fno-exceptions
  -fno-rtti
  -D__pascal=
  -DMARS=1
  -DTARGET_LINUX=1
  -DDM_TARGET_CPU_X86=1
  -m64
  -fPIC
  -std=gnu++98
  -O2
  -Idmd/root
  -Idmd/tk
  -Idmd/backend
  -I../generated/linux/release/64
  -Idmd
  -DDMDV2=1
  -MMD
  -MF
  ../generated/linux/release/64/os.deps
  dmd/backend/os.c
extra flags after to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -B/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -B/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/
  -idirafter
  /nix/store/psqblh5bsgkbkhn4r648pgjw5rq4npkv-glibc-2.27-dev/include
  -idirafter
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed
  -B/nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
HARDENING: enabling fortify
HARDENING: enabling stackprotector
HARDENING: enabling strictoverflow
HARDENING: enabling format
HARDENING: enabling pic
HARDENING: disabled flags: pie
HARDENING: Is active (not completely disabled with "all" flag)
extra flags before to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -O2
  -D_FORTIFY_SOURCE=2
  -fstack-protector-strong
  --param
  ssp-buffer-size=4
  -fno-strict-overflow
  -Wformat
  -Wformat-security
  -Werror=format-security
  -fPIC
original flags to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -c
  -o../generated/linux/release/64/fp.o
  -Wno-deprecated
  -Wstrict-aliasing
  -Werror
  -fno-exceptions
  -fno-rtti
  -D__pascal=
  -DMARS=1
  -DTARGET_LINUX=1
  -DDM_TARGET_CPU_X86=1
  -m64
  -fPIC
  -std=gnu++98
  -O2
  -Idmd/root
  -Idmd/tk
  -Idmd/backend
  -I../generated/linux/release/64
  -Idmd
  -DDMDV2=1
  -MMD
  -MF
  ../generated/linux/release/64/fp.deps
  dmd/backend/fp.c
extra flags after to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -B/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -B/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/
  -idirafter
  /nix/store/psqblh5bsgkbkhn4r648pgjw5rq4npkv-glibc-2.27-dev/include
  -idirafter
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed
  -B/nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
HARDENING: enabling fortify
HARDENING: enabling stackprotector
HARDENING: enabling strictoverflow
HARDENING: enabling format
HARDENING: enabling pic
extra flags before to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -O2
  -D_FORTIFY_SOURCE=2
  -fstack-protector-strong
  --param
  ssp-buffer-size=4
  -fno-strict-overflow
  -Wformat
  -Wformat-security
  -Werror=format-security
  -fPIC
original flags to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -c
  -o../generated/linux/release/64/cgen.o
  -Wno-deprecated
  -Wstrict-aliasing
  -Werror
  -fno-exceptions
  -fno-rtti
  -D__pascal=
  -DMARS=1
  -DTARGET_LINUX=1
  -DDM_TARGET_CPU_X86=1
  -m64
  -fPIC
  -std=gnu++98
  -O2
  -Idmd/root
  -Idmd/tk
  -Idmd/backend
  -I../generated/linux/release/64
  -Idmd
  -DDMDV2=1
  -MMD
  -MF
  ../generated/linux/release/64/cgen.deps
  dmd/backend/cgen.c
extra flags after to /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/bin/g++:
  -B/nix/store/x6inizi5ahlyhqxxwv1rvn05a25icarq-gcc-7.3.0-lib/lib
  -B/nix/store/xdsjx0gba4id3yyqxv66bxnm2sqixkjj-glibc-2.27/lib/
  -idirafter
  /nix/store/psqblh5bsgkbkhn4r648pgjw5rq4npkv-glibc-2.27-dev/include
  -idirafter
  /nix/store/p7j7qg5cri229ihf8nllwjhzgbvgx5d0-gcc-7.3.0/lib/gcc/x86_64-unknown-linux-gnu/7.3.0/include-fixed
  -B/nix/store/klci955kxil7q32ggran6lnhpnkk8yjz-gcc-wrapper-7.3.0/bin/
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include
  -isystem
  /nix/store/gvmijbjia22rskv7xfm36004zsyi62mr-ldc-1.13.0/include
  -isystem
  /nix/store/6yf8cndis3p9awh5wmwplyrqv55y4y3a-gdb-8.2/include
  -isystem
  /nix/store/yhckr5a12np73av4c4k1v1ffqj0bx53h-curl-7.62.0-dev/include
  -isystem
  /nix/store/s7f8awsadn61qmbz1mfniw2c3zxcifq0-nghttp2-1.35.0-dev/include
  -isystem
  /nix/store/a50sg2xm6vflzx5kma3sih39dq9wv7z6-zlib-1.2.11-dev/include
  -isystem
  /nix/store/jfyrrk9xkqm06x5vcx6cs4qm34bzl39h-libkrb5-1.15.2-dev/include
  -isystem
  /nix/store/v7gs3pmbg43ys16fbhhc9sq89s4vj236-openssl-1.0.2q-dev/include
  -isystem
  /nix/store/v42mn058w6gb8ycyf1phvi8f8c9a4k8m-libssh2-1.8.0-dev/include
  -isystem
  /nix/store/9nzy5rd0mk57va1sr4br936pjk24ns8p-tzdata-2018g-dev/include

December 22, 2018
On 12/22/2018 1:58 PM, Thomas Mader wrote:
> Anybody an idea?

It means the file evalu8.d was referencing a function or symbol named "modulo" and the linker couldn't find it.

1) Look in evalu8.d for the reference.

2) grep "modulo" *.d to see where it may be.
December 23, 2018
On Sunday, 23 December 2018 at 00:11:05 UTC, Walter Bright wrote:
> On 12/22/2018 1:58 PM, Thomas Mader wrote:
>> Anybody an idea?
>
> It means the file evalu8.d was referencing a function or symbol named "modulo" and the linker couldn't find it.
>
> 1) Look in evalu8.d for the reference.
>
> 2) grep "modulo" *.d to see where it may be.

To me it looks like fp.c has the implementation and evalu8 is using it.
The name mangling of fp.c compiled with g++ is different from evalu8.d compiled with ldc.
drtlsym.d seems to be creating a symbol and I guess that's somehow not working in my case.
But if I am right I also don't understand why drtlsym is needed at all. Wouldn't it be possible to just declare _modulo as extern( C++ ) in evalu8.d?

And how is it possible that drtlsym is not working in my case when it is for Archlinux with the same dependencies?
I have not yet found a difference which could explain the problem.
December 23, 2018
On 12/22/2018 6:29 PM, Thomas Mader wrote:
> To me it looks like fp.c has the implementation and evalu8 is using it.
> The name mangling of fp.c compiled with g++ is different from evalu8.d compiled with ldc.

I wonder why you're compile some parts with g++ and some with ldc.

When I have trouble with name mangling variations, I use 'grep' to see what the name mangling is in the various object files, then I fiddle with the declarations until they line up.
December 23, 2018
On 2018-12-23 11:15, Walter Bright wrote:

> I wonder why you're compile some parts with g++ and some with ldc.

Because fp.c is a C++ file?

-- 
/Jacob Carlborg
December 23, 2018
On 12/23/2018 2:25 AM, Jacob Carlborg wrote:
> On 2018-12-23 11:15, Walter Bright wrote:
> 
>> I wonder why you're compile some parts with g++ and some with ldc.
> 
> Because fp.c is a C++ file?
> 

ldc should be paired with clang.
« First   ‹ Prev
1 2