LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problem on installing Xorg (https://www.linuxquestions.org/questions/linux-from-scratch-13/problem-on-installing-xorg-354491/)

satimis 08-18-2005 05:17 AM

Problem on installing Xorg
 
Hi folks,

FC3 Host
BLFS 6.1

Xorg
http://www.linuxfromscratch.org/blfs...ling.html#xorg

X11R6.8.2-src.tar.bz2
MD5 sum: 8131cd7ea1e4566e6e05c438a93fcfe1
# md5sum /mnt/lfs/sources/X11R6.8.2-src.tar.bz2
8131cd7ea1e4566e6e05c438a93fcfe1 /mnt/lfs/sources/X11R6.8.2-src.tar.bz2
8131cd7ea1e4566e6e05c438a93fcfe1

MD5sum found matched.

On chroot environment installed dependencies first
Libpng-1.2.8
Fontconfig-2.3.2
FreeType-2.1.10
Expat-1.95.8

All went throught without problem

Fontconfig Dependencies
installing FreeType-2.1.10 and expat-1.95.8 also went through without problem

Optional - Linux-PAM-0.80 Not installed
Expat Dependencies Optional "Check " not installed.

Steps performed :-

root:/sources$ tar jxf X11R6.8.2-src.tar.bz2
root:/sources$ cd xc
root:/sources/xc$ sed -i '/^SUBDIRS =/s/ etc$//' programs/Xserver/Xprint/Imakefile
root:/sources/xc$ pushd config/util &&
> make -f Makefile.ini lndir
Code:

/sources/xc/config/util /sources/xc
ln -s ../../include X11
cc -o lndir  -O -I. lndir.c
make: cc: Command not found
root:/sources/xc/config/util$ cp -v lndir /usr/bin/
cp: cannot stat `lndir': No such file or directory
root:/sources/xc/config/util$

Please advise how to fix the problem. TIA

B.R.
satimis

satimis 08-18-2005 06:24 AM

Hi folks

Further to my fist posting. Referring to the Notes on building LFS 6.1
6.14. GCC-3.4.3
http://www.linuxfromscratch.org/lfs/...ter06/gcc.html

following 2 steps found left out
ln -s ../usr/bin/cpp /lib
ln -s gcc /usr/bin/cc

To retain space GCC-3.4.3 source and build directories already removed.

On running following commands I found;
# find /mnt/lfs/ -name gcc -type d
Code:

/mnt/lfs/tools/lib/gcc
/mnt/lfs/usr/lib/gcc
/mnt/lfs/.Trash-0/files/gcc-3.4.3/gcc
/mnt/lfs/.Trash-0/files/gcc-3.4.3/gcc/testsuite/ada/acats/tests/gcc
/mnt/lfs/.Trash-0/files/gcc-build/gcc
/mnt/lfs/.Trash-0/files/linux-2.6.11.12/include/asm-mips/gcc
/mnt/lfs/.Trash-0/files/linux-libc-headers-2.6.11.2/include/asm-mips/gcc

# find /mnt/lfs/ -name cpp
Code:

/mnt/lfs/tools/bin/cpp
/mnt/lfs/lib/cpp
/mnt/lfs/usr/bin/cpp
/mnt/lfs/.Trash-0/files/gcc-3.4.3/gcc/testsuite/g++.dg/cpp
/mnt/lfs/.Trash-0/files/gcc-3.4.3/gcc/testsuite/gcc.dg/cpp
/mnt/lfs/.Trash-0/files/gcc-build/gcc/cpp
/mnt/lfs/.Trash-0/files/glibc-2.3.4/scripts/cpp
/mnt/lfs/.Trash-0/files/perl-5.8.6/qnx/cpp

Can I do the missing commands on chroot environment by running;

Code:

root:/sources$ ln -s /mnt/lfs/usr/bin/cpp /lib
and

Code:

root:/sources$ ln -s /mnt/lfs/usr/lib/gcc /usr/bin/cc
OR
Code:

root:/sources$ ln -s /mnt/lfs/tools/lib/gcc /usr/bin/cc
TIA

B.R.
satimis

Oliv' 08-18-2005 07:04 AM

Hi,

I don't exactly remember how makefile is done for Xorg, but you can probably set a CC environnement variable, for example do: export CC=/mnt/lfs/usr/bin/gcc
And I know that it's a bit less comfortable, but I suggest you to compile Xorg from LFS, I mean boot LFS and compile Xorg... 'cause I've tried to do a lot of compilation in chroot environnement when I've built my LFS and I remember to have had a lot of problems when I've tried to compile Xorg from chroot whereas I've got nearly no problems when I've compiled it from LFS

Oliv'

satimis 08-18-2005 07:52 AM

Hi Oliv,

Tks for your advice.

I'm preparing my way to boot LFS 6.1 and to install BLFS 6.1 packages thereafter. But I need to intall following packages on chroot environment first;

Xorg
lynx
PPP-2.4.3
WvDial-1.54.0
RP-PPPoE-3.5
GTK+-1.2.10
GTK+-2.6.7
Firefox

so that the LFS 6.1 box can be connected to Internet and I don't need to print the BLFS 6.1 book and to download all packages before start OR buring the packages on CDs as advised by a folk on forum.

Quote:

you can probably set a CC environnement variable, for example do: export CC=/mnt/lfs/usr/bin/gcc
Whether run this command on chroot OR on the Host as root.

I may try those commands listed on my 2nd posting, if faiing then moving the symbolic links. But I'm worrying whether there is any inverted side effect.

B.R.
satimis

Oliv' 08-18-2005 09:12 AM

In fact, enter chroot environnement and do:
Code:

export CC=`which gcc`
Note that I've use bacquotes ;)
you can try echo $CC to check that something is assigned to CC variable :)

satimis 08-18-2005 09:48 AM

Hi Oliv,

I have to install 'which' command first.

root:/sources$ export CC=`which gcc`
bash: which: command not found

Maybe I can run it on the Host, i.e. exit chroot

B.R.
satimis

Oliv' 08-18-2005 10:53 AM

Quote:

I have to install 'which' command first.
Oooops I forgot this detail :p
Well gcc is probably in /usr/bin so type:
Code:

export CC=/usr/bin/gcc
Oliv'

satimis 08-18-2005 05:56 PM

Hi Oliv' ,

I solved my problem as follow;

In chroot environment
root:/$ ln -s gcc /usr/bin/cc (no printout)
root:/$ ls -l /usr/bin/cc
lrwxrwxrwx 1 root root 3 2005-08-19 06:16 /usr/bin/cc -> gcc

Xorg-6.8.2
http://www.linuxfromscratch.org/blfs...ling.html#xorg

went through without problem except the last step as follow;
Code:

...
....
root:/sources/xc/config/util$ cp -v lndir /usr/bin/
`lndir' -> `/usr/bin/lndir'
root:/sources/xc/config/util$ mkdir ../xcbuild &&
> cd ../xcbuild &&
> lndir ../xc
../xc: No such file or directory
root:/sources/xc/config/xcbuild$

root:/sources/xc/config/xcbuild$ ls
Code:

BUILD  config  doc  LABEL  lib  nls  programs  README
README.crypto  registry  xf86Date.h

"../xc" may not find it. I think full path "/sources/xc" may find it. Any suggestion to fix this last step.

satimis

satimis 08-18-2005 10:05 PM

Problem solved
 
Hi folks,

Last problem now solved. Because I missed running "popd". Tks.

satimis

aneel 09-23-2005 09:26 AM

Xorg installation error
 
hi
i install Xorg from lfs and from red hat both but when i write command

make CC=/opt/gcc-2.95.3/bin/gcc -f Makefile.linux



it say



kernel.config file not found

Oliv' 09-23-2005 10:30 AM

:confused:
That's not the way we compile Xorg... Have you follow this step by step document: http://www.linuxfromscratch.org/blfs...ling.html#xorg to install Xorg ???
Moreover, I'm not sure that Xorg will compile with gcc-2.95...

Oliv'

aneel 09-24-2005 05:48 AM

oliv
 
hi
oliv

thanks for your reply.
actually i am building lfs 5.1 the link you give is installation of Xorg lfs6.1 can it work for lfs 5.1 having Xorg 6.7.0 and i m using blfs 5.1
i m waiting for your reply
bye
bye

Oliv' 09-24-2005 07:20 AM

Hi,

Well if you install Xorg6.8.2 it will work whatever the distribution you have... Now as you want to install Xorg-6.7.0, I think that it should work 'cause the procedure has not changed between 6.7.0 and 6.8.2 version
Bye

Oliv'

aneel 10-13-2005 05:59 AM

Same error occurs oliv
 
hi
oliv
i used your referenced manual but,
when i write command


cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel &&
make -f Makefile.linux &&
mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ &&
cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \
/lib/modules/`uname -r`/kernel/drivers/char/drm/ &&
depmod -a


same error occur
kernel config file not found.
plz tell me how to remove this beautiful error

bye
bye

mr_demilord 10-13-2005 11:07 AM

Re: Same error occurs oliv
 
Quote:

Originally posted by aneel
hi
oliv
i used your referenced manual but,
when i write command


cd programs/Xserver/hw/xfree86/os-support/linux/drm/kernel &&
make -f Makefile.linux &&
mkdir -p /lib/modules/`uname -r`/kernel/drivers/char/drm/ &&
cp gamma.o radeon.o sis.o r128.o i810.o i830.o mga.o tdfx.o \
/lib/modules/`uname -r`/kernel/drivers/char/drm/ &&
depmod -a


same error occur
kernel config file not found.
plz tell me how to remove this beautiful error

bye
bye

If you compile it from the host, your current distro it wont work because the host machine has a other kernel.

ps: What I did was a litle hack, I copied the kernel from LFS to the /boot from my SuSE 9.3 and the /lib/modules to my host Distro and added a line to the grub so I boot with the LFS kernel on my SuSE distro and then compiled Xorg so I have the exact same kernel, when I did that I removed the kernel and modules and the line in grub.conf.

You als have to copy the .config file from the compiled kernel to the /boot partition.
If you have followed the book then it should work if not.
Then you have to recompile the LFS kernel and copy the .config file to the boot directory.

aneel 10-14-2005 02:42 AM

Kernel config file not found
 
Hello !
We are building Xorg by using lfs distribution.So our host is lfs and we could not find the kernel config file.We are in great trouble .Please help us .


BYE Bye

mr_demilord 10-14-2005 07:01 AM

http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html

Quote:

The kernel configuration file .config produced by the make menuconfig step above contains all the configuration selections for the kernel that was just compiled. It is a good idea to keep this file for future reference:

cp .config /boot/config-2.6.11.12

aneel 10-18-2005 04:10 AM

Startx
 
Hi
when i write Command

Startx a gray screen and clock is shown but it gives error
xterm error 32 error 2
unable to open agpgart file

if some knows reply plz

thanks
bye
bye

mr_demilord 10-18-2005 04:25 AM

Re: Startx
 
Quote:

Originally posted by aneel
Hi
when i write Command

Startx a gray screen and clock is shown but it gives error
xterm error 32 error 2
unable to open agpgart file

if some knows reply plz

thanks
bye
bye

You forgot to compile agpgart in the kernel.

aneel 10-18-2005 04:49 AM

what to do now
 
hi


tell
me
what
to
do
now

Oliv' 10-18-2005 04:53 AM

Hi,

Well as mr_demilord said you need to recompile your kernel with agpart support:
Code:

cd /usr/src/linux
make menuconfig

then I think it is in "device driver"->"char devices"
Code:

make && make modules_install
then copy the appropriate file in /boot (rerun lilo if you use it as bootloader) and retry to start X :)

Oliv'

aneel 10-18-2005 05:01 AM

no directory
 
error occurs
cd /usr/src/linux no such file or directory

aneel 10-18-2005 05:35 AM

Oliv
 
i m waiting for your reply.

Oliv' 10-18-2005 07:17 AM

Well enter the directory where you 've put kernel sources...

mr_demilord 10-18-2005 10:28 AM

You should read the part of compiling the kernel in the LFS book.
Thats where it's explained.

satimis 10-18-2005 08:45 PM

Re: no directory
 
Hi aneel,

Quote:

error occurs
cd /usr/src/linux no such file or directory

It would be /usr/src/linux-2.6.11.12

something likes that with a number followed.

OR if you untar the package on /source, then it would be there;

/source/linux-2.6.11.12

HTH

satimis

aneel 10-21-2005 01:32 AM

xterm error
 
hi

i compile kernel in this way

make menuconfig
enable agpart support

make CC=/opt/gcc-2.95.3/bin/gcc dep


make CC=/opt/gcc-2.95.3/bin/gcc bzImage

make CC=/opt/gcc-2.95.3/bin/gcc modules

make CC=/opt/gcc-2.95.3/bin/gcc modules_install

cp arch/i386/boot/bzImage /boot/lfskernel
cp System.map /boot
cp .config /boot/config-lfskernel

it compile successfully
but when run
startx
it gives same error agpart not found
xterm is not shown
error 32
not enough pty

mr_demilord 10-21-2005 02:23 AM

Re: xterm error
 
Quote:

Originally posted by aneel
[B]hi

i compile kernel in this way

make menuconfig

Did you do make clean && make mrproper? never assume a kernel is clean after unpacking.

Quote:

enable agpart support
This is good

Quote:

make CC=/opt/gcc-2.95.3/bin/gcc dep
This option is depraced and is not needed for the 2.6 branch of the kernel


Quote:

make CC=/opt/gcc-2.95.3/bin/gcc bzImage
make CC=/opt/gcc-2.95.3/bin/gcc modules

make CC=/opt/gcc-2.95.3/bin/gcc modules_install
This should be <make bzImage>
<make modules>
<make modules_install>

Quote:

cp arch/i386/boot/bzImage /boot/lfskernel
cp System.map /boot
cp .config /boot/config-lfskernel
Should be:
cp arch/i386/boot/bzImage /boot/lfskernel-2.6.11.12
cp System.map /boot/System.map-2.6.11.12
cp .config /boot/config-2.6.11.12

Quote:

it compile successfully
but when run
startx
it gives same error agpart not found
xterm is not shown
error 32
not enough pty
Read the book, LFS noted some things about not enough pty's.
Quote from LFS book Chapter 6.13 Binutils
Quote:

Verify that the PTYs are working properly inside the chroot environment. Check that everything is set up correctly by performing a simple test:
expect -c "spawn ls"
If the following message shows up, the chroot environment is not set up for proper PTY operation:
The system has no more ptys.
Ask your system administrator to create more.
This issue needs to be resolved before running the test suites for Binutils and GCC.
You should do exactly what the book says, word by word, and have experience with compiling a kernel, otherwise the build will fail.

aneel 10-21-2005 04:54 AM

same result xterm
 
hi

mr_demilord
i do whatever you say
kernel compile successfully
but
when startx
same result

it gives same error agpart not found
xterm is not shown
error 32
not enough pty

aneel 10-21-2005 04:59 AM

hi
i m compiling kernel by booting my lfs5.1
kernel complie successfully is there need to recompile the Xorg
i m tied of getting error
any one can help me
problem is
i run command
startx

xclock and mouse is shown
but
no
xterminal

it says not enough pty

enable to open /dev/agpgart no such file or directory


plz help me if some one knows about it

mr_demilord 10-21-2005 10:48 AM

Quote:

Originally posted by aneel


it says not enough pty

enable to open /dev/agpgart no such file or directory


plz help me if some one knows about it

do you have the following line in fstab? about not enough pty's
Code:

devpts                /dev/pts        devpts                gid=4,mode=620                        0    0
Then in the console type to create the device
Code:

mknod /dev/agpgart c 10 175
Hope this helps

aneel 10-23-2005 11:17 PM

Playing with errors
 
hi
i run command mknode

then i do startx
it shows a box
H 90.0 kh
V 60.0 Hz
shows nothing
no mouse and clock

when i remove the file /dev/agpgart
it shows clock and mouse
and ........................................error
not enough pty and enable to open /dev/agpgart




All times are GMT -5. The time now is 10:29 AM.