Announcement

Collapse
No announcement yet.

Compile problems for 32bit mesa on 64bit system

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Compile problems for 32bit mesa on 64bit system

    Hi!

    I'm trying to get Wine to run with self-compiled 32bit mesa because the one provided by Debian testing has still way too many glitches.

    After several tries I use the approach to separate the installation tree completely from the 64bit one, meaning /usr/local/xorg32 instead of /usr/local/xorg.
    But it still not compiling.
    these are my commands:
    Code:
    cd drm/
    ./autogen.sh --prefix=/usr/local/xorg32 --disable-intel
    make -j 3 && make install
    cd ..
    
    export PKG_CONFIG_PATH="/usr/local/xorg32/lib/pkgconfig"
    cd xf86-video-ati/
    ./autogen.sh --prefix=/usr/local/xorg32
    make -j 3 && make install
    cd ..
    
    ldconfig
    
    cd mesa/
    ./autogen.sh --prefix=/usr/local/xorg32 --with-gallium-drivers=r600,swrast --with-dri-driverdir=/usr/local/xorg32/lib/dri/ --enable-32-bit --disable-64-bit 
    make -j 3 && make install
    My commands for 64 look pretty much the same, with obvious differences.
    But the mesa still doesn't compile:
    Code:
    /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
    /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
    Can you tell me what I am missing?

    BTW, this happens while it tries to make i915_dri.so.tmp.
    Shouldn't it skip the intel drivers with the commands I used?

  • #2
    i do it this way in my ubuntu

    export CFLAGS="-pipe -m32"
    export CXXFLAGS="-pipe -m32"
    ./configure --prefix=/usr --enable-shared-dricore --enable-gles1 --enable-gles2 --enable-xcb --enable-glx --enable-gallium-egl --enable-osmesa --enable-gallium-llvm=no --enable-shared-glapi --enable-xorg --enable-xa --enable-texture-float --with-gallium-drivers="nouveau,r600,swrast" --build=i686-pc-linux-gnu --libdir=/usr/lib32

    remember to do the same for your drm git

    Comment


    • #3
      MESA_VERSION=7.11-rc4
      [used for MesaLib-7.11-rc4]

      CC="gcc -m32" \
      PKG_CONFIG_PATH=/usr/lib/32/pkgconfig \
      CXX="g++ -m32" CXXFLAGS="-m32" \
      ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man --localstatedir=/var --libdir=/usr/lib/32 --enable-xcb --enable-glx-tls --enable-32-bit &&
      make &&
      make install


      the libdrm message above, makes me think it compiled mesa using the 64bit compiler (or possibly those two libraries are 32bit).

      It wouldn't hurt to get more of the output as well... those are just warnings, and not the reason for the failure (and I can't see what command the computer was trying to run, to link everything together). Specifically if it used -m32 to compile your object files.

      Comment


      • #4
        Ah, sorry, here is the rest of the output:
        Code:
        gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../include -I../../../../../src/mapi -I../../../../../src/mesa -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri -I/usr/local/xorg32/include -I/usr/local/xorg32/include/libdrm    -DFEATURE_GL=1 -I/usr/local/xorg32/include -I/usr/local/xorg32/include/libdrm -I/usr/include/libdrm   -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -m32  -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_LIBUDEV -fvisibility=hidden -I../intel -DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP intel_fbo.c -o intel_fbo.o
        /bin/bash ../../../../../bin/mklib -o i915_dri.so.tmp -noprefix -linker 'g++' -ldflags '' \
        		../common/utils.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../../common/driverfuncs.o ../common/texmem.o ../common/drirenderbuffer.o i830_context.o i830_state.o i830_texblend.o i830_texstate.o i830_vtbl.o intel_render.o intel_regions.o intel_buffer_objects.o intel_batchbuffer.o intel_clear.o intel_extensions.o intel_extensions_es2.o intel_mipmap_tree.o intel_tex_layout.o intel_tex_image.o intel_tex_subimage.o intel_tex_copy.o intel_tex_validate.o intel_tex_format.o intel_tex.o intel_pixel.o intel_pixel_bitmap.o intel_pixel_copy.o intel_pixel_draw.o intel_pixel_read.o intel_buffers.o intel_blit.o i915_tex_layout.o i915_texstate.o i915_context.o i915_debug.o i915_debug_fp.o i915_fragprog.o i915_program.o i915_state.o i915_vtbl.o intel_context.o intel_decode.o intel_screen.o intel_span.o intel_state.o intel_syncobj.o intel_tris.o intel_fbo.o      ../../../../../src/mesa/libmesa.a  -L/usr/local/xorg32/lib -ldrm   -lexpat -lm -lpthread -ldl -L/usr/local/xorg32/lib -ldrm_intel -ldrm  
        mklib: Making Linux shared library:  i915_dri.so.tmp
        /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
        /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libdrm_intel.so when searching for -ldrm_intel
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libdrm_intel.a when searching for -ldrm_intel
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libdrm_intel.so when searching for -ldrm_intel
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libdrm_intel.a when searching for -ldrm_intel
        /usr/bin/ld: cannot find -ldrm_intel
        /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
        /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
        collect2: ld returned 1 exit status
        g++ -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -m32  -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_LIBUDEV -fvisibility=hidden -o i915_dri.so.test ../../../../../src/mesa/drivers/dri/common/dri_test.o i915_dri.so.tmp  ../../../../../src/mesa/libmesa.a  -L/usr/local/xorg32/lib -ldrm   -lexpat -lm -lpthread -ldl -L/usr/local/xorg32/lib -ldrm_intel -ldrm  
        g++: error: i915_dri.so.tmp: No such file or directory
        @jrch2k8
        I tried it your way (I think):
        I used both export lines and added the options "--build=i686-pc-linux-gnu --libdir=/usr/lib32" to the drm autogen.sh.
        When I do this, the compile of xf86-video-ati fails (both with and without those options):
        Code:
          CC     theatre_module.lo
          CCLD   ati_drv.la
          CCLD   radeon_drv.la
        /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.so when searching for -lpciaccess
        /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.a when searching for -lpciaccess
        /usr/bin/ld: cannot find -lpciaccess
        collect2: ld returned 1 exit status
        make[2]: *** [ati_drv.la] Error 1
        make[2]: *** Waiting for unfinished jobs....
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libpixman-1.so when searching for -lpixman-1
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libpixman-1.a when searching for -lpixman-1
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpixman-1.so when searching for -lpixman-1
        /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpixman-1.a when searching for -lpixman-1
        /usr/bin/ld: cannot find -lpixman-1
        /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.so when searching for -lpciaccess
        /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.a when searching for -lpciaccess
        /usr/bin/ld: cannot find -lpciaccess
        /usr/bin/ld: skipping incompatible /usr/lib/libudev.so when searching for -ludev
        /usr/bin/ld: skipping incompatible /usr/lib/libudev.a when searching for -ludev
        /usr/bin/ld: cannot find -ludev
        I don't have the time right now to investigate this further. I will be back on my PC on wednesday.

        Comment


        • #5
          schroot...

          Comment


          • #6
            why in the hell are you compiling the ddx (xf86-ati) for? you don't need it for run 32bit wine games or anything else, since your xorg is 64bit and the 64 ddx is loaded when you desktop runs wich make impossible to run the 32bit ddx at the same time.

            you only need to compile libdrm and mesa not the ddx

            and remember to make a "make distclean" before run configure to avoid get 64bit temps or objects (.o files) screwing your 32 bit compilation (make clean is not good enough)

            Comment


            • #7
              Originally posted by Dard View Post
              Ah, sorry, here is the rest of the output:
              Code:
              gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../include -I../../../../../src/mapi -I../../../../../src/mesa -I../../../../../src/egl/main -I../../../../../src/egl/drivers/dri -I/usr/local/xorg32/include -I/usr/local/xorg32/include/libdrm    -DFEATURE_GL=1 -I/usr/local/xorg32/include -I/usr/local/xorg32/include/libdrm -I/usr/include/libdrm   -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -m32  -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_LIBUDEV -fvisibility=hidden -I../intel -DI915 -DDRM_VBLANK_FLIP=DRM_VBLANK_FLIP intel_fbo.c -o intel_fbo.o
              /bin/bash ../../../../../bin/mklib -o i915_dri.so.tmp -noprefix -linker 'g++' -ldflags '' \
              		../common/utils.o ../common/vblank.o ../common/dri_util.o ../common/xmlconfig.o ../../common/driverfuncs.o ../common/texmem.o ../common/drirenderbuffer.o i830_context.o i830_state.o i830_texblend.o i830_texstate.o i830_vtbl.o intel_render.o intel_regions.o intel_buffer_objects.o intel_batchbuffer.o intel_clear.o intel_extensions.o intel_extensions_es2.o intel_mipmap_tree.o intel_tex_layout.o intel_tex_image.o intel_tex_subimage.o intel_tex_copy.o intel_tex_validate.o intel_tex_format.o intel_tex.o intel_pixel.o intel_pixel_bitmap.o intel_pixel_copy.o intel_pixel_draw.o intel_pixel_read.o intel_buffers.o intel_blit.o i915_tex_layout.o i915_texstate.o i915_context.o i915_debug.o i915_debug_fp.o i915_fragprog.o i915_program.o i915_state.o i915_vtbl.o intel_context.o intel_decode.o intel_screen.o intel_span.o intel_state.o intel_syncobj.o intel_tris.o intel_fbo.o      ../../../../../src/mesa/libmesa.a  -L/usr/local/xorg32/lib -ldrm   -lexpat -lm -lpthread -ldl -L/usr/local/xorg32/lib -ldrm_intel -ldrm  
              mklib: Making Linux shared library:  i915_dri.so.tmp
              /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
              /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libdrm_intel.so when searching for -ldrm_intel
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libdrm_intel.a when searching for -ldrm_intel
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libdrm_intel.so when searching for -ldrm_intel
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libdrm_intel.a when searching for -ldrm_intel
              /usr/bin/ld: cannot find -ldrm_intel
              /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
              /usr/bin/ld: skipping incompatible /usr/local/xorg32/lib/libdrm.so when searching for -ldrm
              collect2: ld returned 1 exit status
              g++ -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -m32  -fPIC -m32 -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_LIBUDEV -fvisibility=hidden -o i915_dri.so.test ../../../../../src/mesa/drivers/dri/common/dri_test.o i915_dri.so.tmp  ../../../../../src/mesa/libmesa.a  -L/usr/local/xorg32/lib -ldrm   -lexpat -lm -lpthread -ldl -L/usr/local/xorg32/lib -ldrm_intel -ldrm  
              g++: error: i915_dri.so.tmp: No such file or directory
              @jrch2k8
              I tried it your way (I think):
              I used both export lines and added the options "--build=i686-pc-linux-gnu --libdir=/usr/lib32" to the drm autogen.sh.
              When I do this, the compile of xf86-video-ati fails (both with and without those options):
              Code:
                CC     theatre_module.lo
                CCLD   ati_drv.la
                CCLD   radeon_drv.la
              /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.so when searching for -lpciaccess
              /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.a when searching for -lpciaccess
              /usr/bin/ld: cannot find -lpciaccess
              collect2: ld returned 1 exit status
              make[2]: *** [ati_drv.la] Error 1
              make[2]: *** Waiting for unfinished jobs....
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libpixman-1.so when searching for -lpixman-1
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../libpixman-1.a when searching for -lpixman-1
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpixman-1.so when searching for -lpixman-1
              /usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpixman-1.a when searching for -lpixman-1
              /usr/bin/ld: cannot find -lpixman-1
              /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.so when searching for -lpciaccess
              /usr/bin/ld: skipping incompatible /usr/lib/libpciaccess.a when searching for -lpciaccess
              /usr/bin/ld: cannot find -lpciaccess
              /usr/bin/ld: skipping incompatible /usr/lib/libudev.so when searching for -ludev
              /usr/bin/ld: skipping incompatible /usr/lib/libudev.a when searching for -ludev
              /usr/bin/ld: cannot find -ludev
              I don't have the time right now to investigate this further. I will be back on my PC on wednesday.
              Basically, it is looking for a 32bit version of libpciaccess, libpixman, and libudev.


              I use a 32bit mesa with wine myself, and it only needs a 32bit mesa, it does not need a 32bit ati xorg display driver.

              Comment


              • #8
                I tried to build xf86-video-ati because the 64bit Mesa needed it but I had no idea why it needed it. So I just assumed that 32bit Mesa used it too.

                Anyway, leaving it away doesn't help me to compile it.
                make distclean doesn't help.

                As for 32bit libpciaccess, well, Debian doesn't provide them.
                Does that mean I have to build all of them, too?
                If yes, then I am close to giving up here since I fear that building further 32bit libs will only result in more dependencies.
                Tomorrow I will try it anyway.

                Comment


                • #9
                  At least try a schroot before giving up. It's not that hard and you don't need to install a complete 32-bit system. I built wine in my 32-bit schroot.

                  Comment


                  • #10
                    Originally posted by Dard View Post
                    I tried to build xf86-video-ati because the 64bit Mesa needed it but I had no idea why it needed it. So I just assumed that 32bit Mesa used it too.

                    Anyway, leaving it away doesn't help me to compile it.
                    make distclean doesn't help.

                    As for 32bit libpciaccess, well, Debian doesn't provide them.
                    Does that mean I have to build all of them, too?
                    If yes, then I am close to giving up here since I fear that building further 32bit libs will only result in more dependencies.
                    Tomorrow I will try it anyway.
                    don't give up, once you fix some issues here and there the next time will be swift. check this out

                    1. the package ia32-libs sometimes have all you need to compile mesa but some symlinks are wrong for example you have /usr/lib/libdrm.so.1.2 but it doesn't have the libdrm.so symlink for example, so first check out the libraries exist in /usr/lib32 and try fix the symlinks for example sudo ln -s /usr/lib32/libdrm.so.1.2 /usr/lib32/libdrm.so



                    2. in case debian forcedly removed those 32 bit dependencies mostly all the dependencies are there already, so is safe to compile libpciaccess

                    remember to use these flags or you compilation will fail horribly
                    export CFLAGS="-pipe -m32"
                    export CXXFLAGS="-pipe -m32"

                    and add at the end of your configure --prefix=/usr --build=i686-pc-linux-gnu --libdir=/usr/lib32

                    Comment

                    Working...
                    X