LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-19-2010, 11:34 PM   #1
Blender3D
Member
 
Registered: Jun 2010
Distribution: Linux Mint 9 x64, Linux From Scratch
Posts: 46

Rep: Reputation: 17
Mesa Libraries Won't Compile: cannot stat...


[I wonder if this forum has frequent-poster miles ]

I'm almost at the last stage of compiling X, and I need Mesa. Every time I compile it (both version 6.x.x and 7.x.x), I get some error.

Here's the end of the 6.5.2 compile:
Code:
gcc -c -I. -I../../../include -I../../../include/GL/internal -I../../../src/mesa/main -I../../../src/mesa/glapi -I../../../src/mesa/drivers/dri/common `pkg-config --cflags libdrm` -I/usr/X11/include -Wall -Wmissing-prototypes -std=c99 -ffast-math -O2 -fno-strict-aliasing  -m32 -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS -DHAVE_POSIX_MEMALIGN -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DDEFAULT_DRIVER_DIR=\"/usr/X11/lib/X11/modules/dri\"  ../../../src/mesa/x86/glapi_x86.S -o ../../../src/mesa/x86/glapi_x86.o
../../../bin/mklib -o GL -linker 'gcc' \
		-major 1 -minor 2  \
		-install ../../../lib -L/usr/X11/lib -lX11 -lXext -lXxf86vm -lm -lpthread -ldl `pkg-config --libs libdrm` glcontextmodes.o clientattrib.o compsize.o eval.o glxcmds.o glxext.o glxextensions.o indirect.o indirect_init.o indirect_size.o indirect_window_pos.o indirect_transpose_matrix.o indirect_vertex_array.o indirect_vertex_program.o pixel.o pixelstore.o render2.o renderpix.o single2.o singlepix.o vertarr.o xfont.o glx_pbuffer.o glx_query.o glx_texture_compression.o dri_glx.o XF86dri.o ../../../src/mesa/main/dispatch.o ../../../src/mesa/glapi/glapi.o ../../../src/mesa/glapi/glthread.o ../../../src/mesa/x86/glapi_x86.o
mklib: Making Linux shared library:  libGL.so.1.2
/usr/bin/ld: skipping incompatible /usr/X11/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/X11/lib/libX11.a when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/X11/lib/libX11.so when searching for -lX11
/usr/bin/ld: skipping incompatible /usr/X11/lib/libX11.a when searching for -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
mklib: Installing libGL.so.1.2 libGL.so.1 libGL.so in ../../../lib
mv: cannot stat `libGL.so.1.2': No such file or directory
make[3]: *** [../../../lib/libGL.so] Error 1
make[3]: Leaving directory `/sources/X/data/Mesa-6.5.2/src/glx/x11'
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/sources/X/data/Mesa-6.5.2/src'
make[1]: *** [default] Error 1
make[1]: Leaving directory `/sources/X/data/Mesa-6.5.2'
make: *** [linux-dri-x86] Error 2
My compile flags were:
Code:
make linux-dri-x86 OPT_FLAGS="-O2 -fno-strict-aliasing" \
    DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri \
    X11_INCLUDES=-I${XORG_PREFIX}/include \
    EXTRA_LIB_PATH=-L${XORG_PREFIX}/lib
and this (since I thought switching the flags to x64 might work):
Code:
make linux-dri-x86-64 OPT_FLAGS="-O2 -fno-strict-aliasing" \
    DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri \
    X11_INCLUDES=-I${XORG_PREFIX}/include \
    EXTRA_LIB_PATH=-L${XORG_PREFIX}/lib
Does anybody have any ideas on why Mesa is being uncooperative? Thanks
 
Old 06-20-2010, 02:57 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

Your info is a bit on the thin side....

- Which BLFS version are you trying?
- Which parts of chapter 23 (assuming BLFS 6.3) did you build already?
- Any Problems when building them?
- The following I don't understand:
Quote:
Every time I compile it (both version 6.x.x and 7.x.x), I get...
The book, again assuming BLFS 6.3, talks about mesa 6.5.2. Don't deviate from that version.

The error shown complains about libX11, which is part of the Xorg Libraries build. Which XORG_PREFIX do you use and do you need to link them? This part:
Quote:
Configuration of Xorg Libraries

If you've chosen to install Xorg into /usr, then no further configuration is necessary and you can skip the rest of this section. If you've opted for an alternate prefix, you should create two symlinks to satisfy the expected environment of several packages. Execute the following commands as the root user:

ln -sv $XORG_PREFIX/lib/X11 /usr/lib/X11 &&
ln -sv $XORG_PREFIX/include/X11 /usr/include/X11
Hope this helps.
 
Old 06-20-2010, 05:13 PM   #3
Blender3D
Member
 
Registered: Jun 2010
Distribution: Linux Mint 9 x64, Linux From Scratch
Posts: 46

Original Poster
Rep: Reputation: 17
Sorry, I'm using LFS 6.6 and BLFS 6.3. I tried to compile Mesa with the version specified, but it gave me an error. I tried the latest version of the 6.xx, and then switched to the latest 7.xx tarball. Neither one worked.

Also, I'm at the second-to-last stage of the section about X, I just need to compile X Server and I'm ready to go on to get a Window Manager.

I edited my compile options slightly, since using "linux-dri-x86" didn't work . I used these configurations (and the 64-bit options too):
Code:
make linux-x86 OPT_FLAGS="-O2 -fno-strict-aliasing" \
    DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri \
    X11_INCLUDES=-I${XORG_PREFIX}/include \
    EXTRA_LIB_PATH=-L${XORG_PREFIX}/lib
It got farther than before, but failed when compiling the DRX/DRI? driver. Are the drivers necessary? I plan on using the nVidia binary...

Here's the output of env:
Code:
XORG_CONFIG=--prefix=/usr/X11 --sysconfdir=/etc     --mandir=/usr/X11/share/man --localstatedir=/var
TERM=xterm
HISTSIZE=1000
OLDPWD=/sources/X/util
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:
PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/X11/bin
INPUTRC=/etc/inputrc
PWD=/sources/X/util/xkeyboard-config-1.2
LANG=en_US.utf8
XORG_PREFIX=/usr/X11
PS1=\[\e[1;31m\]\u\[\e[0m\] \[\e[1;32m\]\w\[\e[1;31m\] # \[\e[0m\]
HISTIGNORE=&:[bf]g:exit
SHLVL=1
HOME=/root
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/X11/share/pkgconfig:/usr/X11/lib/pkgconfig
_=/usr/bin/env
I did remember so symlink the libraries this time, since this is my fourth attempt at installing X (and my most successful yet!).

Thanks!

Last edited by Blender3D; 06-20-2010 at 05:15 PM.
 
Old 06-21-2010, 03:04 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

I don't understand why you are trying to install Mesa at this late point....
When you installed the Xorg Applications part (5 steps earlier then the Server part), Mesa needed to be installed and the Mesa chapter even mentions not removing the source tree so the Xorg-Server-1.2.0 server part can be build later on.

Did you check and re-check the Xorg Libraries part (as I mentioned in post #2)? The error shown seems to point to a (incompatible) libX11 problem. This could be caused by either the Xorg library or the mesa part.

Am I right in assuming that you are trying to build a 64 bit X? The book is not based on that, just 32 bit. Try building it the way the book suggests first and see if that works. Don't change the option/versions in the book unless the book mentions it (or if you really know what you are doing).

Another thing: Did you check the Mesa user notes link? Is all that correctly installed?

This you might already know, but just in case: Do remove the source tree when rebuilding a chapter, not starting with a fresh tree might get you into trouble.

Hope this gets you going again.
 
Old 06-22-2010, 10:44 PM   #5
Blender3D
Member
 
Registered: Jun 2010
Distribution: Linux Mint 9 x64, Linux From Scratch
Posts: 46

Original Poster
Rep: Reputation: 17
Thanks for the replies. I thought I was compiling a 32-bit system, until I saw the gcc compiler flags include linux-unknown-x86_64 or something similar. Everything works almost perfectly now, Mesa installed (I just changed the X11 install path from /usr/X11 to /usr and reinstalled X completely, since I automated it completely) and everything seems to work. I guess it was because I was ambitious to install the NVIDIA drivers right after I finished the LFS book, which created some problematic symlinks...

I compiled BLFS from SVN, and it had the correct installation parameters for Mesa, which worked for me perfectly (I was bad and deviated from the package versions a LOT). I am using that now and everything is going buttery-smooth.

The last problem to iron out is that darn NVIDIA driver... When I load X, it is red. Everything is tinted red. I compiled Blender 2.49 (a 3D modelling program) from source and whenever I rotate the default cube around, it flashed red, green, and blue the whole time. I would guess it is a badly configured Xorg config file...

I doubt it, but has anybody seen a similar problem?

I ran the --sanity check on the NVIDIA driver .run package, and it failed at almost every file. I will try deleting the ones that include NVIDIA stuff, maybe that will help...

Thanks for the help!
 
Old 06-23-2010, 01:34 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi again,

I don't have any experience with Nvidia, but have struggled with ATI.....

The way I work is as follows: I first set up X using a working driver (the vesa driver), this to make sure my X setup/config is correct. Once that works (and I have a Xorg.conf I can fall back to) I start installing the ATI stuff.

Not much to go on, but maybe it helps.
 
Old 06-23-2010, 06:48 AM   #7
deepclutch
Member
 
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 707
Blog Entries: 1

Rep: Reputation: 32
May be ,You can Try nouveau (xserver-xorg-video-nouveau) For Nvidia Card First.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] gcc linker error - hidden symbol `stat' in /usr/lib/libc_nonshared.a(stat.oS) chaosless Linux - Software 1 09-17-2009 12:33 PM
Help!!! I cannot install Mesa 3D (openGL) libraries of fedora 10........ RockerAsh Linux - Software 4 04-21-2009 05:49 AM
OpenGL program compile error with gcc 4.1.1 and Mesa 6.5.2 iam_techno Linux - Software 1 01-07-2007 05:25 PM
mesa glut libraries adhara Linux - Software 6 05-08-2004 04:45 AM
Installing Mesa & Mesa-demos... bozotix Linux - Software 2 05-09-2002 12:55 AM


All times are GMT -5. The time now is 01:17 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration