Package Details: libselinux 2.9-1

Git Clone URL: (read-only)
Package Base: libselinux
Description: SELinux library and simple utilities
Upstream URL:
Keywords: selinux
Licenses: custom
Groups: selinux
Conflicts: selinux-usr-libselinux
Provides: selinux-usr-libselinux=2.9-1
Submitter: Siosm
Maintainer: IooNag
Last Packager: IooNag
Votes: 101
Popularity: 2.501000
First Submitted: 2013-11-03 20:05
Last Updated: 2019-03-17 12:12

Latest Comments

1 2 3 4 Next › Last »

IooNag commented on 2019-04-28 15:57

schlumpf: thanks for your bug report. On my system, libselinux builds fine, and the line which does the linking has a "-lpcre" which is added. This parameter is added in the Makefile by using the output "pkg-config --libs libpcre".

Have you installed pkgconf (which is part of base-devel)? If yes, what does "pkg-config --libs libpcre" print, on your system?

schlumpf commented on 2019-04-28 09:10

I'm unable to build :(


cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -I../include -D_GNU_SOURCE -DDISABLE_RPM -DNO_ANDROID_BACKEND -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -shared -o avc.lo avc_internal.lo avc_sidtab.lo booleans.lo callbacks.lo canonicalize_context.lo checkAccess.lo check_context.lo checkreqprot.lo compute_av.lo compute_create.lo compute_member.lo compute_relabel.lo compute_user.lo context.lo deny_unknown.lo disable.lo enabled.lo fgetfilecon.lo freecon.lo freeconary.lo fsetfilecon.lo get_context_list.lo get_default_type.lo get_initial_context.lo getenforce.lo getfilecon.lo getpeercon.lo init.lo is_customizable_type.lo label.lo label_db.lo label_file.lo label_media.lo label_support.lo label_x.lo lgetfilecon.lo load_policy.lo lsetfilecon.lo mapping.lo matchmediacon.lo matchpathcon.lo policyvers.lo procattr.lo query_user_context.lo regex.lo reject_unknown.lo selinux_check_securetty_context.lo selinux_config.lo selinux_restorecon.lo sestatus.lo setenforce.lo setexecfilecon.lo setfilecon.lo setrans_client.lo seusers.lo sha1.lo stringrep.lo -ldl -Wl,-soname,,-z,defs,-z,relro /usr/bin/ld: regex.lo: in function regex_version': regex.c:(.text+0x12): undefined reference topcre_version' /usr/bin/ld: regex.lo: in function regex_writef': regex.c:(.text+0x79): undefined reference topcre_fullinfo' /usr/bin/ld: regex.c:(.text+0xf0): undefined reference to pcre_fullinfo' /usr/bin/ld: regex.lo: in functionregex_data_free': regex.c:(.text+0x1eb): undefined reference to pcre_free' /usr/bin/ld: regex.c:(.text+0x1fc): undefined reference topcre_free_study' /usr/bin/ld: regex.lo: in function regex_prepare_data': regex.c:(.text+0x26a): undefined reference topcre_compile' /usr/bin/ld: regex.c:(.text+0x28c): undefined reference to pcre_study' /usr/bin/ld: regex.lo: in functionregex_load_mmap': regex.c:(.text+0x38a): undefined reference to pcre_fullinfo' /usr/bin/ld: regex.c:(.text+0x403): undefined reference topcre_fullinfo' /usr/bin/ld: regex.lo: in function regex_match': regex.c:(.text+0x4ae): undefined reference topcre_exec' /usr/bin/ld: regex.lo: in function regex_cmp': regex.c:(.text+0x52e): undefined reference topcre_fullinfo' /usr/bin/ld: regex.c:(.text+0x548): undefined reference to `pcre_fullinfo'

IooNag commented on 2017-06-02 11:48

netrunn3r: if I correctly understand, the issue you report comes from the fact that pkg-config does not use the same Ruby version as the one from your shell environment. However I fail to see the point of building the package with a non-system ruby command. Such a setup would build and install Ruby packages for a Ruby version which is different from the system one (eg. it would put files in the "wrong" system directory, like /usr/lib/ruby/2.3.0/ instead of /usr/lib/ruby/2.4.0/)...

Actually it makes sense to define RUBY=/usr/bin/ruby (and use the full paths for PYTHON definitions too) in the PKGBUILD in order to ensure the package is built with the packaged (system-wide) Ruby. Could you please add "RUBY=/usr/bin/ruby" to these lines:
* make rubywrap
* make DESTDIR="${pkgdir}" USRBINDIR="${pkgdir}"/usr/bin LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib install-rubywrap"
... and tell whether this fixed your issue?

netrunn3r commented on 2017-06-02 08:52

I had the same problem which cminus. Problem was with this two lines:
RUBYLIBVER ?= $(shell $(RUBY) -e 'print RUBY_VERSION.split(".")[0..1].join(".")')
RUBYINC ?= $(shell $(PKG_CONFIG) --exists ruby-$(RUBYLIBVER) && $(PKG_CONFIG) --cflags ruby-$(RUBYLIBVER) || $(PKG_CONFIG) --cflags ruby)

First one return wrong version:
[netrunner@nightcity] libselinux $ ruby -e 'print RUBY_VERSION.split(".")[0..1].join(".")'

Where I have installed 2.4:
[netrunner@nightcity] libselinux $ pacman -Qi ruby
Name : ruby
Version : 2.4.1-3

pkg-config confirm that:
[netrunner@nightcity] libselinux $ pkg-config --exists ruby-2.3 ; echo $?
[netrunner@nightcity] libselinux $ pkg-config --exists ruby-2.4 ; echo $?

So variable $RUBYINC is empty and my cc looks like that (without /usr/include/ruby-2.4)
cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -I../include -I/usr/include -D_GNU_SOURCE -DDISABLE_RPM -DNO_ANDROID_BACKEND -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations -fPIC -DSHARED -c -o selinuxswig_ruby_wrap.lo selinuxswig_ruby_wrap.c

This happen because I also have rvm and I had set default ruby version to 2.3:
[netrunner@nightcity] libselinux $ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux]
[netrunner@nightcity] libselinux $ rvm list
rvm rubies

=* ruby-2.3.3 [ x86_64 ]

# => - current
# =* - current && default
# * - default

As you see, I don't had 2.4. After installing and setting as default version 2.4:
[netrunner@nightcity] libselinux $ /bin/bash --login # needed for installing ruby with rvm
[netrunner@nightcity] libselinux $ rvm install ruby-2.4.1
[netrunner@nightcity] libselinux $ rvm list

rvm rubies

* ruby-2.3.3 [ x86_64 ]
=> ruby-2.4.1 [ x86_64 ]

# => - current
# =* - current && default
# * - default
[netrunner@nightcity] libselinux $ rvm --default use 2.4.1

[netrunner@nightcity] libselinux $ rvm list

rvm rubies

ruby-2.3.3 [ x86_64 ]
=* ruby-2.4.1 [ x86_64 ]
# => - current
# =* - current && default
# * - default
[netrunner@nightcity] libselinux $ makepkg # still in login shell

libselinux build successfully.

Maybe use something like that:
pacman -Q ruby | cut -d ' ' -f 2 | cut -d '.' -f 1,2
to get ruby version?

cminus commented on 2017-02-19 22:53

I am not sure what happened, but it worked and got installed..
PS: I have removed old rvm and let the process continue.. I am not sure how this relates to the system-installed ruby..
Kinda strange

Here there are the current outputs of the lines you requested

Arch% echo $RUBY
# Blank line

Arch% ${RUBY:-ruby} -e 'print RUBY_VERSION.split(".")[0..1].join(".")'

Arch% pkg-config --cflags ruby-2.4
-I/usr/include/ruby-2.4.0/x86_64-linux -I/usr/include/ruby-2.4.0

Arch% ls /usr/include/ruby-2.4.0/
ruby ruby.h x86_64-linux

IooNag commented on 2017-02-19 22:05

cminus: what is the compiler line right before your error? Is it "cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -I../include -I/usr/include -D_GNU_SOURCE -DDISABLE_RPM -DNO_ANDROID_BACKEND -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations -I/usr/include/ruby-2.4.0/x86_64-linux -I/usr/include/ruby-2.4.0 -fPIC -DSHARED -c -o selinuxswig_ruby_wrap.lo selinuxswig_ruby_wrap.c"?

Also I am interested in the result of these commands on your system (the second and the third ones are used by libselinux Makefile to find where Ruby header files are installed):
* echo $RUBY
* ${RUBY:-ruby} -e 'print RUBY_VERSION.split(".")[0..1].join(".")'
* pkg-config --cflags ruby-2.4
* ls /usr/include/ruby-2.4.0/

cminus commented on 2017-02-19 21:50

I have this error and I don't know how to resolve..
Any help will be appreciated.

selinuxswig_ruby_wrap.c:855:18: fatal error: ruby.h: No such file or directory
#include <ruby.h>

IooNag commented on 2016-10-20 07:16

chrisbdaemon: pkg-config is in base-devel, which has to be installed before building any AUR package (cf. Hence I won't add it to makedepends.

chrisbdaemon commented on 2016-10-19 19:24

Can pkg-config be added to the list of makedepends as well?

v1rous commented on 2016-02-07 17:50

Not sure if this is helpful or not, but I was able to build and install this package and its dependency libsepol on armv7h (RPi 2).