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.
By default, the location of the updatedb database is in /usr/var. To make the location of /var/lib/misc/locatedb file FHS compliant, pass the localstatedir=/var/lib/misc option to both make commands below.
Continue with compiling the package:
make libexecdir=/usr/bin
Finish installing the package:
make libexecdir=/usr/bin install
So, I am assuming they just got lazy in the book and didn't type this all out, but they do expect you to type in:
make libexecdir=/usr/bin --localestatedir=/var/lib/misc
make libexecdir=/usr/bin install --localestatedir=/var/lib/misc
Is that correct? I guess I just want to make sure it's 2 dashes, --, and make sure the stuff after the equal sign doesn't need to be in parenthesis.
make libexecdir=/usr/bin localestatedir=/var/lib/misc
make libexecdir=/usr/bin localestatedir=/var/lib/misc install
Passing "--localestatedir=/var/lib/misc" shouldn't work. That would be interpreted by make as a command-line option, whereas what you're trying to do is define a directory for the package your compiling... not make. So "localestatedir=/var/lib/misc" would define a shell variable for that command only, and the Makefile for findutils probably looks at that variable's contents to determine where to place the database.
Originally posted by Dark_Helmet
Passing "--localestatedir=/var/lib/misc" shouldn't work. That would be interpreted by make as a command-line option, whereas what you're trying to do is define a directory...
But the part, then, that confused me was:
Quote:
pass the localstatedir=/var/lib/misc option to both make commands
Sounded like a command line option to me.
I'm glad i asked, and I assume that that worked for you.
To be honest, I can't remember if I made the system 100% FHS compliant. It wouldn't hurt to run the command with the '--' prepended to the localestatdir option, because I'm pretty sure you'll just get an error. And in that case, you just run it again without the dashes...
it doesn't say where to put the assignment in the command, but it does say to use the '--'.
Confusing, isn't it?
If you use findutils-4.1 you pass "localstatedir=/var/lib/misc" to make like so:
make localstatedir=/var/lib/misc <other stuff here>
Don't use --localstatedir. In this case it isn't a command line option to the make program, but an override to a definition in the Makefile file. You're passing a variable name and value on the make command line, not a program option.
If you use findutils-4.1.x you pass the option to the configure script as a command line option ala ./configure --blah --localstatedir=/var/lib/misc and the configure script will write the Makefile files with that variable and value so you don't need to override it anymore. Earier findutils versions (like 4.1) don't support the configure script option.
So, which one do you use? Depends on your findutils version. If you're following the CVS version of the book, you're using (or supposed to anyways) version 4.1.7 (use configure script option). If you use a stable release, you're using 4.1 (use make option).
If you use findutils-4.1 you pass "localstatedir=/var/lib/misc" to make like so:
make localstatedir=/var/lib/misc <other stuff here>
I purchased the 4.1 book and the CD in your initial pre-order special offer since I have a 56K connection, so I'm not using CVS, which, as I understand it, is Concurrent Version System, and involves a bunch of downloading. I am however, checking the printed book against the online book for typos and changes.
I'm trying not to deviate from the book too much since this is my first attempt. FBBG!
Thanks for the help.
Edit: my typo in posts above: localestatedir - should be localstatedir
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.