Comments (11)
Hello, did you install package ustr
or ustr-selinux
on your system? https://www.archlinux.org/packages/community/x86_64/ustr/ indicates it provides /usr/include/ustr.h
.
By the way, ustr-selinux
is a package that I made with custom patches because the packaged ustr
library was not usable with the latest gcc the last time I checked (c.f. https://bugs.archlinux.org/task/46445)
from selinux.
Thank you for the detailed response.
Will try again, as the package was missing.
Also, it seems that the BUG has been fixed according to the comment: https://bugs.archlinux.org/task/46445#comment145457
from selinux.
Installed ustr-selinux but got the same error as in the bug:
collect2: error: ld returned 1 exit status
Makefile:95: recipe for target 'libsemanage.so.1' failed
make[2]: *** [libsemanage.so.1] Error 1
Both ustr and ustr-selinux give same linker errors as in bug you mentioned, (multiple definition ... first defined et cetera)
from selinux.
Did you run make clean
between two build attempts?
By the way, even if https://bugs.archlinux.org/task/46445#comment145457 claims the bug is fixed, ustr
package is still broken and I have not seen the patches which fix the bug in http://www.and.org/ustr/ustr.git .
from selinux.
I installed first ustr-selinux with yaourt from AUR, then removed package and installed ustr from Arch packages.
Yes, I realized that, as I cloned git from there and still had issues
from selinux.
I did not understand your last comment and I managed to build the project in a Docker container, using ustr-selinux
. Which system configuration are you using? (CPU, up-to-date Arch system, testing repositories?)
from selinux.
I am using Arch (bbqlinux Gnome build), up-to-date, no testing repos, Intel® Core™ i7-5500U CPU
I tried to build selinux after installing ustr-selinux through Yaourt, but it did not build. I will try again.
from selinux.
The error I get after installing ustr-selinux from AUR:
In file included from /usr/include/ustr.h:16:0,
from utilities.c:29:
/usr/include/ustr-cmp.h:144:24: error: ‘ustr_cmp_case_suffix_buf_eq’ used but never defined [-Werror]
USTR_CONF_EI_PROTO int ustr_cmp_case_suffix_buf_eq(const struct Ustr *,
^
cc1: all warnings being treated as errors
Makefile:113: recipe for target 'utilities.o' failed
make[2]: *** [utilities.o] Error 1
from selinux.
Indeed, I am using some patches on my system to build the project with clang and many compiler flags (for extra warnings, address sanitizer, etc.), and I forgot I added a few months ago on the first line of libsemanage/src/Makefile
:
utilities.o utilities.lo genhomedircon.o genhomedircon.lo: CFLAGS += -Wno-error
... to ignore warnings generated by ustr. Moreover I changed PYTHON ?= python
to PYTHON ?= python2
in policycoreutils/sepolicy/Makefile
. I hope this can help you solve the issues you have.
from selinux.
Adding changes to libsemanage makefiles fixed that particular issue,
but now it results in new error:
make -C test
make[2]: Entering directory '/../selinux-master/checkpolicy/test'
cc -g -Wall -W -Werror -O2 -pipe -I/../seOBJ/usr/include -c -o dispol.o dispol.c
cc dispol.o -lfl /../seOBJ/usr/lib/libsepol.a -L/../seOBJ/usr/lib -o dispol
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.3.0/../../../../lib/libfl.so: undefined reference to `yylex'
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'dispol' failed
make[2]: *** [dispol] Error 1
Replacing "-lfl" in checkpolicy/test makefile with direct reference to "seOBJ/usr/lib//libsepol.a" results again with a new error:
make[1]: Entering directory '/../selinux-master/secilc'
cc -Wall -Wshadow -Wextra -Wundef -Wmissing-format-attribute -Wcast-align -Wstrict-prototypes -Wpointer-arith -Wunused -I/../seOBJ/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -c -o secilc.o secilc.c
cc -Wall -Wshadow -Wextra -Wundef -Wmissing-format-attribute -Wcast-align -Wstrict-prototypes -Wpointer-arith -Wunused -I/../seOBJ/usr/include -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -o secilc secilc.o -lsepol -L/../seOBJ/usr/lib
xmlto man secilc.8.xml
make[1]: xmlto: Command not found
Makefile:29: recipe for target 'man' failed
make[1]: *** [man] Error 127
Thank you for your time.
Seems like a hassle to compile directly.
from selinux.
To build secilc
you need to install xmlto
, docbook-xml
and docbook-xsl
, as it specified in the PKGBUILD of the AUR package (https://github.com/archlinuxhardened/selinux/blob/master/secilc/PKGBUILD).
from selinux.
Related Issues (20)
- semanage_get_lock fails on NFSv4 filesystems HOT 1
- Python 3.11 support HOT 4
- manual setting HOT 2
- bad gpg signature HOT 4
- checkpolicy compilation error HOT 4
- selinux_restorecon.c comparison between signed and unsigned integer expressions
- Scope of boolean 'httpd_can_network_connect' & Django SELinux permissions
- libsepol:The libsepol package detects memory leaks and segmentation errors when tested by OSS-fuzz. HOT 4
- How Do I Select a Proper Number of Threads for Labeling? HOT 2
- Can use macro parameter for filecon path statment? HOT 1
- restore.c:(.text+0x229): undefined reference to `selinux_restorecon_parallel' HOT 1
- selinux-activate not working on RaspbianOS bullseye (version 11) HOT 1
- "semanage export" does not handle port definition modifications properly
- libselinux: off-by-one in setcon() family
- Question Regarding "semanage boolean": HOT 5
- Non-cached is_selinux_enabled() variant? HOT 1
- selinux 3.6 fails to compile against latest versions of musl HOT 1
- libselinux: selabel_digest -b x/media/db error HOT 1
- libsepol: new "all" op verifier in 3.6 does not check classcommon perms HOT 3
- Should ignoredirs apply to all subdirectories? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selinux.