Re:Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
Thank everyone!!! I have fixed it. Coreutils whose version is greater than 6.0 needs selinux, which can be see from source file: #include selinux/selinux.h or / and #include selinux/context.h These are host system's header files,so we must replace these file with se-selinux.in.h se-context.in.h They are coreutils's built-in header file for host in which no selinux is not supported. My scripts: for file in $(find ./ -name *.c -o -name *.h) do cp -uv $file{,.orig} \ sed -e 's...@#include selinux/selinux.h@#include se-selinux.in.h@g' \ -e 's...@#include selinux/context.h@#include se-context.in.h@g' $file.orig $file \ rm $file.orig \ touch $file done I have constructed the temporary system and entered the chroot environment successfully! 在2010-01-27?10:47:02,Trent?Shea?trents...@gmail.com?写道: Ack,?I?keep?hitting?reply?and?pulling?stuff?off?the?list.?Anyhow,?thanks?for? poking?me?in?the?right?direction. On?Tuesday?26?January?2010?19:20:48?you?wrote: ?No,?you?aren't?isolated?from?the?host?until?you?enter?chroot?in?Chapter? Fair?enough,?I?should?have?said?fairly?isolated?at?this?point. ?6.??As?you?build?Chapter?5,?you?get?more?of?what?you?previously?build,? ?but?there?are?libraries?and?headers?from?the?host?that?are?still? ?potentially?available.??The?linker?still?uses?the?libraries?in? ?/etc/ld.so.conf?for?your?tools?when?building?other?programs. Ah,?I?was?thinking?about?that,?too.??There's?probably?some?rpath?risks?and? pkgconfig?magic,?too. --? Regards, Trent. --? http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ:?http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe:?See?the?above?information?page -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On 01/29/10 05:13, haiye1018 wrote: Thank everyone!!! I have fixed it. Coreutils whose version is greater than 6.0 needs selinux, which can be see from source file: #include selinux/selinux.h or / and #include selinux/context.h These are host system's header files,so we must replace these file with se-selinux.in.h se-context.in.h They are coreutils's built-in header file for host in which no selinux is not supported. My scripts: for file in $(find ./ -name *.c -o -name *.h) do cp -uv $file{,.orig} \ sed -e 's...@#include selinux/selinux.h@#include se-selinux.in.h@g' \ -e 's...@#include selinux/context.h@#include se-context.in.h@g' $file.orig $file \ rm $file.orig \ touch $file done I have constructed the temporary system and entered the chroot environment successfully! 在2010-01-27 10:47:02,Trent Shea trents...@gmail.com 写道: Ack, I keep hitting reply and pulling stuff off the list. Anyhow, thanks for poking me in the right direction. On Tuesday 26 January 2010 19:20:48 you wrote: No, you aren't isolated from the host until you enter chroot in Chapter Fair enough, I should have said fairly isolated at this point. 6.As you build Chapter 5, you get more of what you previously build, but there are libraries and headers from the host that are still potentially available.The linker still uses the libraries in /etc/ld.so.conf for your tools when building other programs. Ah, I was thinking about that, too.There's probably some rpath risks and pkgconfig magic, too. -- Regards, Trent. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page 网易邮箱,没有垃圾邮件的免费电子邮箱! http://yeah.net/?from=b1 so if you built a system using a host cd without(libselinux.so) -lselinux you probably would of been fine. but if building with ubuntu/fedora /lib/libselinux.so is there causing coreutils to enable all support for SELinux (but could be wrong); Justin P. Mattock -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
haiye1018 wrote: Thank everyone!!! I have fixed it. Coreutils whose version is greater than 6.0 needs selinux, which can be see from source file: #include selinux/selinux.h or / and #include selinux/context.h Don't top post. Trim what isn't needed. You are talking to several hundred people. You are wrong. Coreutils does not need selinux. You should have in lib/config.h: /* Define to 1 if you have the selinux/context.h header file. */ /* #undef HAVE_SELINUX_CONTEXT_H */ /* Define to 1 if you have the selinux/flask.h header file. */ /* #undef HAVE_SELINUX_FLASK_H */ /* Define to 1 if you have the selinux/selinux.h header file. */ /* #undef HAVE_SELINUX_SELINUX_H */ If this is Chapter 5, then it might link selinux in, depending on the host. In chapter 6, it definitely will not find those headers and there will be no problem. If your host has the headers and not the libraries, then it is not set up properly. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On Saturday 23 January 2010 09:32:12 you wrote: On Saturday 23 January 2010 08:26:53 haiye1018 wrote: hello In LFS6.4 step 5.17 compile coreutils-6.12 error: How to edit coreutils'configure scriptsss to get rid of selinux support? Can anyone help me to fix it? I'm not sure the configure file is the problem. Can you try to issue: echo 'main(){}' dummy.c cc -v dummy.c 21 |grep include rm dummy.c and include the output here, I have a feeling there may be a problem with gcc on your build. Regards, Trent. Just for kicks I just built up to gcc pass 2 in chapter 5 and issued the commands above and this is my output: snipped some junk #include ... search starts here: #include ... search starts here: /mnt/data/data/build/lfs-main/lfs/lfs-testing/tools/bin/../lib/gcc/i686-pc- linux-gnu/4.4.1/include /mnt/data/data/build/lfs-main/lfs/lfs-testing/tools/bin/../lib/gcc/i686-pc- linux-gnu/4.4.1/include-fixed /tools/include If I'm reading the above correctly we're isolated from the host at this point, with the exception of PATH. Binutils takes care of the library search path and gcc takes care of the headers search path. Of course, there could be some evil configure scripts that look in well known locations... I'm mostly just thinking out loud here, but I'm hoping this can be confirmed so that I can give advice and help troubleshoot in the future with a bit more certainty. -- Regards, Trent. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
Trent Shea wrote: Just for kicks I just built up to gcc pass 2 in chapter 5 and issued the commands above and this is my output: snipped some junk #include ... search starts here: #include ... search starts here: /mnt/data/data/build/lfs-main/lfs/lfs-testing/tools/bin/../lib/gcc/i686-pc- linux-gnu/4.4.1/include /mnt/data/data/build/lfs-main/lfs/lfs-testing/tools/bin/../lib/gcc/i686-pc- linux-gnu/4.4.1/include-fixed /tools/include If I'm reading the above correctly we're isolated from the host at this point, with the exception of PATH. Binutils takes care of the library search path and gcc takes care of the headers search path. Of course, there could be some evil configure scripts that look in well known locations... I'm mostly just thinking out loud here, but I'm hoping this can be confirmed so that I can give advice and help troubleshoot in the future with a bit more certainty. No, you aren't isolated from the host until you enter chroot in Chapter 6. As you build Chapter 5, you get more of what you previously build, but there are libraries and headers from the host that are still potentially available. The linker still uses the libraries in /etc/ld.so.conf for your tools when building other programs. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
Ack, I keep hitting reply and pulling stuff off the list. Anyhow, thanks for poking me in the right direction. On Tuesday 26 January 2010 19:20:48 you wrote: No, you aren't isolated from the host until you enter chroot in Chapter Fair enough, I should have said fairly isolated at this point. 6. As you build Chapter 5, you get more of what you previously build, but there are libraries and headers from the host that are still potentially available. The linker still uses the libraries in /etc/ld.so.conf for your tools when building other programs. Ah, I was thinking about that, too. There's probably some rpath risks and pkgconfig magic, too. -- Regards, Trent. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
Justin P. Mattock wrote: On 01/23/10 09:21, Trent Shea wrote: On Saturday 23 January 2010 10:17:21 you wrote: I don't see any flags to disable the search for SELinux. I should mention it's my understanding that gcc shouldn't be searching for host include files at this point, maybe someone can clarify for me though. I haven't the source in front of me at the moment for coreutils. but from looking at the errors with chcon getfilecon etc.. those are all of the tools to manage SELinux(i.g. ls -Z etc..) your host system probably has libselinux installed and my guess is coureutils has some mechanisms to check for that, and if present enables SELinux support(without any switches in configure). my guess is either find a host system to build on that has no libselinux so coreutils is built without SELinux support, or with the host system your using now My first build of LFS was on a system with SELinux support, and I did not have this problem. This looks like a problem with gcc, or some configuration error. Mike -- p=p=%c%s%c;main(){printf(p,34,p,34);};main(){printf(p,34,p,34);} Oppose globalization and One World Governments like the UN. This message made from 100% recycled bits. You have found the bank of Larn. I speak only for myself, and I am unanimous in that! -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
LFS6.4 step 5.17 compiling coreutils-6.12 error
hello In LFS6.4 step 5.17 compile coreutils-6.12 error: /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:546: undefined reference to `getfilecon' chcon.o: In function `change_file_context': /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:199: undefined reference to `context_new' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:204: undefined reference to `context_str' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:220: undefined reference to `context_free' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:221: undefined reference to `freecon' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:220: undefined reference to `context_free' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:221: undefined reference to `freecon' chcon.o: In function `compute_context_from_mask': /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:119: undefined reference to `context_new' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:141: undefined reference to `context_user_set' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:142: undefined reference to `context_range_set' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:143: undefined reference to `context_role_set' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:144: undefined reference to `context_type_set' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:149: undefined reference to `context_free' chcon.o: In function `main': /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:561: undefined reference to `context_new' /mnt/lfs/sources/6.4/coreutils-6.12/src/chcon.c:565: undefined reference to `context_free' ../lib/libcoreutils.a(selinux-at.o): In function `lsetfileconat': /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:45: undefined reference to `lsetfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:38: undefined reference to `lsetfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:73: undefined reference to `lsetfilecon' ../lib/libcoreutils.a(selinux-at.o): In function `setfileconat': /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:45: undefined reference to `setfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:38: undefined reference to `setfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:73: undefined reference to `setfilecon' ../lib/libcoreutils.a(selinux-at.o): In function `lgetfileconat': /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:45: undefined reference to `lgetfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:38: undefined reference to `lgetfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:73: undefined reference to `lgetfilecon' ../lib/libcoreutils.a(selinux-at.o): In function `getfileconat': /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:45: undefined reference to `getfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:38: undefined reference to `getfilecon' /mnt/lfs/sources/6.4/coreutils-6.12/lib/at-func.c:73: undefined reference to `getfilecon' collect2: ld returned 1 exit status How to edit coreutils'configure scriptsss to get rid of selinux support? Can anyone help me to fix it? -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On Saturday 23 January 2010 09:32:12 Trent Shea wrote: echo 'main(){}' dummy.c cc -v dummy.c 21 |grep include rm dummy.c or don't forget: rm a.out -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On Saturday 23 January 2010 08:26:53 haiye1018 wrote: hello In LFS6.4 step 5.17 compile coreutils-6.12 error: How to edit coreutils'configure scriptsss to get rid of selinux support? Can anyone help me to fix it? I'm not sure the configure file is the problem. Can you try to issue: echo 'main(){}' dummy.c cc -v dummy.c 21 |grep include rm dummy.c and include the output here, I have a feeling there may be a problem with gcc on your build. Regards, Trent. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On 01/23/10 08:38, Trent Shea wrote: On Saturday 23 January 2010 09:32:12 Trent Shea wrote: echo 'main(){}' dummy.c cc -v dummy.c 21 |grep include rm dummy.c or don't forget: rm a.out getfilecon sounds something from an SELinux header file. do you have an updated libselinux?(or maybe build disabling audit/SELinux) Justin P. Mattock -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On Saturday 23 January 2010 10:01:22 Justin P. Mattock wrote: getfilecon sounds something from an SELinux header file. do you have an updated libselinux?(or maybe build disabling audit/SELinux) I don't see any flags to disable the search for SELinux. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On Saturday 23 January 2010 10:17:21 you wrote: I don't see any flags to disable the search for SELinux. I should mention it's my understanding that gcc shouldn't be searching for host include files at this point, maybe someone can clarify for me though. -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
Re: LFS6.4 step 5.17 compiling coreutils-6.12 error
On 01/23/10 09:21, Trent Shea wrote: On Saturday 23 January 2010 10:17:21 you wrote: I don't see any flags to disable the search for SELinux. I should mention it's my understanding that gcc shouldn't be searching for host include files at this point, maybe someone can clarify for me though. I haven't the source in front of me at the moment for coreutils. but from looking at the errors with chcon getfilecon etc.. those are all of the tools to manage SELinux(i.g. ls -Z etc..) your host system probably has libselinux installed and my guess is coureutils has some mechanisms to check for that, and if present enables SELinux support(without any switches in configure). my guess is either find a host system to build on that has no libselinux so coreutils is built without SELinux support, or with the host system your using now install libselinux,libsepol,libsemamane(dev's) this way the header files are there coreutils builds with SELinux support, but you'll just never really use it(but if you decide the option is there). hope this helps Justin P. Mattock -- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page