LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Trying to set up Xorg (https://www.linuxquestions.org/questions/linux-from-scratch-13/trying-to-set-up-xorg-941533/)

CincinnatiKid 04-24-2012 01:54 PM

Trying to set up Xorg
 
I would like to set up Xorg on my LFS 7.1 system. I am attempting to follow the instructions here: http://www.linuxfromscratch.org/blfs...n/x/xorg7.html

When I try to run this bash script:

Code:

bash -e #exit on all errors
section=<proto>
version=7.6-2
mkdir $section
cd $section

# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5

# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
  packagedir=$(echo $package | sed 's/.tar.bz2//')
  tar -xf $package
  cd $packagedir
  ./configure $XORG_CONFIG
  make
  make install
  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop

Nothing happens. No packages are downloaded. Has anyone completed these instructions on LFS 7.1? Am I missing something?

druuna 04-24-2012 02:06 PM

Hi,

The commands mentioned (it is not a script!) is an example of what is to come later on.

You start with the real commands at Setting up the Xorg Build Environment.

Do have a look at all the user notes in the upcoming chapters, they contain valuable information and also the commands to use for that specific chapter (of which the above is an example).

I mentioned it not being a script: You can copy-paste (or type if you want) those directly in the terminal.

Hope this helps.

CincinnatiKid 04-24-2012 02:22 PM

Thanks, I will continue on then. Just so I am clear, is the entire chapter 24 on BLFS required to completely set up xorg? Thanks.

druuna 04-24-2012 02:28 PM

Hi,
Quote:

Originally Posted by lewisforlife (Post 4662020)
Just so I am clear, is the entire chapter 24 on BLFS required to completely set up xorg?

Yes. After that you might want/need a Window Manager and/or Desktop Environment.

Have fun building!

stoat 04-25-2012 09:49 AM

The Xorg chapter has a lot of work to do. So using that template of bash commands for those five large groups of files is very helpful (essential, for me).

I only wanted to add that the example in the book, and that you posted, can be used almost "as is" for the Xorg Protocol Headers group. If you...

1. Change directories in your terminal to your /xc directory
2. Copy the .wget and .md5 files for the proto group to that directory
3. Change <proto> in the template to proto (get rid of the brackets)

...then you can paste the whole thing into the terminal, execute it, and things will happen.

The template also will work "as is" for the Xorg Fonts group since its build commands are the same as proto's. Only, change section=proto to section=font and copy the .wget and .md5 files for the fonts group to the /xc directory.

For the other three groups (Xorg Libraries, Xorg Applications, Xorg Drivers), you have to substitute their more complex build commands in place of the ones in the template. Example for Xorg Libraries...
Code:

bash -e #exit on all errors
section=lib
version=7.6-2
mkdir $section
cd $section

# download and check packages
grep -v '^#' ../${section}-${version}.wget | wget -i- -c \
    -B http://xorg.freedesktop.org/releases/individual/${section}/
md5sum -c ../${section}-${version}.md5

# build packages
for package in $(grep -v '^#' ../${section}-${version}.wget)
do
  packagedir=$(echo $package | sed 's/.tar.bz2//')
  tar -xf $package
  cd $packagedir

case $(basename "$PWD") in
libXfont-[0-9]* )
                ./configure $XORG_CONFIG --disable-devel-docs
                ;;
  libXt-[0-9]* )
                ./configure $XORG_CONFIG \
                    --with-appdefaultdir=/etc/X11/app-defaults
                ;;
              * )
                ./configure $XORG_CONFIG
                ;;
esac &&
make
make install &&
ldconfig


  cd ..
  rm -rf $packagedir
done 2>&1 | tee -a ../xorg-${section}-compile.log #log the entire loop

And so on for Xorg Applications and Xorg Drivers which also have different and complex build commands. So summarizing, you only need to change the section variable and the build commands in the command template for each of the five groups. I like to "fix up" the template for each section in a text editor and then paste it from there into the terminal. This is how I do this anyway. Considering the number of files being installed, it's worth the effort.

P.S.: A new bash shell is started by these, so remember to exit the shell when each one is done (exit).

druuna 04-25-2012 10:12 AM

Hi stoat,

Why make it harder then it has to be/reinvent the wheel? Use the commands in the user notes links, this reduces the possibility to make mistakes.

stoat 04-25-2012 12:23 PM

Hi druuna,

Honestly, I never looked in those user links before. And it didn't register with me exactly to what you were referring in your earlier post. Sorry. But there probably isn't much difference or any less chance of error copying from there or from the main page in the book. I still think that template exists in the book for the purpose that I mentioned above. I don't think using it is re-inventing anything or even harder. But lewisforlife should do what you said. I just misunderstood earlier.

For this system I'm working on now, I decided to script the entire Xorg chapter in a single long bash script (except for the download stuff because I already had the files). I did that this time because I wanted to experiment with installing Xorg a second time after re-installing Python/Glib/pkg-config for several instances of circular dependencies in those. I don't know if it helped anything, but it didn't hurt either. The time spent scripting it was worth it (that script runs for an hour).


All times are GMT -5. The time now is 11:30 PM.