Thread overview
[Issue 19373] can't link dmd on macOS
Nov 07, 2018
Jacob Carlborg
Nov 07, 2018
Jacob Carlborg
Nov 09, 2018
Nicholas Wilson
Nov 09, 2018
Nicholas Wilson
Nov 09, 2018
Nicholas Wilson
Dec 02, 2018
Nicholas Wilson
Dec 17, 2022
Iain Buclaw
November 07, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

Jacob Carlborg <doob@me.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doob@me.com

--- Comment #1 from Jacob Carlborg <doob@me.com> ---
Works for me. I noticed this in your output:

ld: warning: ignoring file ../generated/osx/release/64/backend.a, file was built for archive which is not the architecture being linked (x86_64): ../generated/osx/release/64/backend.a

Do you have some leftovers from a previous builds?

--
November 07, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

--- Comment #2 from Jacob Carlborg <doob@me.com> ---
I've tried compiling with DMD 2.081.0 to 2.083.0.

--
November 09, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

Nicholas Wilson <iamthewilsonator@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iamthewilsonator@hotmail.co
                   |                            |m

--- Comment #3 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
I also have this problem.

--
November 09, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

--- Comment #4 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
My list of missing symbols is much shorter though:
Undefined symbols for architecture x86_64:
  "movregconst(CodeBuilder&, unsigned int, unsigned long long, unsigned int)",
referenced from:
      regwithvalue(CodeBuilder&, unsigned int, unsigned long long, unsigned
int*, unsigned int) in backend.a(cgen.o)
  "reghasvalue(unsigned int, unsigned long, unsigned int*)", referenced from:
      simplify_code(code*) in backend.a(cod3.o)
      ...
  "regwithvalue(CodeBuilder&, unsigned int, unsigned long, unsigned int*,
unsigned int)", referenced from:
      load87(CodeBuilder&, elem*, unsigned int, unsigned int*, elem*, int) in
backend.a(cg87.o)
      ...
  "genc2(code*, unsigned int, unsigned int, unsigned long)", referenced from:
      doswitch(CodeBuilder&, block*) in backend.a(cod3.o)
  "CodeBuilder::genc(unsigned int, unsigned int, unsigned int, unsigned long,
unsigned int, unsigned long)", referenced from:
      cnvt87(CodeBuilder&, elem*, unsigned int*) in backend.a(cg87.o)
      ...
  "CodeBuilder::genc1(unsigned int, unsigned int, unsigned int, unsigned
long)", referenced from:
      ndp_fstp(CodeBuilder&, int, unsigned int) in backend.a(cg87.o)
      ...
  "CodeBuilder::genc2(unsigned int, unsigned int, unsigned long)", referenced
from:
      genjmpifC2(CodeBuilder&, code*) in backend.a(cg87.o)
      ...
  "CodeBuilder::genfltreg(unsigned int, unsigned int, unsigned long)",
referenced from:
      fixresult_complex87(CodeBuilder&, elem*, unsigned int, unsigned int*) in
backend.a(cg87.o)
      fixresult87(CodeBuilder&, elem*, unsigned int, unsigned int*) in
backend.a(cg87.o)
      ...
  "CodeBuilder::genxmmreg(unsigned int, unsigned int, unsigned long, unsigned
int)", referenced from:
      fixresult_complex87(CodeBuilder&, elem*, unsigned int, unsigned int*) in
backend.a(cg87.o)
      fixresult87(CodeBuilder&, elem*, unsigned int, unsigned int*) in
backend.a(cg87.o)
      movxmmconst(CodeBuilder&, unsigned int, unsigned int, unsigned long,
unsigned int) in backend.a(cgxmm.o)
      fixresult(CodeBuilder&, elem*, unsigned int, unsigned int*) in
backend.a(cod1.o)
      loaddata(CodeBuilder&, elem*, unsigned int*) in backend.a(cod1.o)
  "Obj::reftoident(int, unsigned long, Symbol*, unsigned long, int)",
referenced from:
      codout(int, code*) in backend.a(cod3.o)
      do16bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
      do32bit(MiniCodeBuf*, int, evc*, int, int) in backend.a(cod3.o)
      do64bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
      el_ptr(Symbol*) in backend.a(elem.o)
  "Obj::reftodatseg(int, unsigned long, unsigned long, unsigned int, int)",
referenced from:
      codout(int, code*) in backend.a(cod3.o)
      do16bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
      do32bit(MiniCodeBuf*, int, evc*, int, int) in backend.a(cod3.o)
      do64bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
  "Obj::reftocodeseg(int, unsigned long, unsigned long)", referenced from:
      codgen(Symbol*) in backend.a(cgcod.o)
      outswitab(block*) in backend.a(cod3.o)
      do16bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
      do32bit(MiniCodeBuf*, int, evc*, int, int) in backend.a(cod3.o)
      do64bit(MiniCodeBuf*, int, evc*, int) in backend.a(cod3.o)
  "Obj::bytes(int, unsigned long, unsigned int, void*)", referenced from:
      codout(int, code*) in backend.a(cod3.o)
      MiniCodeBuf::flushx() in backend.a(cod3.o)
      el_convstring(elem*) in backend.a(elem.o)
  "Obj::lidata(int, unsigned long, unsigned long)", referenced from:
      outjmptab(block*) in backend.a(cod3.o)
      outswitab(block*) in backend.a(cod3.o)
  "Obj::linnum(Srcpos, int, unsigned long)", referenced from:
      codgen(Symbol*) in backend.a(cgcod.o)
      codout(int, code*) in backend.a(cod3.o)
  "Obj::pubdef(int, Symbol*, unsigned long)", referenced from:
      cod3_thunk(Symbol*, Symbol*, unsigned int, unsigned int, unsigned int,
int, unsigned int) in backend.a(cod3.o)
ld: symbol(s) not found for architecture x86_64

They all seem to be backend symbols.

--
November 09, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

--- Comment #5 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
... and it works now. I suspect it is related to the recent backend changes. Make sure you run make -f posix.mak clean and try again with git master.

--
December 02, 2018
https://issues.dlang.org/show_bug.cgi?id=19373

--- Comment #6 from Nicholas Wilson <iamthewilsonator@hotmail.com> ---
Are you still experiencing this? If not please close.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=19373

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P2

--