[Mesa-users] Meson build error: bad register name

Pekka Paalanen ppaalanen at gmail.com
Wed Sep 4 07:04:17 UTC 2019


On Wed, 4 Sep 2019 08:49:22 +0200
YuGiOhJCJ <yugiohjcj-mailinglist at laposte.net> wrote:

> On 03/09/2019 15:57, Pekka Paalanen wrote:
> > On Tue, 3 Sep 2019 14:30:23 +0200
> > YuGiOhJCJ <yugiohjcj-mailinglist at laposte.net> wrote:
> > 
> >> 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.
> > 
> > Hi,
> > 
> > have you tried the instructions from https://www.mesa3d.org/meson.html
> > instead, particularly "Cross-compilation and 32-bit builds"?
> > 
> > 
> > Thanks,
> > pq
> > 
> 
> Indeed, following these instructions has solved my problem.
> The trick is to use a file and the --cross-file meson parameter:
> ---
> 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}"

Hi,

I assume you should not be setting any *FLAGS environment variables
either. PATH and LD_LIBRARY_PATH may be necessary, but PKG_CONFIG_PATH
has a better replacement in Meson's recent versions IIRC as an explicit
configuration option.

I wonder if your pkg-config paths are even correct, how do you ensure
you find the 32-bit instead of 64-bit devel packages? Well, if that
went actually wrong, it should be an obvious failure.

The problem with environment variables is that people never agree which
ones or when should be recorded by the build system so they do not need
to be set again, and which ones need to be always manually set when
doing anything. This leads to a situation where one is never sure what
happens or things revert unexpectedly.

You don't seem to be using NUMJOBS, ninja by default occupies
all cores if possible.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-users/attachments/20190904/75bf30c0/attachment-0001.sig>


More information about the mesa-users mailing list