You are not logged in.

#1 2020-09-23 16:03:55

Hroozley
Member
Registered: 2020-01-25
Posts: 19

[SOLVED]Installing SELinux libraries on non-SELinux system

[Original post:]

Hi,

I need to install SELinux libraries in order to install Matlab. The manual here probably seems quite straight forward for most, I however do have a few questions:
1) Do I need to reinstall my currently set-up Arch or manually compile the kernel?
2) I've read an article about the difference between DAC and MAC, but are there any reasons for me to keep Archlinux with DAC and install a new instance, this time with MAC?
3) If I have to reinstall/ install a new instance of Archlinux, what would be the best way to transfer my current settings, so I don't have to set up everything again?

Thank you for your help

[Edited post after solving the problem:]
Instead of reinstalling the Archlinux system, I built the libsepol in clean chroot and installed with pacman -U. After that I was able to install all other required SELinux libraries with makepkg and Matlab as well

Last edited by Hroozley (2020-09-28 18:06:42)

Offline

#2 2020-09-23 16:06:34

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,787
Website

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Mod note: Moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2020-09-23 16:21:47

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

No to  1) and 3), yes to 2), MACs are complementary and not a full replacement for DACs. The kernel contains support built in for all officially distributed kernels, this is something you enable and then configure according to your needs, you can do this to an existing system (... though you'd have to be somewhat careful as you can lock yourself out if you misconfigure).

In any case I have a strong feeling that this is actually a XY question. Without having tested it, I don't think that matlab will enforce the need to have selinux enabled/configured, it just ships with support for it, in case it actually is enabled. What errors do you get when attempting to install/start it?

Last edited by V1del (2020-09-23 16:23:25)

Offline

#4 2020-09-24 15:26:05

Hroozley
Member
Registered: 2020-01-25
Posts: 19

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

I'm getting

terminate called after throwing an instance of 'std::runtime_error'
  what():  Unable to launch the MATLABWindow application

I've tried solution posted in the Archwiki Matlab article, but it doesn't work.

Then I found this. So I tried to install libselinux.so.1, but that didn't work, because of missing dependencies, specificaly libsepol.

Building of libsepol kept crashing, so I checked git repository to find an issue(I can't find it now) mentioning, that these libraries must be installed during pacstrap phase.

Last edited by Hroozley (2020-09-24 15:26:42)

Offline

#5 2020-09-24 15:34:00

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Hroozley wrote:

Building of libsepol kept crashing, so I checked git repository to find an issue(I can't find it now) mentioning, that these libraries must be installed during pacstrap phase.

That's gibberish, but try to build in inside a clean chroot if that's the case.
https://wiki.archlinux.org/index.php/De … ean_chroot

And post any error output if any.


My reposSome snippets

Heisenberg might have been here.

Offline

#6 2020-09-24 15:39:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Post the errors and outputs you get when attempting to build libsepol. There shouldn't be a logical reason that this HAS to happen during pacstrap phase. What's more likely and the AUR comments (which you should always peruse on errors) seem to suggest that there are issues with gcc10 and compiling libsepol. Potential workarounds to build it are mentioned there as well.

Offline

#7 2020-09-24 17:40:08

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

libsepol builds locally in a clean chroot without issue

extra-x86_64-build 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
 there is nothing to do
==> Building in chroot for [extra] (x86_64)...
==> Synchronizing chroot copy [/var/lib/archbuild/extra-x86_64/root] -> [builduser]...done
==> Making package: libsepol 3.1-1 (Thu Sep 24 17:36:10 2020)
==> Retrieving sources...
  -> Downloading libsepol-3.1.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   643  100   643    0     0   2009      0 --:--:-- --:--:-- --:--:--  2009
100  462k  100  462k    0     0   395k      0  0:00:01  0:00:01 --:--:--  732k
==> Validating source files with sha256sums...
    libsepol-3.1.tar.gz ... Passed
==> Making package: libsepol 3.1-1 (Thu 24 Sep 2020 05:36:15 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found libsepol-3.1.tar.gz
==> WARNING: Skipping all source file integrity checks.
==> Extracting sources...
  -> Extracting libsepol-3.1.tar.gz with bsdtar
==> Starting build()...
make -C src 
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/src'
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o assertion.o assertion.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avrule_block.o avrule_block.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o avtab.o avtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o boolean_record.o boolean_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o booleans.o booleans.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o conditional.o conditional.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o constraint.o constraint.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o context.o context.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o context_record.o context_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o debug.o debug.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o deprecated_funcs.o deprecated_funcs.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ebitmap.o ebitmap.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o expand.o expand.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o handle.o handle.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o hashtab.o hashtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o hierarchy.o hierarchy.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ibendport_record.o ibendport_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ibendports.o ibendports.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ibpkey_record.o ibpkey_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ibpkeys.o ibpkeys.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o iface_record.o iface_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o interfaces.o interfaces.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_cil.o kernel_to_cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_common.o kernel_to_common.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o kernel_to_conf.o kernel_to_conf.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o link.o link.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o mls.o mls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o module.o module.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o module_to_cil.o module_to_cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o node_record.o node_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o nodes.o nodes.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o optimize.o optimize.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o polcaps.o polcaps.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o policydb.o policydb.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o policydb_convert.o policydb_convert.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o policydb_public.o policydb_public.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o port_record.o port_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ports.o ports.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o roles.o roles.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o services.o services.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o sidtab.o sidtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o symtab.o symtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o user_record.o user_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o users.o users.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o util.o util.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o write.o write.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil.o ../cil/src/cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_binary.o ../cil/src/cil_binary.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_build_ast.o ../cil/src/cil_build_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_copy_ast.o ../cil/src/cil_copy_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_find.o ../cil/src/cil_find.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_fqn.o ../cil/src/cil_fqn.c
flex -o ../cil/src/cil_lexer.c ../cil/src/cil_lexer.l
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_list.o ../cil/src/cil_list.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_log.o ../cil/src/cil_log.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_mem.o ../cil/src/cil_mem.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_parser.o ../cil/src/cil_parser.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_policy.o ../cil/src/cil_policy.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_post.o ../cil/src/cil_post.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_reset_ast.o ../cil/src/cil_reset_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_resolve_ast.o ../cil/src/cil_resolve_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_stack.o ../cil/src/cil_stack.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_strpool.o ../cil/src/cil_strpool.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_symtab.o ../cil/src/cil_symtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_tree.o ../cil/src/cil_tree.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_verify.o ../cil/src/cil_verify.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o assertion.lo assertion.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o avrule_block.lo avrule_block.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o avtab.lo avtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o boolean_record.lo boolean_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o booleans.lo booleans.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o conditional.lo conditional.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o constraint.lo constraint.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o context.lo context.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o context_record.lo context_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o debug.lo debug.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o deprecated_funcs.lo deprecated_funcs.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ebitmap.lo ebitmap.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o expand.lo expand.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o handle.lo handle.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o hashtab.lo hashtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o hierarchy.lo hierarchy.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ibendport_record.lo ibendport_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ibendports.lo ibendports.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ibpkey_record.lo ibpkey_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ibpkeys.lo ibpkeys.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o iface_record.lo iface_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o interfaces.lo interfaces.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o kernel_to_cil.lo kernel_to_cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o kernel_to_common.lo kernel_to_common.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o kernel_to_conf.lo kernel_to_conf.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o link.lo link.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o mls.lo mls.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o module.lo module.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o module_to_cil.lo module_to_cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o node_record.lo node_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o nodes.lo nodes.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o optimize.lo optimize.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o polcaps.lo polcaps.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o policydb.lo policydb.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o policydb_convert.lo policydb_convert.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o policydb_public.lo policydb_public.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o port_record.lo port_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ports.lo ports.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o roles.lo roles.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o services.lo services.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o sidtab.lo sidtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o symtab.lo symtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o user_record.lo user_record.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o users.lo users.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o util.lo util.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o write.lo write.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil.lo ../cil/src/cil.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_binary.lo ../cil/src/cil_binary.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_build_ast.lo ../cil/src/cil_build_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_copy_ast.lo ../cil/src/cil_copy_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_find.lo ../cil/src/cil_find.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_fqn.lo ../cil/src/cil_fqn.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_lexer.lo ../cil/src/cil_lexer.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_list.lo ../cil/src/cil_list.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_log.lo ../cil/src/cil_log.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_mem.lo ../cil/src/cil_mem.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_parser.lo ../cil/src/cil_parser.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_policy.lo ../cil/src/cil_policy.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_post.lo ../cil/src/cil_post.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_reset_ast.lo ../cil/src/cil_reset_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_resolve_ast.lo ../cil/src/cil_resolve_ast.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_stack.lo ../cil/src/cil_stack.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_strpool.lo ../cil/src/cil_strpool.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_symtab.lo ../cil/src/cil_symtab.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_tree.lo ../cil/src/cil_tree.c
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -DSHARED -c -o ../cil/src/cil_verify.lo ../cil/src/cil_verify.c
cp libsepol.map.in libsepol.map
sed -e 's/@VERSION@/3.1/; s:@prefix@:/usr:; s:@libdir@:/usr/lib:; s:@includedir@:/usr/include:' < libsepol.pc.in > libsepol.pc
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -fPIC -c -o ../cil/src/cil_lexer.o ../cil/src/cil_lexer.c
ar rcs libsepol.a assertion.o avrule_block.o avtab.o boolean_record.o booleans.o conditional.o constraint.o context.o context_record.o debug.o deprecated_funcs.o ebitmap.o expand.o handle.o hashtab.o hierarchy.o ibendport_record.o ibendports.o ibpkey_record.o ibpkeys.o iface_record.o interfaces.o kernel_to_cil.o kernel_to_common.o kernel_to_conf.o link.o mls.o module.o module_to_cil.o node_record.o nodes.o optimize.o polcaps.o policydb.o policydb_convert.o policydb_public.o port_record.o ports.o roles.o services.o sidtab.o symtab.o user_record.o users.o util.o write.o ../cil/src/cil.o ../cil/src/cil_binary.o ../cil/src/cil_build_ast.o ../cil/src/cil_copy_ast.o ../cil/src/cil_find.o ../cil/src/cil_fqn.o ../cil/src/cil_lexer.o ../cil/src/cil_list.o ../cil/src/cil_log.o ../cil/src/cil_mem.o ../cil/src/cil_parser.o ../cil/src/cil_policy.o ../cil/src/cil_post.o ../cil/src/cil_reset_ast.o ../cil/src/cil_resolve_ast.o ../cil/src/cil_stack.o ../cil/src/cil_strpool.o ../cil/src/cil_symtab.o ../cil/src/cil_tree.o ../cil/src/cil_verify.o
ranlib libsepol.a
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I. -I../include -D_GNU_SOURCE -I../cil/include -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -shared -o libsepol.so.1 assertion.lo avrule_block.lo avtab.lo boolean_record.lo booleans.lo conditional.lo constraint.lo context.lo context_record.lo debug.lo deprecated_funcs.lo ebitmap.lo expand.lo handle.lo hashtab.lo hierarchy.lo ibendport_record.lo ibendports.lo ibpkey_record.lo ibpkeys.lo iface_record.lo interfaces.lo kernel_to_cil.lo kernel_to_common.lo kernel_to_conf.lo link.lo mls.lo module.lo module_to_cil.lo node_record.lo nodes.lo optimize.lo polcaps.lo policydb.lo policydb_convert.lo policydb_public.lo port_record.lo ports.lo roles.lo services.lo sidtab.lo symtab.lo user_record.lo users.lo util.lo write.lo ../cil/src/cil.lo ../cil/src/cil_binary.lo ../cil/src/cil_build_ast.lo ../cil/src/cil_copy_ast.lo ../cil/src/cil_find.lo ../cil/src/cil_fqn.lo ../cil/src/cil_lexer.lo ../cil/src/cil_list.lo ../cil/src/cil_log.lo ../cil/src/cil_mem.lo ../cil/src/cil_parser.lo ../cil/src/cil_policy.lo ../cil/src/cil_post.lo ../cil/src/cil_reset_ast.lo ../cil/src/cil_resolve_ast.lo ../cil/src/cil_stack.lo ../cil/src/cil_strpool.lo ../cil/src/cil_symtab.lo ../cil/src/cil_tree.lo ../cil/src/cil_verify.lo -Wl,-soname,libsepol.so.1,--version-script=libsepol.map,-z,defs
ln -sf libsepol.so.1 libsepol.so 
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/src'
make -C utils
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/utils'
cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fno-semantic-interposition -I../include -D_FORTIFY_SOURCE=2 -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -L../src  chkcon.c  -lsepol -o chkcon
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/utils'
==> Entering fakeroot environment...
==> Starting package()...
make -C include install
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/include'
test -d /build/libsepol/pkg/libsepol/usr/include/sepol || install -m 755 -d /build/libsepol/pkg/libsepol/usr/include/sepol
test -d /build/libsepol/pkg/libsepol/usr/include/sepol/policydb || install -m 755 -d /build/libsepol/pkg/libsepol/usr/include/sepol/policydb
test -d /build/libsepol/pkg/libsepol/usr/include/sepol/cil || install -m 755 -d /build/libsepol/pkg/libsepol/usr/include/sepol/cil
install -m 644 sepol/boolean_record.h sepol/booleans.h sepol/context.h sepol/context_record.h sepol/debug.h sepol/errcodes.h sepol/handle.h sepol/ibendport_record.h sepol/ibendports.h sepol/ibpkey_record.h sepol/ibpkeys.h sepol/iface_record.h sepol/interfaces.h sepol/kernel_to_cil.h sepol/kernel_to_conf.h sepol/module.h sepol/module_to_cil.h sepol/node_record.h sepol/nodes.h sepol/policydb.h sepol/port_record.h sepol/ports.h sepol/roles.h sepol/sepol.h sepol/user_record.h sepol/users.h /build/libsepol/pkg/libsepol/usr/include/sepol
install -m 644 sepol/policydb/avrule_block.h sepol/policydb/avtab.h sepol/policydb/conditional.h sepol/policydb/constraint.h sepol/policydb/context.h sepol/policydb/ebitmap.h sepol/policydb/expand.h sepol/policydb/flask_types.h sepol/policydb/hashtab.h sepol/policydb/hierarchy.h sepol/policydb/link.h sepol/policydb/mls_types.h sepol/policydb/module.h sepol/policydb/polcaps.h sepol/policydb/policydb.h sepol/policydb/services.h sepol/policydb/sidtab.h sepol/policydb/symtab.h sepol/policydb/util.h /build/libsepol/pkg/libsepol/usr/include/sepol/policydb
install -m 644 ../cil/include/cil/cil.h /build/libsepol/pkg/libsepol/usr/include/sepol/cil
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/include'
make -C src install
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/src'
test -d /build/libsepol/pkg/libsepol/usr/lib || install -m 755 -d /build/libsepol/pkg/libsepol/usr/lib
install -m 644 libsepol.a  /build/libsepol/pkg/libsepol/usr/lib
test -d /build/libsepol/pkg/libsepol/usr/lib || install -m 755 -d /build/libsepol/pkg/libsepol/usr/lib
install -m 755 libsepol.so.1 /build/libsepol/pkg/libsepol/usr/lib
test -d /build/libsepol/pkg/libsepol/usr/lib/pkgconfig || install -m 755 -d /build/libsepol/pkg/libsepol/usr/lib/pkgconfig
install -m 644 libsepol.pc /build/libsepol/pkg/libsepol/usr/lib/pkgconfig
ln -sf --relative /build/libsepol/pkg/libsepol/usr/lib/libsepol.so.1 /build/libsepol/pkg/libsepol/usr/lib/libsepol.so
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/src'
make -C utils install
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/utils'
mkdir -p /build/libsepol/pkg/libsepol/usr/bin
install -m 755 chkcon /build/libsepol/pkg/libsepol/usr/bin
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/utils'
make -C man install
make[1]: Entering directory '/build/libsepol/src/libsepol-3.1/man'
mkdir -p /build/libsepol/pkg/libsepol/usr/share/man/man3
mkdir -p /build/libsepol/pkg/libsepol/usr/share/man/man8
install -m 644 man3/*.3 /build/libsepol/pkg/libsepol/usr/share/man/man3
install -m 644 man8/*.8 /build/libsepol/pkg/libsepol/usr/share/man/man8
for lang in ru ; do \
	if [ -e ${lang}/man3 ] ; then \
		mkdir -p /build/libsepol/pkg/libsepol/usr/share/man/${lang}/man3 ; \
		install -m 644 ${lang}/man3/*.3 /build/libsepol/pkg/libsepol/usr/share/man/${lang}/man3 ; \
	fi ; \
	if [ -e ${lang}/man8 ] ; then \
		mkdir -p /build/libsepol/pkg/libsepol/usr/share/man/${lang}/man8 ; \
		install -m 644 ${lang}/man8/*.8 /build/libsepol/pkg/libsepol/usr/share/man/${lang}/man8 ; \
	fi ; \
done
make[1]: Leaving directory '/build/libsepol/src/libsepol-3.1/man'
==> Tidying install...
  -> Removing libtool files...
  -> Purging unwanted files...
  -> Stripping unneeded symbols from binaries and libraries...
  -> Compressing man and info pages...
==> Checking for packaging issues...
==> Creating package "libsepol"...
  -> Generating .PKGINFO file...
  -> Generating .BUILDINFO file...
  -> Generating .MTREE file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: libsepol 3.1-1 (Thu 24 Sep 2020 05:36:25 PM)

Edit:
libselinux also builds in a clean chroot.

Last edited by loqs (2020-09-24 17:47:13)

Offline

#8 2020-09-28 17:36:55

Hroozley
Member
Registered: 2020-01-25
Posts: 19

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Building libsepol in clean chroot solved everything, thank you.

By the way, does makepkg() use some specific option for pacman -U ? because I had to enter password, which isn't usually required when building with makepkg. Tried to look for it, could not find it anywhere.

Last edited by Hroozley (2020-09-28 18:05:25)

Offline

#9 2020-09-29 08:01:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,425

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Well once you get to pacman commands makepkg will invoke the relevant pacman command with sudo at which point you need to pass a password, that's pretty normal, how should the package be installed into your root owned folders without?

Offline

#10 2020-09-29 08:50:59

Hroozley
Member
Registered: 2020-01-25
Posts: 19

Re: [SOLVED]Installing SELinux libraries on non-SELinux system

Sorry, I usually had to enter password to install required dependencies and therefore it wasn't required later. Thanks

Offline

Board footer

Powered by FluxBB