Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The error makes references to a variable extfs_swab32 variable which does not seem to be defined in the crc32c.c file but there are several references to that variable in files in the same directory as shown when I run the command "grep -n extfs_swab32 *" The output of which is in the next pastebin below
Here's a suggestion. Use CODE tags to paste you errors inline with your message. Also you are very vague with:
Are you building LFS?
Why yes, yes I am. I am page 118 of LFS 7.1 trying to build E2fsprogs. the package ./configures and makes ok but "make check" results in an error which is in the first link that I pasted above. I know I'm being vague but to be fair the error itself is VERY vague and I'm hoping maybe a veteran C programmer could explain to me what is going wrong.
Hmmm Maybe this will help explain the error that I am getting a little better. I don't think I posted everything that I needed to in the first link so I'm going to try again
Code:
making check in lib/ext2fs
make[1]: Entering directory `/sources/e2fsprogs-1.42.3/build/lib/ext2fs'
CC ../../../lib/ext2fs/tst_bitops.c
LD tst_bitops
CC ../../../lib/ext2fs/tst_badblocks.c
LD tst_badblocks
CC ../../../lib/ext2fs/tst_iscan.c
LD tst_iscan
CC ../../../lib/ext2fs/tst_types.c
LD tst_types
LD tst_icount
CC ../../../lib/ext2fs/tst_super_size.c
LD tst_super_size
CC ../../../lib/ext2fs/tst_inode_size.c
LD tst_inode_size
LD tst_csum
/tmp/cc8WmlGN.o: In function `crc32c_be_body':
crc32c.c:(.text+0x227): undefined reference to `ext2fs_swab32'
crc32c.c:(.text+0x42e): undefined reference to `ext2fs_swab32'
collect2: ld returned 1 exit status
make[1]: *** [tst_crc32c] Error 1
make[1]: Leaving directory `/sources/e2fsprogs-1.42.3/build/lib/ext2fs'
make: *** [check-recursive] Error 1
Well, I'm no "veteran C programmer", so I don't know what you need to do. Sorry. But it isn't hard to find other examples of those error messages from e2fsprogs with Google. In the past, they seemed to me to be related to compiling it on certain architectures. But the matter also seemed to be fixed in recent versions. Anyway, one thing you can try is to download the newest version (1.42.3) and try the same steps from the book on it to see what make check does. If that version has a good make check, I would install it. If it is a bust, too, then don't install it. No harm done.
P.S.: Well nevermind. You posted again while I was typing and already tried that.
Well, I'm no "veteran C programmer", so I don't know what you need to do. Sorry. But it isn't hard to find other examples of those error messages from e2fsprogs with Google. In the past, they seemed to me to be related to compiling it on certain architectures. But the matter also seemed to be fixed in recent versions. Anyway, one thing you can try is to download the newest version (1.42.3) and try the same steps from the book on it to see what make check does. If that version has a good make check, I would install it. If it is a bust, too, then don't install it. No harm done.
P.S.: Well nevermind. You posted again while I was typing and already tried that.
LOL my bad. Yes I did try that and after doing some research I've discovered that the error "undefined reference to `ext2fs_swab32'" is commonly associated with linux distros running on the powerpc architecture. Unfortunately I am trying to compile LFS on an x86_64 core i7 processor so I don't think the problems are related.
Since it was only the "make check" that failed I have decided to install the package and move on to installing other packages and while hoping everything turns out ok. However, any further input about why the make check might have failed would be appreciated.
Okay. I guess you could try running some of the executables installed by e2fsprogs and see how they do.
And I'm willing to confess publicly that I stopped running make check for all packages except the ones that are identified as critical. After my first or second system, I found that none ever flunked, and those tests really extend the time to build the system. I'm not saying this as advice to any reader. Some people may even consider it a bad thing to say. But it's the truth.
I did untar my stashed copy of e2fsprogs-1.42 today and ran the configure, make, make check commands on it. No problems. I know that means very little to you, but I thought I'd mention it.
Here is another idea that I had about this. If you are using a -j option with make or have set it with the MAKEFLAGS environment variable to speed up building, then try again without that. I have had build errors occur that way and then not occur without it.
Here is another idea that I had about this. If you are using a -j option with make or have set it with the MAKEFLAGS environment variable to speed up building, then try again without that. I have had build errors occur that way and then not occur without it.
I've had that happen on LFS, but never when building from source on my native OS.
Quote:
Why yes, yes I am.
Hmmm.....someone's like me......watching too many Phineas and Ferb.
Here is another idea that I had about this. If you are using a -j option with make or have set it with the MAKEFLAGS environment variable to speed up building, then try again without that. I have had build errors occur that way and then not occur without it.
Well no, I am not compiling any of the packages in parallel in chapter 6 because the book advises against it in the beginning of that chapter. I did compile all the packages in chapter 5 in parallel though because the book did not warn me against it . Do you guys think that possibly might have caused a problem? I think I am going to try make check on e2fsprogs after I play some video games because video games are so much easier to deal with than LFS...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.