Compiling error - sysvinit
Hello ml,
i tried to compile sysvinit-2.85 but i get the following error.
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1
What am i doing wrong?
Thanks for any help
Jan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
jan, hi,
under what system are you doing the compiling, if debian, have you done apt-get build-dep sysvinit?
l.
Quoted 24 lines · Jan Gehring
Hello ml,
i tried to compile sysvinit-2.85 but i get the following error.
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1What am i doing wrong?
Thanks for any help
Jan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 4 lines · Luke Kenneth Casson Leighton
jan, hi,
under what system are you doing the compiling, if debian, have you done apt-get build-dep sysvinit?
*thinks*... grep SELINUXMNT /usr/include/selinux/*
/usr/include/selinux/selinux.h:#define SELINUXMNT "/selinux/"
jan, you will need to install the package libselinux1-dev (if debian) or equivalent for whatever-system-you-have.
the header file that you need is in that package.
l.
Quoted 41 lines · Jan Gehring
Quoted 24 lines
Hello ml,
i tried to compile sysvinit-2.85 but i get the following error.
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1What am i doing wrong?
Thanks for any help
Jan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Hello Luke,
Quoted 2 lines
Quoted 2 lines
under what system are you doing the compiling, if debian, have you done apt-get build-dep sysvinit?
I have build my system by own. Some parts are from the linux-from-scratch project.
(http://www.linoratix.com)
Quoted 3 lines
jan, you will need to install the package libselinux1-dev (if debian) or equivalent for whatever-system-you-have.
well i have build und installed libselinux.
$ ls /lib/libselinux.so.1 /lib/libselinux.so.1
$ ls /usr/lib/libselinux.* /usr/lib/libselinux.a /usr/lib/libselinux.so
/usr/lib/libselinux.so is a symlink to /lib/libselinux.so.1
perhaps i have to add some other some other symlinks?
Quoted 5 lines
Quoted 5 lines · Jan Gehring
Quoted 4 lines
Hello ml,
i tried to compile sysvinit-2.85 but i get the following error.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1
[cut]
Thanks for any help
Jan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 9 lines · Jan Gehring
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
i tried to compile sysvinit-2.85 but i get the following error.
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1
Most likely you are trying to compile an older sysvinit patch against libselinux-1.14. I saw this myself a few days ago. These two #defines are gone in 1.14. Best bet is to update your sysvinit patch. I added back these two #defines back into Gentoo's libselinux-1.14 selinux.h for compatibility, which is another option.
The #defines were:
#define SELINUXMNT "/selinux/"
#define SELINUXPOLICY "/etc/security/selinux/policy"
Signature · 8 lines
Chris PeBenito <[email protected]> Developer, Hardened Gentoo Linux Embedded Gentoo Linux Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243 Key fingerprint = B0E6 877A 883F A57A 8E6A CB00 BC8E E42D E6AF 9243
Hello Chris,
Quoted 16 lines
Quoted 9 lines
i tried to compile sysvinit-2.85 but i get the following error.
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1Most likely you are trying to compile an older sysvinit patch against libselinux-1.14. I saw this myself a few days ago. These two #defines are gone in 1.14. Best bet is to update your sysvinit patch. I added back these two #defines back into Gentoo's libselinux-1.14
selinux.hfor compatibility, which is another option.
Quoted 4 lines
The #defines were:
#define SELINUXMNT "/selinux/"
#define SELINUXPOLICY "/etc/security/selinux/policy"
Thank you. this works fine.
Best regards
Jan
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 10 lines · Chris PeBenito
Most likely you are trying to compile an older sysvinit patch against libselinux-1.14. I saw this myself a few days ago. These two #defines are gone in 1.14. Best bet is to update your sysvinit patch. I added back these two #defines back into Gentoo's libselinux-1.14
selinux.hfor compatibility, which is another option.The #defines were:
#define SELINUXMNT "/selinux/"
#define SELINUXPOLICY "/etc/security/selinux/policy"
Just be careful that no code other than /sbin/init uses such definitions, as all other code should determine the selinuxfs mount point at runtime via /proc/mounts (or just use the libselinux functions) and should obtain policy file paths at runtime using the new libselinux functions.
Signature · 8 lines
Stephen Smalley <[email protected]> National Security Agency -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Quoted 14 lines · Jan Gehring
Hello Luke,
Quoted 2 lines
Quoted 2 lines
under what system are you doing the compiling, if debian, have you done apt-get build-dep sysvinit?
I have build my system by own. Some parts are from the linux-from-scratch project.
(http://www.linoratix.com)Quoted 3 lines
jan, you will need to install the package libselinux1-dev (if debian) or equivalent for whatever-system-you-have.
well i have build und installed libselinux.
$ ls /lib/libselinux.so.1 /lib/libselinux.so.1
Quoted 6 lines
$ ls /usr/lib/libselinux.* /usr/lib/libselinux.a /usr/lib/libselinux.so
/usr/lib/libselinux.sois a symlink to/lib/libselinux.so.1perhaps i have to add some other some other symlinks?
symlinks no, _header_ files yes.
you will also need /lib/libselinux* of course as well.
do you have any files /usr/include/selinux/* ?
if no, then nothing will compile, end of story.
therefore, in your case, i would recommend that you obtain the source code of libselinux, compile and install it, making sure that you get the library into /lib (with a symlink in /usr/lib) and the installation of the library FROM SOURCE will put the header files there as well.
... you _are_ no doubt aware that this is a standard procedure for building _any_ program from source: you must have all the source dependencies installed...
l.
Quoted 25 lines
Quoted 5 lines
Quoted 5 lines · Jan Gehring
Quoted 4 lines
Hello ml,
i tried to compile sysvinit-2.85 but i get the following error.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
root@maracuja src # make LDFLAGS="-s -lselinux" CFLAGS="-D_GNU_SOURCE" cc -c -D_GNU_SOURCE -DWITH_SELINUX
init.c
[...]
init.c:97: error: `SELINUXMNT' undeclared (first use in this function) [...]
init.c:123: error: `SELINUXPOLICY' undeclared (first use in this function)
make: *** [init.o] Error 1[cut]
Thanks for any help
Jan--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.
Signature · 14 lines
-- Information I post is with honesty, integrity, and the expectation that you will take full responsibility if acting on the information contained, and that, should you find it to be flawed or even mildly useful, you will act with both honesty and integrity in return - and tell me. -- <a href="http://lkcl.net"> lkcl.net </a> <br /> <a href="mailto:[email protected]"> [email protected] </a> <br /> -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.