# 11.2 -> 11.3: make buildworld fails with undefined reference



## Maelstorm (Oct 3, 2019)

When using make buildworld to build the system from source, the build fails with the following error:


```
/usr/obj/usr/src/lib/clang/libllvm/libllvm.a(PPCTargetObjectFile.o):(.rodata._ZTVN4llvm26PPC64LinuxTargetObjectFileE+0x18): undefined reference to `llvm::TargetLoweringObjectFileELF::emitModuleMetadata(llvm::MCStreamer&, llvm::Module&, llvm::TargetMachine const&) const'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
```

I just updated the source to RELENG 11.3 using subversion and this is what's happening.  Any ideas on what I need to do to correct this?  Is it failing for other people?  Should I send in a bug report?


----------



## D-FENS (Oct 3, 2019)

Maybe start a make with "-v" as suggested in the error message to gather some more info?


----------



## Maelstorm (Oct 3, 2019)

Well, I would...but I don't know how to get the -v to the linker from the make buildworld on the command line.  What variable do I have to set to do that?  I can't seem to find it in the documentation.


----------



## D-FENS (Oct 4, 2019)

Maelstorm said:


> Well, I would...but I don't know how to get the -v to the linker from the make buildworld on the command line.  What variable do I have to set to do that?  I can't seem to find it in the documentation.


Indeed. Unfortunately I also have not done it and don't know how to. Anyone?

I have an idea - the source is built in /usr/obj, if I recall correctly. Search the directory for a log file, maybe the commands were logged there. You could call the linker manually with the command from the log file, if it exists.


----------



## Maelstorm (Oct 4, 2019)

roccobaroccoSC said:


> I have an idea - the source is built in /usr/obj, if I recall correctly. Search the directory for a log file, maybe the commands were logged there. You could call the linker manually with the command from the log file, if it exists.



I made a log file with this command: `make buildworld > /tmp/buildworld.tmp 2>&1 &` and it showed the error in the file, but not the invocation of `ld`.  Since I ran make update on the 11.2 source directory, I'm wondering if that had something to do with it.  So, in order to resolve the issue, I deleted the contents of /usr/src and /usr/obj and I'm starting the build over.  It's been running for about 21 hours now, so far so good.


----------

