LinuxQuestions.org
Review your favorite Linux distribution.
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 07-27-2004, 03:13 PM   #1
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 55
XFree86-4.4.0 compilation error


Hi all,

I posted this in LQ-Forum "Linux-Software" but - as suggested there - I might be better off here...

I have to ask for help on this one - I have'nt got a clue what to do here...

Without success I tried to build XFree86 (4.4.0) from source and I'm getting the following error:
(just the last lines from compile.log)



making all in programs/Xserver/hw/xfree86/os-support/linux/drm/kernel...
make[9]: Entering directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel'
make -f Makefile.linux
make[10]: Entering directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel'
+ mv -f Makefile Makefile._xx_
+ ln -s Makefile.linux Makefile
make -C /lib/modules/2.6.7/build SUBDIRS=`pwd` DRMSRCDIR=`pwd` modules
make[11]: Entering directory `/usr/src/linux-2.6.7'
CC [M] /mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o
In file included from /mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c:57:
/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h: In function `gamma_do_vm_nopage':
/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:104: error: structure has no member named `count'
make[12]: *** [/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.o] Error 1
make[11]: *** [_module_/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel] Error 2
make[11]: Leaving directory `/usr/src/linux-2.6.7'
make[10]: *** [modules] Error 2
make[10]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel'
make[9]: *** [all] Error 2
make[9]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel'
make[8]: *** [all] Error 2
make[8]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm'
make[7]: *** [all] Error 2
make[7]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux'
make[6]: *** [linux] Error 2
make[6]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86'
make[4]: *** [hw/xfree86] Error 2
make[4]: Leaving directory `/mnt/extra/Software/X/xc/programs/Xserver'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/mnt/extra/Software/X/xc/programs'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/mnt/extra/Software/X/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/mnt/extra/Software/X/xc'
make: *** [World] Error 2


I'm running LFS with kernel 2.6.7, glibc-2.3.2, gcc-3.3.2 - I compiled _everything_ on the System with this compiler (XFree-4.3.0.1 Gnome-2.6 KDE ...)

There are no special compiler-flags set:
-> in my .bash_profile I have "-O2 -fomit-frame-pointer -march=athlon-xp"

but this should not matter for the build...

-> in the host.def I have the following line:

#define DefaultGcc2i386Opt -O2 -fomit-frame-pointer -march=athlon-xp

Because it seems to be a problem while compiling the driver for my graphics-card - here is the line from host.def:

#define XF86CardDrivers ati AgpGartDrivers fbdev vesa vga XF86OSCardDrivers



(I have a ATI Technologies Inc Rage 128 RF/SG AGP rev 0 - which is working fine with XFree86-4.3.0.1 and also with previous Versions)

I can compile XFree-4.3.0 without errors and successfully - with the exact same host.def...
But that is what I have already.
I did try this just to check if the problem would be my kernel-source-tree - the problem could be there, because it is getting mentioned at the beginning of the error-message.


The kernel (2.6.7) and the compiler (gcc-3.3.2) are about the only thing I have installed deviating(?) - I mean different - from Instructions in the then most recent LFS-Book.
Since then I have recompiled (almost) every Program on the System to be current with LFS 5.0.

I have asked this Question before here on LinuxQuestions.org, but did not get any replies then.

I hope someone can point me in the right direction - please?!


Thank you!

Jochen
 
Old 07-27-2004, 04:56 PM   #2
Dargason
LQ Newbie
 
Registered: Jul 2004
Location: Leuven, Belgium
Distribution: Mandrake 10, LFS 5.1.1, Debian
Posts: 29

Rep: Reputation: 15
Well, I don't really understand what's going on, but I know that in the LFS book they generally recommend unsetting any of the optimization flags, including "-march"... maybe you could try that?
 
Old 07-27-2004, 05:08 PM   #3
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
The problem is the kernel headers from the 2.6 kernel. There are two ways to fix it, you could copy (or symlink) some header files from /usr/src/linux/include/linux into /usr/include/linux or you can alter the XFree source to stop it including the kernel headers. Open the file /mnt/extra/Software/X/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h in a text editor and remove line 41 where it says
#include <linux/config.h>

You may encounter similar problems later on when you come to compile Mplayer or Xine-libs. I don't know what the correct solution is there, I took the uncool option and made symbolic links to the current kernels headers. Good luck.
 
Old 07-27-2004, 05:18 PM   #4
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Original Poster
Rep: Reputation: 55
Thank you Dargason
...but it's almost definately not the CFLAGS - they are not aggressive at all - just producing code for my processor... but I'll try that too

Thank you Andrew Benton - this sounds good - it ist getting late now, so I'll try that tomorrow and see what happens

btw. - I've already compiled Mplayer and Xine successfully under 2.6.7 - no problems whatsoever

Jochen
 
Old 07-27-2004, 05:37 PM   #5
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Hmm...I think I spoke too soon, sorry. I've Googled around a bit and it looks like you're seeing a different error. Yours looks the same as this one http://linuxfromscratch.org/pipermai...ly/051015.html (which cleverer people than me haven't fixed yet) and also has similarities to this http://www.linuxquestions.org/questions/history/204767 . I'm sorry if I've lead you a dance.
 
Old 07-28-2004, 09:54 AM   #6
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Original Poster
Rep: Reputation: 55
Thank you Andrew Benton

..I did of course use google also to look for a solution to my problem - but that was before my first post (which got no replies).
At that time (maybe 3+ weeks ago) the things you pointed me at did not exist yet - and still do not ;-(
I will follow the first thread you pointed me to as it is exactly the same error-message described there.
I just moved my copied /usr/include/linux (as I explained in my post to LQ - Linux-Software) and made a link instead to /usr/scr/linux/include/linux (which points to my current kernel) - to no avail.
Since I'm not at all a knowing person, when it comes to understanding the source - I can see the structure DRM_DEBUG which seems to cause the error - I can see a variable count in it...but when I change that to _count, isn't it then a new variable (would it not needed to be declared somewhere)?
Nowhere in the code I found a variable called _count.

This is the structure in xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm_vm.h:

DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
baddr, __va(agpmem->memory->memory[offset]), offset,
atomic_read(&page->count));
return page;

In the kernel-source ( /lib/modules/2.6.7/build/drivers/char/drm/drm_vm.h ) I found a similar structure of the same name:

DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
baddr, __va(agpmem->memory->memory[offset]), offset,
page_count(page));
return page;


Thank you for your help so far - I saw you asking on behalf of my problem :-)
I just launched a new compile maybe I will get to understand it - I'm rather assuming that I'm too stupid than to even think of an error in the code - this would have hit a lot of people by now and would be fixed already.

Jochen
 
Old 07-28-2004, 02:03 PM   #7
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Original Poster
Rep: Reputation: 55
Talking

It is done !

I have compiled it and it is now running!
What I did is this:

following the first hint and link you gave me, I read through the conversation and decided to try what Ken Moffat wrote on http://linuxfromscratch.org/pipermai...ly/051036.html
As I read it, it would be next to useless to compile the kernel-modules from the XFree-source because the ones from kernel-source are just as new and good.
I have agpgart compiled in the kernel as well as drm and a module for my graphics-card (ati rage 128).
I added the following to my host.def:

#define BuildXF86DRI No
#define BuildXF86DRM Yes

...and it compiled cleanly, because the offending things where'nt needed to be compiled.
Question: shold or could I set the second one also to "No" ?

To avoid an error-message from X I commented out the line in XF86Config, that said:
Load "dri"

The only thing I noticed while running the new server was, that glxgears did not run as fast as it had been before - a drop from about 75 fps down to about 20 fps in fullscreen-mode.
I'm not sure, if this is a DRI thing.

I'm trying now to compile with these additions to host.def:

#define MesaUse3DNow YES
#define MesaUseSSE YES

I hope this is the solution to this speed-problem?!

Maybe someone can give me a hint on how to do this the way it shold be done - I hope dri is not needed for this, because that would put me where I was...

Thanks for your help till now!

Jochen

Last edited by jomen; 07-28-2004 at 02:04 PM.
 
Old 07-28-2004, 05:27 PM   #8
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
Well done for getting it working. I wish I could help more but I have an Nvidia card and so I've never faced these issues. A drop from 75 to 20 fps seems quite a step back. I don't remember noticeing anything different when I went from XFree86-4.3.0 to XFree86-4.4.0 so I wonder if it was worth it? If you were getting better performance before...
And the other thing is, if the problem is with the 2.6.7 kernel, could you install a 2.6.6 kernel, then install XFree the way you want and then reinstall the 2.6.7 kernel? I have to reinstall the nvidia driver when I recompile the kernel but I don't have to reinstall XFree so I don't know if that suggestion makes sense with an ATI graphics card.
 
Old 07-28-2004, 05:51 PM   #9
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Original Poster
Rep: Reputation: 55
these where my thougts also - I still have my old 2.4.24 kernel but it felt like cheating to go back.
Since the speed-problem remains, I will do that to compile X _with_ DRI...

The reason for wanting XFree4.4.0 was another Programm I tried to compile - Myth-TV or some other TV-Software - and that failed with errors pointing to some XFree headers and libraries... so I thougt, having the current version would cure that and I could go on more successful...

Thank you again !

Jochen
 
Old 07-29-2004, 05:48 AM   #10
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Original Poster
Rep: Reputation: 55
I will call this the end of this thread...

why doing it the easy way when one can take a hard and slow one...you still end up at the same place - with all the others already gone ;-)

I still don't know, why it did not work...
I booted my kernel 2.4.24 and compiled the thing without any problems - booted 2.6.7 and the problem was - not solved, but gone for me.
I'm not able to figure it out - but it works now for me.

Thank you all

Jochen
 
  


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
Kernel compilation error: Error 15: File not found Niceman2005 Linux - General 9 10-04-2007 03:45 AM
XFree86 4.5.0 compilation problem ParticleHunter Linux From Scratch 3 07-19-2005 05:56 AM
XFree86-4.4.0 compilation error jomen Linux - Software 8 07-29-2004 05:47 AM
XFree86-4.4.0 compilation error jomen Linux - Software 0 07-09-2004 01:54 AM
Sqwebmail compilation error ... [maildirsearchC.o] Error 1 boogie_maan Linux - Software 0 10-26-2002 07:21 PM

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

All times are GMT -5. The time now is 11:58 AM.

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