[Mesa-users] Meson build error: bad register name
YuGiOhJCJ
yugiohjcj-mailinglist at laposte.net
Tue Sep 3 12:30:23 UTC 2019
Hello,
I have a 64-bit machine, on a 64-bit operating system, able to run 64-bit and 32-bit programs.
I would like to build on this machine mesa 19.1.4 32-bit.
That was not a problem until mesa 19.0.8 with the autotools build system:
---
set -e
ARCHCFLAGS="-O2 -m32"
NUMJOBS="-j $(grep -c ^processor /proc/cpuinfo)"
NAME="32-mesa"
VERSION="19.0.8"
DIR="mesa-${VERSION}"
DESTDIR="/tmp/${NAME}-${VERSION}"
tar xvf ${DIR}.tar.xz
mkdir -pv ${DIR}/build
cd ${DIR}/build
export PATH="/usr/bin32:${PATH}"
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig"
export CFLAGS="${ARCHCFLAGS}"
export CXXFLAGS="${ARCHCFLAGS}"
export LDFLAGS="${ARCHCFLAGS}"
../configure \
--build=x86_64-pc-linux-gnu \
--host=i686-pc-linux-gnu \
--libdir=/usr/lib \
--prefix=/usr \
--sysconfdir=/etc \
--disable-xvmc \
--enable-autotools \
--enable-dri \
--enable-egl \
--enable-glx \
--enable-gles1 \
--enable-gles2 \
--enable-llvm \
--enable-llvm-shared-libs \
--enable-opengl \
--enable-shared-glapi \
--enable-vdpau \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-dri-drivers=radeon \
--with-gallium-drivers=radeonsi \
--with-platforms=x11,drm
make ${NUMJOBS} V=1
make ${NUMJOBS} install DESTDIR=${DESTDIR}
rm -rfv ${DESTDIR}/etc
rm -rfv ${DESTDIR}/usr/include
rm -rfv ${DESTDIR}/usr/share
cd -
$ tree --charset=ascii /tmp/32-mesa-19.0.8
/tmp/32-mesa-19.0.8
`-- usr
`-- lib
|-- dri
| `-- radeonsi_drv_video.so
|-- libEGL.la
|-- libEGL.so -> libEGL.so.1.0.0
|-- libEGL.so.1 -> libEGL.so.1.0.0
|-- libEGL.so.1.0.0
|-- libgbm.la
|-- libgbm.so -> libgbm.so.1.0.0
|-- libgbm.so.1 -> libgbm.so.1.0.0
|-- libgbm.so.1.0.0
|-- libglapi.la
|-- libglapi.so -> libglapi.so.0.0.0
|-- libglapi.so.0 -> libglapi.so.0.0.0
|-- libglapi.so.0.0.0
|-- libGLESv1_CM.la
|-- libGLESv1_CM.so -> libGLESv1_CM.so.1.1.0
|-- libGLESv1_CM.so.1 -> libGLESv1_CM.so.1.1.0
|-- libGLESv1_CM.so.1.1.0
|-- libGLESv2.la
|-- libGLESv2.so -> libGLESv2.so.2.0.0
|-- libGLESv2.so.2 -> libGLESv2.so.2.0.0
|-- libGLESv2.so.2.0.0
|-- libGL.la
|-- libGL.so -> libGL.so.1.2.0
|-- libGL.so.1 -> libGL.so.1.2.0
|-- libGL.so.1.2.0
|-- pkgconfig
| |-- dri.pc
| |-- egl.pc
| |-- gbm.pc
| |-- glesv1_cm.pc
| |-- glesv2.pc
| `-- gl.pc
|-- vdpau
| |-- libvdpau_radeonsi.so -> libvdpau_radeonsi.so.1.0.0
| |-- libvdpau_radeonsi.so.1 -> libvdpau_radeonsi.so.1.0.0
| |-- libvdpau_radeonsi.so.1.0 -> libvdpau_radeonsi.so.1.0.0
| `-- libvdpau_radeonsi.so.1.0.0
`-- xorg
`-- modules
`-- dri
|-- radeon_dri.so
`-- radeonsi_dri.so
8 directories, 37 files
---
After mesa 19.0.8, it was a problem with the meson build system that is replacing the autotools build system:
---
set -e
ARCHCFLAGS="-O2 -m32"
NUMJOBS="-j $(grep -c ^processor /proc/cpuinfo)"
NAME="32-mesa"
VERSION="19.1.4"
DIR="mesa-${VERSION}"
DESTDIR="/tmp/${NAME}-${VERSION}"
tar xvf ${DIR}.tar.xz
mkdir -pv ${DIR}/build
cd ${DIR}/build
export PATH="/usr/bin32:${PATH}"
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
export PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/local/lib/pkgconfig"
export CFLAGS="${ARCHCFLAGS}"
export CXXFLAGS="${ARCHCFLAGS}"
export LDFLAGS="${ARCHCFLAGS}"
meson setup \
--libdir=/usr/lib \
--prefix=/usr \
--sysconfdir=/etc \
-Dgallium-xvmc=false \
-Degl=true \
-Dgles1=true \
-Dgles2=true \
-Dllvm=true \
-Dshared-llvm=true \
-Dshared-glapi=true \
-Dgallium-vdpau=true \
-Ddri-drivers-path=/usr/lib/xorg/modules/dri \
-Ddri-drivers= \
-Dgallium-drivers=radeonsi \
-Dplatforms=x11,drm \
..
DESTDIR=${DESTDIR} ninja install
rm -rfv ${DESTDIR}/etc
rm -rfv ${DESTDIR}/usr/include
rm -rfv ${DESTDIR}/usr/share
cd -
---
The result is:
---
[...]
Build targets in project: 166
WARNING: Project specifies a minimum meson_version '>= 0.45' but uses features which were added in newer versions:
* 0.46.0: {'Python Module'}
* 0.50.0: {'Python module path method'}
Found ninja-1.9.0 at /usr/bin/ninja
[2/1341] Generating xmlpool_options.h with a custom command.
Warning: language 'ca' not found.
Warning: language 'es' not found.
Warning: language 'de' not found.
Warning: language 'nl' not found.
Warning: language 'sv' not found.
Warning: language 'fr' not found.
[47/1341] Compiling C object 'src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o'.
FAILED: src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o
ccache cc -Isrc/mapi/es1api/ffa5f0c@@GLESv1_CM at sha -Isrc/mapi/es1api -I../src/mapi/es1api -Isrc -I../src -Iinclude -I../include -Isrc/mapi -I../src/mapi -I/usr/include/libdrm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O2 -g -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS '-DPACKAGE_VERSION="19.1.4"' '-DPACKAGE_BUGREPORT="https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa"' -DGLX_USE_TLS -DHAVE_ST_VDPAU -DENABLE_ST_OMX_BELLAGIO=0 -DENABLE_ST_OMX_TIZONIA=0 -DHAVE_X11_PLATFORM -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_DRM -DHAVE_DRM_PLATFORM -DENABLE_SHADER_CACHE -DHAVE___BUILTIN_BSWAP32 -DHAVE___BUILTIN_BSWAP64 -DHAVE___BUILTIN_CLZ -DHAVE___BUILTIN_CLZLL -DHAVE___BUILTIN_CTZ -DHAVE___BUILTIN_EXPECT -DHAVE___BUILTIN_FFS -DHAVE___BUILTIN_FFSLL -DHAVE___BUILTIN_POPCOUNT -DHAVE___BUILTIN_POPCOUNTLL -DHAVE___BUILTIN_UNREACHABLE -DHAVE_FUNC_ATTRIBUTE_CONST -DHAVE_FUNC_ATTRIBUTE_FLATTEN -DHAVE_FUNC_ATTRIBUTE_MALLOC -DHAVE_FUNC_ATTRIBUTE_PURE -DHAVE_FUNC_ATTRIBUTE_UNUSED -DHAVE_FUNC_ATTRIBUTE_WARN_UNUSED_RESULT -DHAVE_FUNC_ATTRIBUTE_WEAK -DHAVE_FUNC_ATTRIBUTE_FORMAT -DHAVE_FUNC_ATTRIBUTE_PACKED -DHAVE_FUNC_ATTRIBUTE_RETURNS_NONNULL -DHAVE_FUNC_ATTRIBUTE_VISIBILITY -DHAVE_FUNC_ATTRIBUTE_ALIAS -DHAVE_FUNC_ATTRIBUTE_NORETURN -D_GNU_SOURCE -DUSE_SSE41 -DUSE_GCC_ATOMIC_BUILTINS -DUSE_X86_64_ASM -DMAJOR_IN_SYSMACROS -DHAVE_XLOCALE_H -DHAVE_SYS_SYSCTL_H -DHAVE_LINUX_FUTEX_H -DHAVE_ENDIAN_H -DHAVE_DLFCN_H -DHAVE_EXECINFO_H -DHAVE_STRTOF -DHAVE_MKOSTEMP -DHAVE_POSIX_MEMALIGN -DHAVE_TIMESPEC_GET -DHAVE_STRTOD_L -DHAVE_DLADDR -DHAVE_DL_ITERATE_PHDR -DHAVE_ZLIB -DHAVE_PTHREAD -DHAVE_PTHREAD_SETAFFINITY -DHAVE_LIBDRM -DHAVE_LLVM=0x0800 '-DMESA_LLVM_VERSION_STRING="8.0.1"' -DHAVE_VALGRIND -DHAVE_DRI3 -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=incompatible-pointer-types -fno-math-errno -fno-trapping-math -Wno-missing-field-initializers -Wno-format-truncation -O2 -m32 -fPIC -pthread -Werror=pointer-arith -Werror=vla -fvisibility=hidden -DMAPI_MODE_BRIDGE '-DMAPI_ABI_HEADER="/tmp/build/32-mesa/mesa-19.1.4/build/src/mapi/es1api/glapi_mapi_tmp.h"' -fno-lto -MD -MQ 'src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o' -MF 'src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o.d' -o 'src/mapi/es1api/ffa5f0c@@GLESv1_CM at sha/.._entry.c.o' -c ../src/mapi/entry.c
{standard input}: Assembler messages:
{standard input}:12: Error: bad register name `%rip)'
{standard input}:13: Error: bad register name `%rax)'
{standard input}:14: Error: bad register name `%r11)'
{standard input}:19: Error: bad register name `%rip)'
{standard input}:20: Error: bad register name `%rax)'
{standard input}:21: Error: bad register name `%r11)'
{standard input}:26: Error: bad register name `%rip)'
{standard input}:27: Error: bad register name `%rax)'
[...]
{standard input}:1020: Error: bad register name `%rip)'
{standard input}:1021: Error: bad register name `%rax)'
{standard input}:1022: Error: bad register name `%r11)'
[49/1341] Generating indirect.h with a meson_exe.py custom command.
ninja: build stopped: subcommand failed.
---
There are a lot of errors: "bad register name".
I guess that the problem is that the build system is using a wrong x86_64-pc-linux-gnu registers instead of i686-pc-linux-gnu registers, or something like that.
But I am not sure how to fix that.
Can you help me please?
Thank you.
Best regards.
More information about the mesa-users
mailing list