Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729256 - app-forensics/honggfuzz-2.2-r1: fails to compile with Clang: ld: cannot find -lBlocksRuntime
Summary: app-forensics/honggfuzz-2.2-r1: fails to compile with Clang: ld: cannot find ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 729268
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2020-06-23 06:35 UTC by Agostino Sarubbo
Modified: 2020-08-28 07:49 UTC (History)
0 users

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


Attachments
build.log (build.log,20.70 KB, text/plain)
2020-06-23 06:35 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2020-06-23 06:35:47 UTC
@@This is an auto-filed bug@@
If you think that a different summary clarifies the issue better, feel free to change it.

Issue: app-forensics/honggfuzz fails to compile.
Discovered on: amd64

NOTE:
If you need further logs, feel free to ask.
Comment 1 Agostino Sarubbo gentoo-dev 2020-06-23 06:35:53 UTC
Created attachment 645810 [details]
build.log

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-23 07:00:36 UTC
"""
...
x86_64-pc-linux-gnu-clang -c -O2 -pipe -march=native -frecord-gcc-switches -fno-diagnostics-color -std=c11 -I/usr/local/include -D_GNU_SOURCE -Wall -Wextra -Wno-format-truncation -Wno-override-init -I. -D_FILE_OFFSET_BITS=64 -Wno-initializer-overrides -Wno-unknown-warning-option -Wno-gnu-empty-initializer -Wno-format-pedantic -Wno-gnu-statement-expression -mllvm -inline-threshold=2000 -D_HF_ARCH_LINUX -fPIC -fno-stack-protector -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0   -o libhfnetdriver/netdriver.o libhfnetdriver/netdriver.c
llvm-ar rcs libhfcommon/libhfcommon.a libhfcommon/files.o libhfcommon/log.o libhfcommon/ns.o libhfcommon/util.o
llvm-ar rcs libhfuzz/libhfuzz.a libhfuzz/fetch.o libhfuzz/instrument.o libhfuzz/linux.o libhfuzz/memorycmp.o libhfuzz/performance.o libhfuzz/persistent.o
x86_64-pc-linux-gnu-clang -shared -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -pthread -lm -L/usr/local/include -lunwind-ptrace -lunwind-generic -lunwind  -llzma -lopcodes -lbfd -lrt -ldl -lm -Wl,-Bstatic -lBlocksRuntime -Wl,-Bdynamic libhfuzz/fetch.o libhfuzz/instrument.o libhfuzz/linux.o libhfuzz/memorycmp.o libhfuzz/performance.o libhfuzz/persistent.o libhfcommon/files.o libhfcommon/log.o libhfcommon/ns.o libhfcommon/util.o -o libhfuzz/libhfuzz.so
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lBlocksRuntime
"""

CC="x86_64-pc-linux-gnu-clang" is probably a trigger.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-23 07:22:26 UTC
honggfuzz assumes that clang can implement -fblocks / -lBlocksRuntime.

Either Gentoo's compiler-rt needs to grow -fblocks support (filed bug #729268) or we can fail in pkg_pretend() at CC=clang and ask users to use gcc.
Comment 4 Larry the Git Cow gentoo-dev 2020-06-23 07:33:53 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6df80059bd5c0eb22d682642b7b0d1e1a8a0a736

commit 6df80059bd5c0eb22d682642b7b0d1e1a8a0a736
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-06-23 07:33:29 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-06-23 07:33:48 +0000

    app-forensics/honggfuzz: fail in pkg_pretend() on clang
    
    honggfuzz needs destructor implementation in C.
    On gcc it uses __attribute__((cleanup(. On clang it uses -fblocks.
    
    Gentoo's sys-libs/compiler-rt does not provide runtime support
    library for -fblocks on clang making them effectively unusable.
    
    Fail at pkg_pretend() for now.
    
    Reported-by: Agostino Sarubbo
    Bug: https://bugs.gentoo.org/729256
    Package-Manager: Portage-2.3.101, Repoman-2.3.22
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-forensics/honggfuzz/honggfuzz-2.2-r1.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 5 Larry the Git Cow gentoo-dev 2020-08-28 07:49:48 UTC
The bug has been closed via the following commit(s):

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

commit fd841336dfdefbc14907e2d9b1eb1a1a3f5f8b8e
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-08-28 07:49:28 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-08-28 07:49:44 +0000

    app-forensics/honggfuzz: enable clang support with USE=clang
    
    Reported-by: Agostino Sarubbo
    Closes: https://bugs.gentoo.org/729256
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 app-forensics/honggfuzz/honggfuzz-2.3.1.ebuild | 5 +++--
 app-forensics/honggfuzz/metadata.xml           | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

Additionally, it has been referenced in the following commit(s):

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

commit ae376c73ef197d6c7aa619e821c436ccab0cd77e
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-08-28 07:40:51 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-08-28 07:49:43 +0000

    sys-libs/blocksruntime: new package, clang's -fblocks runtime support
    
    Bug: https://bugs.gentoo.org/729256
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-libs/blocksruntime/Manifest                    |  1 +
 .../blocksruntime-0_pre20171027.ebuild             | 41 ++++++++++++++++++++++
 ...locksruntime-0_pre20171027-ldflags-soname.patch | 34 ++++++++++++++++++
 sys-libs/blocksruntime/metadata.xml                | 11 ++++++
 4 files changed, 87 insertions(+)