Hi (this is my first time posting) I am following the gentoo howto on migrating to the modular X. The new X was installing fine until the package "media-libs/mesa-6.4.2-r2" (this seems to be a dependency for "xorg-x11" so I can't finish building X). I am appending the emerge --info and the build error below. The problem seems to be that it can't find the library -lX11 and/or it doesn't like the library libGL.so.1.2. I have an nvidia GF6600 graphics card and have installed the binary drivers (and perhaps the libraries, though I can't remember), so maybe it is failing because of that. Thanks for your help, --arlo bundsen >>> Emerging (1 of 1) media-libs/mesa-6.4.2-r2 to / >>> checksums files ;-) mesa-6.4.2-r2.ebuild >>> checksums files ;-) files/64bit-fix-indirect-vertex-array.patch >>> checksums files ;-) files/makedepend-location.patch >>> checksums files ;-) files/64bit-fix-have-dix-config.patch >>> checksums files ;-) files/digest-mesa-6.4.2-r2 >>> checksums files ;-) files/6.4-dont-install-gles-headers.patch >>> checksums files ;-) files/change-default-dri-driver-dir.patch >>> checksums files ;-) files/radeon-texture-problem.patch >>> checksums files ;-) files/6.4-multilib-fix.patch >>> checksums files ;-) files/lib/libGLU.la >>> checksums files ;-) files/lib/libGL.la >>> checksums src_uri ;-) MesaLib-6.4.2.tar.bz2 >>> Unpacking source... >>> Unpacking MesaLib-6.4.2.tar.bz2 to /var/tmp/portage/mesa-6.4.2-r2/work * Applying makedepend-location.patch ... [ ok ] * Applying 6.4-dont-install-gles-headers.patch ... [ ok ] * Applying change-default-dri-driver-dir.patch ... [ ok ] * Applying 6.4-multilib-fix.patch ... [ ok ] * Applying 64bit-fix-have-dix-config.patch ... [ ok ] * Applying 64bit-fix-indirect-vertex-array.patch ... [ ok ] * Applying radeon-texture-problem.patch ... [ ok ] * Removing DO_DEBUG defs in dri drivers... * sed for dprintf to __mesa_dprintf... >>> Source unpacked. >>> Compiling source in /var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2 ... (cd configs && rm -f current && ln -s linux-dri-x86 current) make default make[1]: Entering directory `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2' make[2]: Entering directory `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2/src' ....LOTS OF SUCCESSFUL COMPILES.... NOW THE ERRORS Making sources for linux-dri-x86 mkdir ../libMakefile:94: depend: No such file or directory /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/bits/types.h, line 31): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/stdlib.h, line 33): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/sys/types.h, line 147): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/alloca.h, line 25): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/stdio.h, line 34): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/_G_config.h, line 14): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/wchar.h, line 48): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/gconv.h, line 31): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/libio.h, line 53): cannot find include file "stdarg.h" not in ./stdarg.h not in ../../../include/stdarg.h not in ../../../include/GL/internal/stdarg.h not in ../../../src/mesa/main/stdarg.h not in ../../../src/mesa/glapi/stdarg.h not in ../../../src/mesa/drivers/dri/common/stdarg.h not in /usr/include/drm/stdarg.h not in /usr/X11R6/include/stdarg.h not in /usr/include/stdarg.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/string.h, line 33): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading ../../../src/mesa/main/glheader.h, line 72): cannot find include file "float.h" not in ./float.h not in ../../../include/float.h not in ../../../include/GL/internal/float.h not in ../../../src/mesa/main/float.h not in ../../../src/mesa/glapi/float.h not in ../../../src/mesa/drivers/dri/common/float.h not in /usr/include/drm/float.h not in /usr/X11R6/include/float.h not in /usr/include/float.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading ../../../src/mesa/main/glheader.h, line 73): cannot find include file "stdarg.h" not in ./stdarg.h not in ../../../include/stdarg.h not in ../../../include/GL/internal/stdarg.h not in ../../../src/mesa/main/stdarg.h not in ../../../src/mesa/glapi/stdarg.h not in ../../../src/mesa/drivers/dri/common/stdarg.h not in /usr/include/drm/stdarg.h not in /usr/X11R6/include/stdarg.h not in /usr/include/stdarg.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading /usr/X11R6/include/gentoo-multilib/amd64/inttypes.h, line 38): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: ../../../src/mesa/glapi/glapi.c (reading ../../../include/GL/glext.h, line 3044): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: glcontextmodes.c (reading /usr/X11R6/include/X11/Xlib.h, line 75): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: glcontextmodes.c (reading /usr/X11R6/include/X11/Xlibint.h, line 346): cannot find include file "stddef.h" not in ./stddef.h not in ../../../include/stddef.h not in ../../../include/GL/internal/stddef.h not in ../../../src/mesa/main/stddef.h not in ../../../src/mesa/glapi/stddef.h not in ../../../src/mesa/drivers/dri/common/stddef.h not in /usr/include/drm/stddef.h not in /usr/X11R6/include/stddef.h not in /usr/include/stddef.h /usr/bin/makedepend: warning: XF86dri.c (reading /usr/include/drm/drm.h), line 196: # warning "__SIZE_TYPE__ not defined. Assuming sizeof(size_t) == sizeof(unsigned long)!" glxext.c:692: warning: initialization from incompatible pointer type glxext.c:694: warning: initialization from incompatible pointer type glxext.c:699: warning: initialization from incompatible pointer type glxext.c:702: warning: initialization from incompatible pointer type indirect.c: In function `__indirect_glGetPolygonStipple': indirect.c:3684: warning: unused variable `state' XF86dri.c: In function `XF86DRIOpenConnection': XF86dri.c:204: warning: left shift count >= width of type XF86dri.c: In function `XF86DRIGetDeviceInfo': XF86dri.c:566: warning: left shift count >= width of type /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libX11.so when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libX11.a when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libX11.a when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lX11 collect2: ld returned 1 exit status mv: cannot stat `libGL.so.1.2': No such file or directory make[3]: *** [../../../lib/libGL.so] Error 1 make[2]: *** [subdirs] Error 1 make[1]: *** [default] Error 1 make: *** [linux-dri-x86] Error 2 !!! ERROR: media-libs/mesa-6.4.2-r2 failed. Call stack: ebuild.sh, line 1526: Called dyn_compile ebuild.sh, line 923: Called src_compile mesa-6.4.2-r2.ebuild, line 216: Called die !!! Build failed !!! If you need support, post the topmost build error, and the call stack if relevant. *********************** %emerge --info Portage 2.1_pre7 (default-linux/amd64/2005.1, gcc-3.4.6, glibc-2.4-r1, 2.6.15-gentoo-r7 x86_64) ================================================================= System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+ Gentoo Base System version 1.12.0_pre16 dev-lang/python: 2.3.5-r2, 2.4.2-r1 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=k8 -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://cs.ubishops.ca/pub/gentoo http://gentoo.mirrored.ca/ http://distfiles.gentoo.org" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X a52 aac acpi alsa amarok2 amd64 apache2 arts avi berkdb bidi bitmap-fonts bzip2 cdda cdio crypt cups divx dlloader dri dts dvd dvdread eds emboss encode faac faad2 ffmpeg flac foomaticdb fortran freetype gif gnome gnutls gpm gstreamer gtk gtk2 httpd imlib ipv6 jpeg kde live lzw lzw-tiff mad matroska mp3 mpeg mpeg4 ncurses nls nptl nptlonly nvidia ogg oggvorbis opengl pam pdflib perl png python qt quicktime readline sdl spell ssl stream tcpd theora tiff truetype-fonts type1-fonts udev unicode usb userlocales v4l v4l2 vcd vlm vorbis wxGTK wxgtk wxwindows x86 xine xinerama xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux userland_GNU video_cards_nvidia video_cards_nv video_cards_vga video_cards_vesa video_cards_fbdev video_cards_ati video_cards_v4l video_cards_vmware video_cards_glx" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
*** Bug 127572 has been marked as a duplicate of this bug. ***
> objdump -f /usr/lib64/libX11.so.6.2.0 /usr/lib64/libX11.so.6.2.0: file format elf64-x86-64 architecture: i386:x86-64, flags 0x00000150: HAS_SYMS, DYNAMIC, D_PAGED start address 0x000000000001fb60 Note the line that the mesa compile fails on, and specifically "-m32" Is it trying to compile mesa as 32 bit with a 64 bit library?
Hrm.. the line doesn't seem to be above. Here it is: ./src/mesa/drivers/dri/common `pkg-config --cflags libdrm` -I/usr/X11R6/include -Wall -O2 -pipe -fPIC -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 -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='"/usr/lib64/xorg/modules/dri"' -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99 -ffast-math -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 -DHAVE_ALIAS -DDEFAULT_DRIVER_DIR='"/usr/lib64/xorg/modules/dri"' -DXF86VIDMODE -D_REENTRANT -UIN_DRI_DRIVER ../../../src/mesa/x86/glapi_x86.S -o ../../../src/mesa/x86/glapi_x86.o ../../../bin/mklib -o GL -linker 'x86_64-pc-linux-gnu-gcc' \ -major 1 -minor 2 \ -install ../../../lib -lX11 -lXext -lXxf86vm -lm -lpthread -ldl `pkg-config --libs libdrm` -ldrm ../../../src/mesa/glapi/glapi.o ../../../src/mesa/glapi/glthread.o ../../../src/mesa/main/dispatch.o 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/x86/glapi_x86.o mklib: Making Linux shared library: libGL.so.1.2 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libX11.so when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../libX11.a when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libX11.so when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libX11.a when searching for -lX11 /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.6/../../../../x86_64-pc-linux-gnu/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 `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2/src/glx/x11' make[2]: *** [subdirs] Error 1 make[2]: Leaving directory `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2/src' make[1]: *** [default] Error 1 make[1]: Leaving directory `/var/tmp/portage/mesa-6.4.2-r2/work/Mesa-6.4.2' make: *** [linux-dri-x86] Error 2
After looking through the ebuild I saw that it uses -m32 if you have the x86 USE flag, m64 if you have amd64 USE flag, etc.. I had both. I removed x86 from my USE flags and it now compiles successfully. I see the original poster also has x86 in their USE flags so removing it will probably fix theirs as well. Resolved?
Thanks! I removed the "x86" USE flag and mesa compiled cleanly. What a great service.
Since this bug happened from setting your USE flags to an invalid setting (adding a different architecture), I'm marking it invalid.
*** Bug 131892 has been marked as a duplicate of this bug. ***
*** Bug 139291 has been marked as a duplicate of this bug. ***
*** Bug 144567 has been marked as a duplicate of this bug. ***
*** Bug 143166 has been marked as a duplicate of this bug. ***
*** Bug 141202 has been marked as a duplicate of this bug. ***
*** Bug 145485 has been marked as a duplicate of this bug. ***
*** Bug 187097 has been marked as a duplicate of this bug. ***