Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636840 - sys-devel/llvm-5.0.0: missing libFuzzer static lib
Summary: sys-devel/llvm-5.0.0: missing libFuzzer static lib
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-07 21:40 UTC by LE GARREC Vincent
Modified: 2017-12-20 20:58 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description LE GARREC Vincent 2017-11-07 21:40:39 UTC
libFuzzer has it own ebuild up to llvm-3.9.1. It doesn't exists for next release because it's inside LLVM.
When compiling llvm-5, there's 2 static lib that should be install : "libLLVMFuzzer.a" and "libLLVMFuzzerNoMain.a".
They both are in llvm-5.0.0/work/llvm-5.0.0.src-abi_x86_32.x86/lib32 and llvm-5.0.0/work/llvm-5.0.0.src-abi_x86_64.amd64/lib64

According to http://llvm.org/svn/llvm-project/llvm/trunk/lib/Fuzzer/README.txt libFuzzer was moved to compiler-rt but I don't know if this USE should be added because llvm compiles it by default in my computer. By default in llvm-5.0.0.tar.xz ?

There is just a problem with multilib :
When I run an example :

clang++ -fsanitize=fuzzer XXX.cc

it's asking for libLLVMFuzzer.a in /usr/lib/llvm/5/lib/

but if I run

clang++ -m32 -fsanitize=fuzzer XXX.cc

it's also asking for libLLVMFuzzer.a in /usr/lib/llvm/5/lib/

Reproducible: Always




Portage 2.3.13 (python 3.5.4-final-0, default/linux/amd64/13.0/desktop/gnome/systemd, gcc-7.2.0, glibc-2.25-r9, 4.13.9-gentoo x86_64)
=================================================================
System uname: Linux-4.13.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.4.1
KiB Mem:    16383752 total,    420136 free
KiB Swap:    9767516 total,   9767516 free
Timestamp of repository gentoo: Tue, 31 Oct 2017 19:30:01 +0000
Head commit of repository gentoo: 8c966d686d33f94c017b779033f06e7b7df98c9b
sh bash 4.4_p12
ld GNU ld (Gentoo 2.29.1 p3) 2.29.1
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.26.1::gentoo
dev-lang/python:          2.7.14::gentoo, 3.5.4::gentoo
dev-util/cmake:           3.9.4::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.5::gentoo
sys-apps/sandbox:         2.12::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.29.1-r1::gentoo
sys-devel/gcc:            5.4.0-r3::gentoo, 7.2.0::gentoo
sys-devel/gcc-config:     1.9.0::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 

crossdev
    location: /home/legarrec/info/overlay
    masters: gentoo
    priority: 0

gentoo-zh
    location: /var/lib/layman/gentoo-zh
    masters: gentoo
    priority: 50

pentoo
    location: /var/lib/layman/pentoo
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/chromium/policies/managed/chrome-gnome-shell.json /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/opt/chrome/policies/managed/chrome-gnome-shell.json /etc/php/apache2-php7.1/ext-active/ /etc/php/cgi-php7.1/ext-active/ /etc/php/cli-php7.1/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-j9 --load-average=9"
FCFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict news noclean parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O0 -ggdb2 -g2 -pipe -fno-omit-frame-pointer"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="fr_FR.UTF-8"
LDFLAGS="-Wl,--as-needed -Wl,-O0"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/home/legarrec/info"
USE="X a52 aac accessibility acl acpi alsa amd64 berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cuda cups cxx dbus dhcpcd dri dts dvd dvdr eds emboss encode evo exif fam firefox flac fortran gdbm gif glamor gnome gnome-keyring gnome-online-accounts gpm gtk gtk3 iconv introspection ipv6 jpeg lcms ldap libav libnotify libsecret mad mng modules mp3 mp4 mpeg multilib nautilus ncurses nls nptl ogg opencl opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support readline sdl seccomp session spell ssl startup-notification svg systemd tcpd tiff tracker truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4 sse4_1 sse4_2 ssse3" CURL_SSL="openssl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" L10N="fr en ja" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="fr en ja" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-devel/llvm-5.0.0::gentoo was built with the following:
USE="doc gold libffi ncurses -debug -libedit -test" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore"


sys-devel/clang-5.0.0::gentoo was built with the following:
USE="default-compiler-rt doc static-analyzer xml z3 -debug -default-libcxx -test" ABI_X86="32 (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARM -Hexagon -Lanai -MSP430 -Mips -PowerPC -Sparc -SystemZ -XCore" PYTHON_TARGETS="python2_7"
Comment 1 David Hallas 2017-11-08 08:24:49 UTC
I think the move of libFuzzer happened after the branch for 5.0 was created.

BTW - I have run into the same issue and ended up compiling libFuzzer myself, but it would be really nice to have this included in the ebuild and I would be happy to test out patches :)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-11-12 08:29:35 UTC
Thanks for the report. I actually didn't know clang-5.0 supports this option already. I'll add the bits to install the library to 5.0.9999 for now. I'd rather not bump 5.0.0 since it's a rather minor library to cause rebuilds for all our users and 5.0.1 is coming up soon.
Comment 3 Larry the Git Cow gentoo-dev 2017-11-12 09:27:12 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=948cd2f9cd1634732f3e114b8179157a8df6b520

commit 948cd2f9cd1634732f3e114b8179157a8df6b520
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-11-12 08:37:02 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-11-12 09:27:00 +0000

    sys-devel/llvm: Install missing Fuzzer libraries in 5.0.9999
    
    Bug: https://bugs.gentoo.org/636840

 sys-devel/llvm/llvm-5.0.9999.ebuild | 5 +++++
 1 file changed, 5 insertions(+)}
Comment 4 LE GARREC Vincent 2017-11-13 08:50:58 UTC
Great, thanks,

I will give you my feedback when clang 5.0.1 will be out.
Comment 5 Larry the Git Cow gentoo-dev 2017-12-20 20:58:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=849e14c28cd1743b443c7d8b41b61c1b4a56f2fa

commit 849e14c28cd1743b443c7d8b41b61c1b4a56f2fa
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2017-12-20 19:16:28 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2017-12-20 20:58:40 +0000

    sys-devel/llvm: Bump to 5.0.1 (final)
    
    Closes: https://bugs.gentoo.org/617154
    Closes: https://bugs.gentoo.org/636840

 sys-devel/llvm/Manifest                                  |  3 ++-
 .../llvm/{llvm-5.0.1_rc2.ebuild => llvm-5.0.1.ebuild}    | 16 ++++++++--------
 2 files changed, 10 insertions(+), 9 deletions(-)