Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't link dmd on macOS #19505

Closed
dlangBugzillaToGithub opened this issue Nov 7, 2018 · 6 comments
Closed

can't link dmd on macOS #19505

dlangBugzillaToGithub opened this issue Nov 7, 2018 · 6 comments
Labels
Arch:x86_64 Issues specific to x86_64 P2 Severity:critical

Comments

@dlangBugzillaToGithub
Copy link

John Colvin (@John-Colvin) reported this on 2018-11-07T10:25:39Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=19373

CC List

Description

Created attachment 1715
linker errors

make -f posix.mak fails with a long list of missing symbols, please find output attached

!!!There are attachements in the bugzilla issue that have not been copied over!!!

@dlangBugzillaToGithub
Copy link
Author

doob (@jacob-carlborg) commented on 2018-11-07T19:34:19Z

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?

@dlangBugzillaToGithub
Copy link
Author

doob (@jacob-carlborg) commented on 2018-11-07T19:35:51Z

I've tried compiling with DMD 2.081.0 to 2.083.0.

@dlangBugzillaToGithub
Copy link
Author

iamthewilsonator commented on 2018-11-09T10:13:34Z

I also have this problem.

@dlangBugzillaToGithub
Copy link
Author

iamthewilsonator commented on 2018-11-09T11:22:13Z

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.

@dlangBugzillaToGithub
Copy link
Author

iamthewilsonator commented on 2018-11-09T11:57:00Z

... 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.

@dlangBugzillaToGithub
Copy link
Author

iamthewilsonator commented on 2018-12-02T07:26:17Z

Are you still experiencing this? If not please close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Arch:x86_64 Issues specific to x86_64 P2 Severity:critical
Projects
None yet
Development

No branches or pull requests

2 participants