Bug 209029 - devel/llvm38: libclang_rt.asan-i386.a: No such file or directory
Summary: devel/llvm38: libclang_rt.asan-i386.a: No such file or directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Brooks Davis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-25 10:15 UTC by Mikael Simonsson
Modified: 2016-05-02 23:02 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Simonsson 2016-04-25 10:15:04 UTC
I'm trying to update to the latest version which fixes: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208900

# uname -a
FreeBSD aria 10.2-RELEASE-p9 FreeBSD 10.2-RELEASE-p9 #0: Thu Jan 14 01:32:46 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64

# make install clean
...
===>  Installing for llvm38-3.8.0_2
===>  Checking if llvm38 already installed
===>   Registering installation for llvm38-3.8.0_2
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.asan-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.asan-i386.so: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.asan-preinit-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.asan_cxx-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.builtins-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.profile-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.safestack-i386.a: No such file or directory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.ubsan_standalone-i386.a: No such file or direc
tory
pkg-static: Unable to access file /usr/ports/devel/llvm38/work/stage/usr/local/llvm38/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a: No such file or d
irectory
*** Error code 74

Stop.
make[1]: stopped in /usr/ports/devel/llvm38
*** Error code 1
Comment 1 Tom Francis 2016-04-28 19:12:28 UTC
I see the same error on:

FreeBSD hostname 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64


This appears to be happening because on amd64, only the amd64 libraries are compiled, but the Makefile assumes that libraries for both amd64 and i386 are compiled.  A quick check, to change 220 from:

.if ${ARCH} == "i386" || ${ARCH} == "amd64"

to

.if ${ARCH} == "i386"

allows the port to install on my system.  However, I'm assuming the intent is for both sets of libraries to be compiled and installed, so no patch to make this change is provided. :)

Content of /var/db/ports/devel_llvm38/options:
# This file is auto-generated by 'make config'.
# Options for llvm38-3.8.0_2
_OPTIONS_READ=llvm38-3.8.0_2
_FILE_COMPLETE_OPTIONS_LIST=CLANG COMPILER_RT DOCS EXTRAS GOLD LIT LLD LLDB OPENMP
OPTIONS_FILE_SET+=CLANG
OPTIONS_FILE_SET+=COMPILER_RT
OPTIONS_FILE_UNSET+=DOCS
OPTIONS_FILE_SET+=EXTRAS
OPTIONS_FILE_SET+=GOLD
OPTIONS_FILE_SET+=LIT
OPTIONS_FILE_SET+=LLD
OPTIONS_FILE_SET+=LLDB
OPTIONS_FILE_SET+=OPENMP
Comment 2 Brooks Davis freebsd_committer freebsd_triage 2016-04-28 20:25:34 UTC
Unfortunately, in other environments including under pouderiere, amd64 really does imply i386.  I've got a query out to the llvm lists to try and find a resolution as cmake has defeated me thus far.  For now, building on the package cluster is going to have to take precedence. :(
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-05-02 22:56:03 UTC
A commit references this bug:

Author: brooks
Date: Mon May  2 22:55:23 UTC 2016
New revision: 414485
URL: https://svnweb.freebsd.org/changeset/ports/414485

Log:
  Remove builds of i386 sanitizers on amd64.

  The cmake build system would attempt to check if -m32 builds worked and
  then add those files.  There are an infinite number of reasons why -m32
  might not work on a given system so rip out the test to ensure a
  consistant build.

  PR:		209029

Changes:
  head/devel/llvm38/Makefile
  head/devel/llvm38/files/compiler-rt-patch-no-m32
Comment 4 Brooks Davis freebsd_committer freebsd_triage 2016-05-02 23:02:56 UTC
Hopefully fixed now.  Will fix in llvm-devel shortly.