[Mesa-dev] [Bug 73999] New: mesa 32bit build fails with llvm enabled (cross compilation)

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Jan 23 15:09:05 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=73999

          Priority: medium
            Bug ID: 73999
          Assignee: mesa-dev at lists.freedesktop.org
           Summary: mesa 32bit build fails with llvm enabled (cross
                    compilation)
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: luziphermcleod at yahoo.ie
          Hardware: Other
            Status: NEW
           Version: git
         Component: Mesa core
           Product: Mesa

Created attachment 92693
  --> https://bugs.freedesktop.org/attachment.cgi?id=92693&action=edit
build.log of the 32bit build

Problem
================
When cross-compiling mesa, the 32bit build of mesa fails for me if I enable
LLVM, while 64bit works. Without LLVM both build passes work.

I'm not entirely sure that it is a Mesa problem (though I think it is), but I'd
be happy for any pointers how to fix this issue since I don't have any idea
where to start. I need to enable LLVM as my new r9 290x need the radeonsi
driver, which in turn needs LLVM.


System Specs
================
OS: Gentoo (multilib-portage)
LLVM from git (x86 and x64 builds)
Kernel: 3.13-rc7
GCC: 4.8.2
Mesa driver: radeonsi
ebuild: media-libs/mesa-9999 from x11 overlay


Configure Line
================
./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share
--sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib32
--disable-silent-rules --disable-dependency-tracking --enable-dri --enable-glx
--enable-shared-glapi --enable-texture-float --disable-debug --enable-egl
--enable-gbm --enable-gles1 --enable-gles2 --enable-glx-tls --disable-osmesa
--enable-asm --without-llvm-shared-libs --with-dri-drivers=
--with-gallium-drivers=,swrast,r600,radeonsi PYTHON2=/usr/bin/python2.7
--with-egl-platforms=x11,drm --enable-gallium-llvm --disable-openvg
--disable-gallium-egl --enable-r600-llvm-compiler --enable-vdpau --disable-xa
--disable-xvmc LLVM_CONFIG=/usr/bin/llvm-config.x86


Tail of build.log (for details see attachements)
================
libtool: compile:  x86_64-pc-linux-gnu-gcc -m32 -DPACKAGE_NAME=\"Mesa\"
-DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.1.0-devel\"
"-DPACKAGE_STRING=\"Mesa 10.1.0-devel\""
"-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\""
-DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.1.0-devel\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DYYTEXT_POINTER=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I.
-I../../../src/gallium/auxiliary/util -I../../../include
-I../../../src/gallium/include -I../../../src/gallium/auxiliary -D_GNU_SOURCE
-DHAVE_PTHREAD -DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM
-DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD
-DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_DRI3 -DHAVE_MINCORE
-DHAVE_LIBUDEV -DHAVE_LLVM=0x0 -fvisibility=hidden -march=native -O2 -pipe -m32
-Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes
-fno-strict-aliasing -fno-builtin-memcmp -c
draw/draw_pt_fetch_shade_pipeline_llvm.c  -fPIC -DPIC -o
draw/.libs/draw_pt_fetch_shade_pipeline_llvm.o
In file included from /usr/include/llvm-c/Core.h:18:0,
                 from ./gallivm/lp_bld.h:49,
                 from ./gallivm/lp_bld_sample.h:41,
                 from draw/draw_llvm.h:36,
                 from draw/draw_llvm.c:28:
/usr/include/llvm/Support/DataTypes.h:52:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
 # error "Must #define __STDC_CONSTANT_MACROS before " \
   ^
In file included from /usr/include/llvm-c/Core.h:18:0,
                 from ./gallivm/lp_bld.h:49,
                 from ./gallivm/lp_bld_sample.h:41,
                 from ./draw/draw_llvm.h:36,
                 from draw/draw_pt_fetch_shade_pipeline_llvm.c:38:
/usr/include/llvm/Support/DataTypes.h:52:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
 # error "Must #define __STDC_CONSTANT_MACROS before " \
   ^
In file included from /usr/include/llvm-c/Core.h:18:0,
                 from ./gallivm/lp_bld.h:49,
                 from ./gallivm/lp_bld_const.h:41,
                 from draw/draw_llvm_sample.c:35:
/usr/include/llvm/Support/DataTypes.h:52:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
 # error "Must #define __STDC_CONSTANT_MACROS before " \
   ^
libtool: compile:  x86_64-pc-linux-gnu-g++ -m32 -DPACKAGE_NAME=\"Mesa\"
-DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.1.0-devel\"
"-DPACKAGE_STRING=\"Mesa 10.1.0-devel\""
"-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\""
-DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.1.0-devel\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DYYTEXT_POINTER=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I.
-fvisibility=hidden -I../../../include -I../../../src/gallium/include
-I../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD
-DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM
-DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD
-DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_DRI3 -DHAVE_MINCORE
-DHAVE_LIBUDEV -DHAVE_LLVM=0x0 -march=native -O2 -pipe -m32 -Wall
-fno-strict-aliasing -fno-builtin-memcmp -c gallivm/lp_bld_misc.cpp  -fPIC
-DPIC -o gallivm/.libs/lp_bld_misc.o
draw/draw_llvm.c: In function 'create_jit_dvbuffer_type':
draw/draw_llvm.c:101:4: error: implicit declaration of function
'LLVMAddTypeName' [-Werror=implicit-function-declaration]
    LLVMAddTypeName(gallivm->module, struct_name, dvbuffer_type);
    ^
draw/draw_llvm.c:106:4: error: implicit declaration of function
'LLVMInvalidateStructLayout' [-Werror=implicit-function-declaration]
    LLVMInvalidateStructLayout(gallivm->target, dvbuffer_type);
    ^
Makefile:1707: recipe for target 'draw/draw_pt_fetch_shade_pipeline_llvm.lo'
failed
gmake[3]: *** [draw/draw_pt_fetch_shade_pipeline_llvm.lo] Error 1
gmake[3]: *** Waiting for unfinished jobs....
libtool: compile:  x86_64-pc-linux-gnu-g++ -m32 -DPACKAGE_NAME=\"Mesa\"
-DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"10.1.0-devel\"
"-DPACKAGE_STRING=\"Mesa 10.1.0-devel\""
"-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\""
-DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"10.1.0-devel\"
-DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
-DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\"
-DYYTEXT_POINTER=1 -DHAVE_CLOCK_GETTIME=1 -DHAVE_PTHREAD=1 -I.
-fvisibility=hidden -I../../../include -I../../../src/gallium/include
-I../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD
-DTEXTURE_FLOAT_ENABLED -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM
-DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DHAVE_LIBDRM
-DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DHAVE_PTHREAD
-DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -DHAVE_DRI3 -DHAVE_MINCORE
-DHAVE_LIBUDEV -DHAVE_LLVM=0x0 -march=native -O2 -pipe -m32 -Wall
-fno-strict-aliasing -fno-builtin-memcmp -c gallivm/lp_bld_debug.cpp  -fPIC
-DPIC -o gallivm/.libs/lp_bld_debug.o
In file included from /usr/include/llvm-c/Core.h:18:0,
                 from ./gallivm/lp_bld.h:49,
                 from ./gallivm/lp_bld_sample.h:41,
                 from draw/draw_llvm.h:36,
                 from draw/draw_vs_llvm.c:36:
/usr/include/llvm/Support/DataTypes.h:52:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
 # error "Must #define __STDC_CONSTANT_MACROS before " \
   ^
cc1: some warnings being treated as errors
Makefile:1707: recipe for target 'draw/draw_llvm.lo' failed
gmake[3]: *** [draw/draw_llvm.lo] Error 1
draw/draw_vs_llvm.c:84:1: error: no previous prototype for
'draw_create_vs_llvm' [-Werror=missing-prototypes]
 draw_create_vs_llvm(struct draw_context *draw,
 ^
cc1: some warnings being treated as errors
In file included from /usr/include/llvm-c/Core.h:18:0,
                 from gallivm/lp_bld_debug.cpp:30:
/usr/include/llvm/Support/DataTypes.h:48:3: error: #error "Must #define
__STDC_LIMIT_MACROS before #including Support/DataTypes.h"
 # error "Must #define __STDC_LIMIT_MACROS before #including
Support/DataTypes.h"
   ^
Makefile:1707: recipe for target 'draw/draw_vs_llvm.lo' failed
gmake[3]: *** [draw/draw_vs_llvm.lo] Error 1
/usr/include/llvm/Support/DataTypes.h:52:3: error: #error "Must #define
__STDC_CONSTANT_MACROS before " "#including Support/DataTypes.h"
 # error "Must #define __STDC_CONSTANT_MACROS before " \
   ^
Makefile:1707: recipe for target 'draw/draw_llvm_sample.lo' failed
gmake[3]: *** [draw/draw_llvm_sample.lo] Error 1
gallivm/lp_bld_misc.cpp:67:38: fatal error: llvm/Target/TargetSelect.h: No such
file or directory
 #include <llvm/Target/TargetSelect.h>
                                      ^
compilation terminated.
gallivm/lp_bld_debug.cpp:40:40: fatal error: llvm/Target/TargetRegistry.h: No
such file or directory
 #include <llvm/Target/TargetRegistry.h>
                                        ^
compilation terminated.
Makefile:1731: recipe for target 'gallivm/lp_bld_misc.lo' failed
gmake[3]: *** [gallivm/lp_bld_misc.lo] Error 1
Makefile:1731: recipe for target 'gallivm/lp_bld_debug.lo' failed
gmake[3]: *** [gallivm/lp_bld_debug.lo] Error 1
gmake[3]: Leaving directory
'/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src/gallium/auxiliary'
Makefile:1760: recipe for target 'all-recursive' failed
gmake[2]: *** [all-recursive] Error 1
gmake[2]: Leaving directory
'/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src/gallium/auxiliary'
Makefile:533: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
'/var/tmp/portage/media-libs/mesa-9999/work/Mesa-9999-x86/src'
Makefile:584: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140123/554c226b/attachment-0001.html>


More information about the mesa-dev mailing list