LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 03-27-2011, 12:55 PM   #16
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412

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
 
Old 03-27-2011, 02:01 PM   #17
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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.
 
Old 03-27-2011, 02:09 PM   #18
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Yes it should point to /usr (assuming you went with the default).

Just edit it with vi, log out and log in again to make sure the file is parsed (execute echo $XORG_PREFIX after the login to check if it is set).

Hope this helps.
 
Old 03-27-2011, 02:10 PM   #19
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
As stated by some of your other posts user mistakes
 
Old 03-27-2011, 03:34 PM   #20
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
Old 03-27-2011, 03:42 PM   #21
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Did you do this step (especially the /etc/profile.d/X.sh part): The Bash Shell Startup Files?

echo $PKG_CONFIG_PATH to check if /usr/X11R6/lib/pkgconfig was/is added.

Hope this helps.
 
Old 03-27-2011, 03:48 PM   #22
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
When I type echo $PKG_CONFIG_PATH returns nothing

When i fried echo $XORG_PREFIX return nothing
 
Old 03-27-2011, 03:56 PM   #23
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
ok found a mistake.

# 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 } missing from {2:-PATH <<<

Will insert with vim?
 
Old 03-27-2011, 04:00 PM   #24
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

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 -).

Hope this helps.
 
Old 03-27-2011, 04:01 PM   #25
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Will insert with vim?
yes, and log out/in again
 
Old 03-27-2011, 04:20 PM   #26
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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

Last edited by spiky0011; 03-27-2011 at 04:22 PM.
 
Old 03-28-2011, 03:20 AM   #27
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by spiky0011 View Post
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.

Hope this helps.
 
Old 03-28-2011, 07:09 AM   #28
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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.
 
Old 03-28-2011, 11:56 AM   #29
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: /LFS/Debian
Posts: 2,511

Original Poster
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
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
 
Old 03-28-2011, 12:08 PM   #30
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by spiky0011 View Post
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.

Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Building Xorg 7.2 unable to startx ecook Linux - Desktop 16 09-29-2008 08:41 AM
Chapter 6 Building the LFS System brayden516 Linux From Scratch 1 05-01-2008 11:41 AM
Problems building Xorg-6.8.2 CopperTopp Linux - Desktop 1 01-21-2007 02:36 AM
Stuck on chapter 5 when building Tcl-8.4.6 For LFS-5.1 deMilo Linux From Scratch 2 06-20-2004 03:31 AM
Building Gcc-core-3.3.1 Chapter 5 mullog Linux From Scratch 8 05-27-2004 12:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration