Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 543554

Summary: net-misc/aria2-1.18.9 compile error 'SYS_getrandom' undeclared
Product: Gentoo Linux Reporter: Sebastian Pipping <sping>
Component: Current packagesAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED FIXED    
Severity: normal CC: floppym, mgorny
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log

Description Sebastian Pipping gentoo-dev 2015-03-16 23:03:04 UTC
Created attachment 399076 [details]
Build log

[..]
getrandom_linux.c: In function 'getrandom_linux':
getrandom_linux.c:48:18: error: 'SYS_getrandom' undeclared (first use in this function)
   return syscall(SYS_getrandom, buf, buflen, 0);
                  ^
getrandom_linux.c:48:18: note: each undeclared identifier is reported only once for each function it appears in
getrandom_linux.c:50:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
Makefile:2262: recipe for target 'getrandom_linux.lo' failed
[..]
Comment 1 Mike Gilbert gentoo-dev 2015-03-17 02:19:04 UTC
What version of glibc are you using?

SYS_getrandom is declared in /usr/include/bits/syscall.h here.
Comment 2 Mike Gilbert gentoo-dev 2015-03-17 02:20:56 UTC
I'm sure there is also a minimal version of linux-headers required for __NR_getrandom.
Comment 3 Sebastian Pipping gentoo-dev 2015-03-17 21:28:47 UTC
(In reply to Mike Gilbert from comment #1)
> What version of glibc are you using?

# gcc -dumpversion
4.8.3


> SYS_getrandom is declared in /usr/include/bits/syscall.h here.

# fgrep SYS_getrandom /usr/include/bits/syscall.h
<no output>

That file is from sys-libs/glibc-2.19-r1 over here.
Comment 4 Mike Gilbert gentoo-dev 2015-03-17 21:36:28 UTC
(In reply to Sebastian Pipping from comment #3)
> That file is from sys-libs/glibc-2.19-r1 over here.

Indeed. That's why I asked for your glibc version, not your gcc version.
Comment 6 Sebastian Pipping gentoo-dev 2015-03-17 21:45:26 UTC
(In reply to Mike Gilbert from comment #4)
> Indeed. That's why I asked for your glibc version, not your gcc version.

I guess I was reading "g...c" to fast then :)
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-05-24 12:01:07 UTC
Newer versions are already around for some time.