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

Bug 614424

Summary: app-admin/rsyslog: build failure: librelp.h not found
Product: Gentoo Linux Reporter: bliue
Component: Current packagesAssignee: Thomas Deutschmann (RETIRED) <whissi>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=613264
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Include librelp.h conditionally

Description bliue 2017-04-01 13:06:02 UTC
Created attachment 468864 [details, diff]
Include librelp.h conditionally

app-admin/rsyslog[test] fails compilation with


Making check in tests
make[1]: Entering directory '/var/tmp/portage/app-admin/rsyslog-8.24.0/work/rsyslog-8.24.0/tests'
...
x86_64-pc-linux-gnu-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -pthread     -march=native -O2 -pipe -c -o tcpflood-tcpflood.o `test -f 'tcpflood.c' || echo './'`tcpflood.c
tcpflood.c:99:21: fatal error: librelp.h: No such file or directory
 #include <librelp.h>
                     ^
compilation terminated.


The reason seems to be that the patch applied to fix the dependency on librelp (see #613264) missed the include of librelp.h.

Attached a patch to conditionally include librelp.h. (Note that the patch should be applied after the already included one otherwise there will be line number mismatches.)

diff -ur a/tests/tcpflood.c b/tests/tcpflood.c
--- a/tests/tcpflood.c
+++ b/tests/tcpflood.c
@@ -96,7 +96,9 @@
 #include <string.h>
 #include <netinet/in.h>
 #include <pthread.h>
+#ifdef ENABLE_RELP
 #include <librelp.h>
+#endif
 #include <sys/resource.h>
 #include <sys/time.h>
 #include <errno.h>
Comment 1 bliue 2017-04-01 13:28:29 UTC
... and of course the USE flag "relp" is disabled and dev-libs/librelp is not installed.
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2017-04-01 17:40:31 UTC
Thank you for the report. Confirmed and fixed in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5526ee34e1764adb6e0f02d35419e78e8db37094