Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 509532 - <setools-3.3.8-r5 build fail with unresolved overloaded function type
Summary: <setools-3.3.8-r5 build fail with unresolved overloaded function type
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: SELinux (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Sven Vermeulen (RETIRED)
URL:
Whiteboard: selinux-utils
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-04 12:12 UTC by Sven Vermeulen (RETIRED)
Modified: 2014-07-30 12:04 UTC (History)
3 users (show)

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


Attachments
setools build.log (setools-3.3.8-r4-buildfailure.log,74.29 KB, text/x-log)
2014-05-04 12:12 UTC, Sven Vermeulen (RETIRED)
Details
call lsetfilecon_raw directly (0010-directly-call-lsetfilecon_raw-bug-509532.patch,539 bytes, patch)
2014-05-04 12:44 UTC, Sven Vermeulen (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Vermeulen (RETIRED) gentoo-dev 2014-05-04 12:12:01 UTC
Build of setools fails with "unresolved overloaded function type":

replcon.cc: In function ‘int replcon_lsetfilecon(const char*, security_context_t)’:
replcon.cc:73:25: warning: NULL used in arithmetic [-Wpointer-arith]
replcon.cc:73:25: error: invalid operands of types ‘<unresolved overloaded function type>’ and ‘long int’ to binary ‘operator!=’


Reproducible: Always
Comment 1 Sven Vermeulen (RETIRED) gentoo-dev 2014-05-04 12:12:51 UTC
Created attachment 376324 [details]
setools build.log
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2014-05-04 12:44:57 UTC
Created attachment 376334 [details, diff]
call lsetfilecon_raw directly

Try placing this patch in /etc/portage/patches/app-admin/setools-3.3.8-r4/ and rebuild setools. The build failure itself should be resolved, but I need to do some more testing to make sure it doesn't break things (this is wrt weak symbols so I need to find the right code-path to test it out).
Comment 3 Arfrever Frehtes Taifersar Arahesis 2014-05-14 02:45:04 UTC
Difference between libselinux 2.2.2 and 2.3 contains:

--- include/selinux/selinux.h
+++ include/selinux/selinux.h
...
 /* Set file context */
-extern int setfilecon(const char *path, security_context_t con);
-extern int setfilecon_raw(const char *path, security_context_t con);
-extern int lsetfilecon(const char *path, security_context_t con);
-extern int lsetfilecon_raw(const char *path, security_context_t con);
-extern int fsetfilecon(int fd, security_context_t con);
-extern int fsetfilecon_raw(int fd, security_context_t con);
+extern int setfilecon(const char *path, const char * con);
+extern int setfilecon_raw(const char *path, const char * con);
+extern int lsetfilecon(const char *path, const char * con);
+extern int lsetfilecon_raw(const char *path, const char * con);
+extern int fsetfilecon(int fd, const char * con);
+extern int fsetfilecon_raw(int fd, const char * con);


This means that this change could be applied in setools:

--- secmds/replcon.cc
+++ secmds/replcon.cc
@@ -63 +63 @@
-extern int lsetfilecon_raw(const char *, security_context_t) __attribute__ ((weak));
+extern int lsetfilecon_raw(const char *, const char *) __attribute__ ((weak));
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2014-05-28 17:34:58 UTC
setools-3.3.8-r5 has Arfrever's patch (+ update on the dependency to depend on >=sys-libs/libselinux-2.3).
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2014-07-30 12:04:17 UTC
Stabilized