Bug 204281 - devel/llvm36 fails to build on arm64
Summary: devel/llvm36 fails to build on arm64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Some People
Assignee: Andrew Turner
URL:
Keywords:
Depends on:
Blocks: 201763
  Show dependency treegraph
 
Reported: 2015-11-04 11:05 UTC by Andrew Turner
Modified: 2015-11-05 22:08 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (brooks)


Attachments
Partial fix (835 bytes, patch)
2015-11-04 11:05 UTC, Andrew Turner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Turner freebsd_committer 2015-11-04 11:05:39 UTC
Created attachment 162765 [details]
Partial fix

Teh devel/llvm36 port fails to build on arm64. I have attached a partial fix. It fixes errors such as:

llvm[3]: Constructing LLVMBuild project information.
Usage: llvm-build [options]

llvm-build: error: invalid native target: 'aarch64' (not in project)

However I now get:

gmake[2]: Entering directory '/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/tools/llvm-lto'
llvm[2]: Linking Release executable llvm-lto (without symbols)
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCMachObjectTargetWriter'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCWinCOFFStreamer'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCRelocationInfo'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCWinCOFFObjectTargetWriter'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCAsmInfoELF'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCAsmInfoGNUCOFF'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCAsmBackend'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCAsmInfoDarwin'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCELFObjectTargetWriter'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCCodeEmitter'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/lib/libLLVM-3.6.so: undefined reference to `typeinfo for llvm::MCAsmInfoMicrosoft'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Makefile.rules:1427: recipe for target '/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-lto' failed
gmake[2]: *** [/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Release/bin/llvm-lto] Error 1
gmake[2]: Leaving directory '/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/tools/llvm-lto'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Makefile.rules:883: recipe for target 'all' failed
gmake[1]: *** [all] Error 1
gmake[1]: Leaving directory '/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/tools'
/usr/obj/usr/ports/devel/llvm36/work/llvm-3.6.2.src/Makefile.rules:883: recipe for target 'all' failed
gmake: *** [all] Error 1
Comment 1 Andrew Turner freebsd_committer 2015-11-04 12:11:38 UTC
I rebuilt and didn't get the error. It was most likely an issue on my part.

The patch is still needed, so should be committed.
Comment 2 commit-hook freebsd_committer 2015-11-04 19:45:27 UTC
A commit references this bug:

Author: brooks
Date: Wed Nov  4 19:45:20 UTC 2015
New revision: 400755
URL: https://svnweb.freebsd.org/changeset/ports/400755

Log:
  Allow build on aarch64.

  PR:		204281
  Submitted by:	andrew

Changes:
  head/devel/llvm36/files/patch-utils_llvm-build_llvmbuild_main.py
Comment 3 Brooks Davis freebsd_committer 2015-11-05 00:21:25 UTC
I've committed the patch, but don't currently have a way to test so I've assigned this back to Andrew.
Comment 4 Andrew Turner freebsd_committer 2015-11-05 22:08:41 UTC
This builds in Poudriere on hardware.