On Sat, Nov 09, 2019 at 11:34:42AM -0700, Flareon Zulu wrote: > When attempting to build coreutils-8.31 in the chroot envirionment, the > build will stop at compiling "expand" with the following log: > > CC src/expand.o > CC src/expand-common.o > CCLD src/expand > /usr/bin/ld: src/expand.o: in function `expand': > expand.c:(.text+0x422): undefined reference to `mbfile_multi_getc' > collect2: error: ld returned 1 exit status > make[2]: *** [Makefile:8824: src/expand] Error 1 > make[2]: Leaving directory '/sources/coreutils-8.31' > make[1]: *** [Makefile:12651: all-recursive] Error 1 > make[1]: Leaving directory '/sources/coreutils-8.31' > make: *** [Makefile:6831: all] Error 2 > > After attempting the build without the patch, and having it work, I can > safely say there is some problem in the patch file. Unfortunately, I'm not > good enough in C/C++ to determine what that problem is. > > Flareon
Very odd. It worked for me, and looking at the patch: expand.c is modified at patch line 905 onwards, the first change is to include mbfile.h. mbfile.h is added by lines 64 onwards in the patch, and within that is the definition of mbfile_multi_getc. Are you doing something different ? Google finds a similar problem two years ago (coreutils-8.28), AFAICS we never got anywhere in working out why it was failing. There is also a fedora bug, https://bugzilla.redhat.com/show_bug.cgi?id=1688761 where the problem showed up using -Os (IMHO that is never a good idea unless the package forces it, -Os has been known to create very poor code for the kernel and is generally much less well tested). There was also a similar report in September for Musl-LFS (I didn't know that existed!) - https://github.com/dslm4515/Musl-LFS/issues/11 which was apparently re building musl LFS on a glibc host, and there the solution was to drop the patch because musl doesn't support locales! Alternatively, maybe there is something else different about your _host_ system ? ĸen -- Whilst all mushrooms are edible, the trick is to eat only those which will prove to be edible more than once. The Celebrated Discworld Almanak recommends you play safe and eat beans on toast. -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
