Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832034 - net-proxy/privoxy-3.0.33 failed to build on riscv with USE=sanitize enabled
Summary: net-proxy/privoxy-3.0.33 failed to build on riscv with USE=sanitize enabled
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-25 11:34 UTC by sjj991212
Modified: 2022-01-27 01:29 UTC (History)
1 user (show)

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


Attachments
build.log (build.log.xz,1.91 KB, application/x-xz)
2022-01-25 11:34 UTC, sjj991212
Details
config.log (config.log,51.26 KB, text/plain)
2022-01-25 14:43 UTC, Yixun Lan
Details
conftest.c (conftest.c,1.95 KB, text/x-csrc)
2022-01-25 14:44 UTC, Yixun Lan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sjj991212 2022-01-25 11:34:19 UTC
Created attachment 763601 [details]
build.log

net-proxy/prioxy-3.0.33 failed to build on riscv hardware.
Comment 1 Yixun Lan archtester gentoo-dev 2022-01-25 14:43:20 UTC
Created attachment 763613 [details]
config.log
Comment 2 Yixun Lan archtester gentoo-dev 2022-01-25 14:44:11 UTC
Created attachment 763614 [details]
conftest.c
Comment 3 Yixun Lan archtester gentoo-dev 2022-01-25 14:49:19 UTC
I can reproduce this while build conftest.c with passing -fsanitize=undefined if USE=sanitize enabled
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-25 16:42:12 UTC
configure:6314: riscv64-unknown-linux-gnu-gcc -o conftest -pipe -O2 -pipe -mabi=lp64d -DNDEBUG -fsanitize=undefined -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1   -Wl,-O1 -Wl,--as-needed -fsanitize=undefined conftest.c  1>&5
/usr/lib/gcc/riscv64-unknown-linux-gnu/11.2.1/../../../../riscv64-unknown-linux-gnu/bin/ld: cannot find -lubsan
collect2: error: ld returned 1 exit status

---
Please verify USE=sanitize is enabled on GCC.

I'm also not even sure if riscv has a sanitizers port yet...
Comment 5 Yixun Lan archtester gentoo-dev 2022-01-26 02:46:59 UTC
(In reply to Sam James from comment #4)
> Please verify USE=sanitize is enabled on GCC.
> 
> I'm also not even sure if riscv has a sanitizers port yet...

ya, I realized this, previously, USE=sanitize is not enabled on GCC.. will investigate this..

btw, on a sidetrack, should privoxy explicitly depend on this?
 USE: sanitize ? sys-devel/gcc[sanitize]
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-26 03:04:24 UTC
(In reply to Yixun Lan from comment #5)
> (In reply to Sam James from comment #4)
> > Please verify USE=sanitize is enabled on GCC.
> > 
> > I'm also not even sure if riscv has a sanitizers port yet...
> 
> ya, I realized this, previously, USE=sanitize is not enabled on GCC.. will
> investigate this..
> 

My bet is they're not there yet but I'm not sure.

> btw, on a sidetrack, should privoxy explicitly depend on this?
>  USE: sanitize ? sys-devel/gcc[sanitize]

Nah, there's Clang sanitizers too.

I don't think USE=sanitize should even be here. It's a *FLAGS option and it's not really intended for production use anyway.

It should be masked if kept, as I accept it could be useful for development, but it's not something people should just toggle.
Comment 7 Yixun Lan archtester gentoo-dev 2022-01-27 01:29:04 UTC
(In reply to Sam James from comment #6)
> My bet is they're not there yet but I'm not sure.
> 
I've enabled gcc[sanitize], and it actually solve this problem, so I will go ahead and unmask gcc[sanitize]

> > btw, on a sidetrack, should privoxy explicitly depend on this?
> >  USE: sanitize ? sys-devel/gcc[sanitize]
> 
> Nah, there's Clang sanitizers too.
> 
it's true

> I don't think USE=sanitize should even be here. It's a *FLAGS option and
> it's not really intended for production use anyway.

> 
> It should be masked if kept, as I accept it could be useful for development,
> but it's not something people should just toggle.

I will leave maintainer to handle this, also USE=fuzz is kind of similar (only useful for development)