Bug 65310

Summary: [regression] failure in building nvc0_vbo.lo: /tmp/cclDjdRp.s:1270: Error: missing or invalid displacement expression `-8589934576
Product: Mesa Reporter: David Ronis <David.Ronis>
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED INVALID QA Contact:
Severity: critical    
Priority: medium    
Version: git   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description David Ronis 2013-06-03 18:12:21 UTC
I'm trying to build today's git/master on a slackware box.   i get the following:

/bin/sh ../../../../libtool  --tag=CC   --mode=compile /usr/bin/gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.2.0\" -DPACKAGE_STRING=\"Mesa\ 9.2.0\" -DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.0\" -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_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I.  -I../../../../src/gallium/drivers -I../../../../include -I../../../../include -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -I/usr/include/libdrm     -march=native -msse2 -mfpmath=sse -O3 -ffast-math -funroll-loops -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp  -MT nvc0_vbo.lo -MD -MP -MF .deps/nvc0_vbo.Tpo -c -o nvc0_vbo.lo nvc0_vbo.c
libtool: compile:  /usr/bin/gcc -DPACKAGE_NAME=\"Mesa\" -DPACKAGE_TARNAME=\"mesa\" -DPACKAGE_VERSION=\"9.2.0\" "-DPACKAGE_STRING=\"Mesa 9.2.0\"" "-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\"" -DPACKAGE_URL=\"\" -DPACKAGE=\"mesa\" -DVERSION=\"9.2.0\" -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_PTHREAD=1 -DHAVE_LIBEXPAT=1 -I. -I../../../../src/gallium/drivers -I../../../../include -I../../../../include -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -D_GNU_SOURCE -DHAVE_PTHREAD -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS -I/usr/include/libdrm -march=native -msse2 -mfpmath=sse -O3 -ffast-math -funroll-loops -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -MT nvc0_vbo.lo -MD -MP -MF .deps/nvc0_vbo.Tpo -c nvc0_vbo.c  -fPIC -DPIC -o .libs/nvc0_vbo.o
/tmp/cc6sw2Xe.s: Assembler messages:
/tmp/cc6sw2Xe.s:1270: Error: missing or invalid displacement expression `-8589934576'
/tmp/cc6sw2Xe.s:1277: Error: missing or invalid displacement expression `-8589934560'
/tmp/cc6sw2Xe.s:1284: Error: missing or invalid displacement expression `-8589934544'
/tmp/cc6sw2Xe.s:2073: Error: missing or invalid displacement expression `-8589934576'
/tmp/cc6sw2Xe.s:2079: Error: missing or invalid displacement expression `-8589934560'
/tmp/cc6sw2Xe.s:2085: Error: missing or invalid displacement expression `-8589934544'
/tmp/cc6sw2Xe.s:2091: Error: missing or invalid displacement expression `-8589934528'
/tmp/cc6sw2Xe.s:2097: Error: missing or invalid displacement expression `-8589934512'
/tmp/cc6sw2Xe.s:2103: Error: missing or invalid displacement expression `-8589934496'
/tmp/cc6sw2Xe.s:2109: Error: missing or invalid displacement expression `-8589934480'
make: *** [nvc0_vbo.lo] Error 1

I've configured with:

  $ ./configure --prefix=/usr --with-state-trackers=dri --disable-egl --with-gallium-drivers=nouveau --disable-gallium-llvm

Finally, I just upgraded gcc to 4.8.1 (from 4.7.2), so this could be a compiler regression.
Comment 1 David Ronis 2013-06-03 18:20:42 UTC
I just rebuilt with less aggressive optimization flags.   

Instead of -march=native -msse2 -mfpmath=sse -O3 -ffast-math -funroll-loops -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block

I tried -O2 -fomit-frame-pointer

It now compiles, so I guess that this is a compiler regression.
Comment 2 David Ronis 2013-07-01 01:01:09 UTC
This problem is still here.
Comment 3 Emil Velikov 2013-07-01 18:03:12 UTC
Correcting component - nouveau (nvc0) related
Comment 4 Emil Velikov 2013-07-01 18:10:03 UTC
Cannot seem to reproduce

$ export CFLAGS="-march=native -msse2 -mfpmath=sse -O3 -ffast-math -funroll-loops -fomit-frame-pointer -floop-interchange -floop-strip-mine -floop-block"
export CXXFLAGS="$CFLAGS"

# Build mesa with Gallium3D hardware drivers
$ ./autogen.sh --prefix=/usr --with-dri-drivers= --with-state-trackers=dri --disable-egl --with-gallium-drivers=nouveau --disable-gallium-llvm

Note added "--with-dri-drivers=" to prevent compilation of intel dri module

Can you ensure
* you are using ./autogen.sh ... rather than ./configure
* the source folder is clean - git clean -fxd
Comment 5 Emil Velikov 2013-07-01 18:13:03 UTC
Using gcc 4.8.1

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-4.8.1/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-gnu-unique-object --enable-linker-build-id --enable-cloog-backend=isl --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-install-libiberty --enable-multilib --disable-libssp --disable-werror --enable-checking=release
Thread model: posix
gcc version 4.8.1 (GCC) 

Are you using ccache or distcc ?
Ideally attach/link your SlackBuild
Comment 6 Ilia Mirkin 2013-08-25 17:46:22 UTC
Please provide repro steps. I'm inclined to believe this is a problem in the environment, and not a core gcc bug. But those are some trippy optimization flags, so who knows. Be sure to specify the platform you're building for (given the sse2 flag, x86 or x86_64... but which one... I guess x86 since x86_64 implies sse2).

If you can reproduce this by just running a single gcc command (like the one you pasted, but figure out the actual gcc invocation), you should file a gcc bug too.
Comment 7 Ilia Mirkin 2013-09-26 23:44:13 UTC
No response to information request in over a month. Closing as invalid.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.