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.
ok thks the book I downloaded to follow is slightly different. I have book marked that link thks. It dosn't mention util-macros. I will run it again as root tho
Ok I have just checked /etc/profile.d/xorg.sh file 1st line reads XORG_PREFIX="<PREFIX> Am I right in that should be usr? DID I forget to change it? if so can I just change it with vim or delete start again. The reason is I still have the same results running util-macros again as per link.
Ok I rebuilt from the beginning of chapter 23 intro removed xorg.sh started again. this time got past error of macros, installed Headers then downloaded makedepend ran
Code:
./configure $XORG_CONFIG &&
make
I get error
Code:
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files...64
checking for X... configure: error: Package requirements (xproto) were not met
No package xproto found.
Consider adjusting the PKG_CONFIG_PATH enviroment variable if you installed software in a non-standard prefix
# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH}
for DIR in ${!PATHVARIABLE} ; do
above from link mine below
# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH
for DIR in ${!PATHVARIABLE} ; do
The setting of those (and other) environment variables are essential.
I guess you need to revisit The Bash Shell Startup Files and have another look at /etc/profile.d/xorg.sh.
Are you logging straight into the root account? If not: are you using su -. The first is preferable, the second does need the trailing dash (i.e: su won't do it must be su -).
Ok that was a Wrong move I have umpteen bash errors now opps. This could end up a rebuild.I have no vim , ls not sure what else dont work
Although you don't give too many details, a complete rebuild probably isn't needed. Vim for example was build during LFS, if the system cannot find it at the moment, something might be wrong with the current PATH setting.
I'm guessing/assuming that something went wrong during the editing of the The Bash Shell Startup Files. You can do 2 things:
1) Use the full path to, for example, vim: Use /usr/bin/vi <file> instead of vi <file>,
2) Boot from the liveCD and use it to fix your problems.
If you made mistakes in setting up the startup files, vi is all you need for now and I would go for option 1.
I would like to fix the problem, To me it looks a mess but I,m willing to try. I will load a live cd maybe change what i did last night. It did list bash commands not found, even shutdown wont work nor dose ejecting cd. Thats all I can remember at the moment.
Ok went back in with vi changed /etc/profile back.
Code:
# Begin /etc/profile
# System wide environment variables and startup programs.
# System wide aliases and functions should go in /etc/bashrc. Personal
# environment variables and startup programs should go into
# ~/.bash_profile. Personal aliases and functions should go into
# ~/.bashrc.
# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH
for DIR in ${!PATHVARIABLE} ; do
if [ "$DIR" != "$1" ] ; then
NEWPATH=${NEWPATH:=$NEWPATH:}$DIR
fi
done
export $PATHVARIABLE="$NEWPATH"
}
pathprepend () {
pathremove $1 $2
local PATHVARIABLE=${2:-PATH}
export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
}
pathappend () {
pathremove $1 $2
local PATHVARIABLE=${2:-PATH}
export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
}
# Set the initial path
export PATH=/bin:/usr/bin
if [ $EUID -eq 0 ] ; then
pathappend /sbin:/usr/sbin
unset HISTFILE
fi
# Setup some environment variables.
export HISTSIZE=1000
export HISTIGNORE="&:[bf]g:exit"
# Setup a red prompt for root and a green one for users.
NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [[ $EUID == 0 ]] ; then
PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
else
PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
fi
for script in /etc/profile.d/*.sh ; do
if [ -r $script ] ; then
. $script
fi
done
# Now to clean up
unset pathremove pathprepend pathappend
# End /etc/profile
I do have a error -bash: /etc/profile: line 69: syntax error: unexpected end of file.
I must admit this was there before.
All is back as it was yesterday
Ok went back in with vi changed /etc/profile back.
Code:
# Begin /etc/profile
# System wide environment variables and startup programs.
# System wide aliases and functions should go in /etc/bashrc. Personal
# environment variables and startup programs should go into
# ~/.bash_profile. Personal aliases and functions should go into
# ~/.bashrc.
# Functions to help us manage paths. Second argument is the name of the
# path variable to be modified (default: PATH)
pathremove () {
local IFS=':'
local NEWPATH
local DIR
local PATHVARIABLE=${2:-PATH # <--- missing a closing bracket
for DIR in ${!PATHVARIABLE} ; do
if [ "$DIR" != "$1" ] ; then
NEWPATH=${NEWPATH:=$NEWPATH:}$DIR
fi
done
export $PATHVARIABLE="$NEWPATH"
}
I do have a error -bash: /etc/profile: line 69: syntax error: unexpected end of file.
I must admit this was there before.
All is back as it was yesterday
Without the closing bracket this script is not, or at best partially parsed. As a side effect: Nothing in /etc/profile.d/ is parsed, which would explain the missing environment variables talked about in earlier replies.
You have to fix these errors before (re)starting X.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.