Bug 23291 - nv50_program.c: In function ‘ctor_immd’, ‘r’ undeclared (first use in this function) [PATCH]
Summary: nv50_program.c: In function ‘ctor_immd’, ‘r’ undeclared (first use in this fu...
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/nouveau (show other bugs)
Version: unspecified
Hardware: Other All
: medium blocker
Assignee: Nouveau Project
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 13:12 UTC by Steven Ward
Modified: 2009-08-14 14:16 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch that fixes nv50_program.c compilation (514 bytes, patch)
2009-08-14 07:26 UTC, Renato Caldas
Details | Splinter Review

Description Steven Ward 2009-08-13 13:12:32 UTC
Hi all,
      I've been compiling Mesa for some time now from git.
I don't know if anyone is aware of this build error,but after todays commits to the git repository,I come up with build error when I run make:

gcc -c -I. -I../../../../src/gallium/include -I../../../../src/gallium/auxiliary -I../../../../src/gallium/drivers -I/src/gallium/include -I/src/gallium/auxiliary -I/src/gallium/drivers  -g -O2 -Wall -Wmissing-prototypes -std=c99 -ffast-math -fno-strict-aliasing -m32  -fPIC  -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -D_GNU_SOURCE -DPTHREADS -DHAVE_POSIX_MEMALIGN -DUSE_XCB -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DGLX_DIRECT_RENDERING -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS  nv50_program.c -o nv50_program.o
nv50_program.c: In function ‘ctor_immd’:
nv50_program.c:299: error: ‘r’ undeclared (first use in this function)
nv50_program.c:299: error: (Each undeclared identifier is reported only once
nv50_program.c:299: error: for each function it appears in.)
gmake[4]: *** [nv50_program.o] Error 1
gmake[4]: Leaving directory `/opt/mesa/src/gallium/drivers/nv50'
gmake[3]: *** [default] Error 1
gmake[3]: Leaving directory `/opt/mesa/src/gallium/drivers'
gmake[2]: *** [default] Error 1
gmake[2]: Leaving directory `/opt/mesa/src/gallium'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/opt/mesa/src'
make: *** [default] Error 1

Regards,
       STEVE555
Comment 1 Renato Caldas 2009-08-14 05:31:28 UTC
Please, use descriptive summaries for bug reports.
Comment 2 Steven Ward 2009-08-14 06:11:13 UTC
Hi there,
        I'm sorry about that,here is some more detail.I'm currently using Fedora 12 Rawhide Alpha.My Graphics Card is a Nividia Geforce 6,800 G.T,my Monitor is a A.D.I Microscan G1,000.I compile D.R.M,The Nouveau Kernel Modules from the nouveaulinux-2.6 repository,Mesa and the Nouveau Driver.All from their respective git repositories.

The one I'm having trouble with(hence the error report for it),is from the Mesa code.
The ./configure options are:
./configure --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --datadir=/usr/share --sysconfdir=/etc --includedir=/usr/include --libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var --mandir=/usr/share/man --docdir=/usr/share/doc --x-libraries=/usr/lib --enable-32-bit --enable-xcb --enable-gallium-nouveau --with-x --with-dri-driverdir=/usr/lib/dri --with-xorg-driver-dir=/usr/lib/xorg/modules/drivers --with-state-trackers=dri,egl,xorg,glx,vega,g3dvl --enable-motif --enable-gl-osmesa --with-osmesa-bits=32 --disable-gallium-intel --disable-gallium-radeon --with-expat=/usr/lib --with-demos=xdemos,demos,trivial,tests --with-dri-drivers=swrast,ffb 

I then run make,and that's where the Mesa code stops when I compile it.

If you need any other information,please let me know.

Regards,
       STEVE555
Comment 3 Christoph Bumiller 2009-08-14 06:36:42 UTC
Don't submit bug reports for nouveau gallium yet please if you don't have a patch to go with it. Thanks.
Comment 4 Renato Caldas 2009-08-14 06:42:23 UTC
Hello,

This should be pretty trivial, and I'm working on a patch. Please be patient :)
Comment 5 Renato Caldas 2009-08-14 07:26:36 UTC
Created attachment 28632 [details] [review]
Patch that fixes nv50_program.c compilation

Here's the patch.

This seems to be an ancient bug, where one instance of "r" should have been replaced by "4" but wasn't. It never caused any problems before, because the second REALLOC argument was discarded. This changed with this commit:

[120e76866b4b0d136ae4ed377c6ff96454e39b95] util: silence warnings for third REALLOC argument
Comment 6 Christoph Bumiller 2009-08-14 07:57:49 UTC
Thanks; I would've put your name under it but I had committed the fix in the same instant I marked that bug invalid.
Now you're ready to fix the more serious issues; just send a patch to the nouveau list when you have one instead of opening a bug report though (or we'd be swimming in Gallium bugs), until we declare the code ready :-)
Comment 7 Renato Caldas 2009-08-14 08:03:09 UTC
(In reply to comment #6)
> Thanks; I would've put your name under it but I had committed the fix in the
> same instant I marked that bug invalid.
No problem, it was really trivial :)
Comment 8 Steven Ward 2009-08-14 14:16:55 UTC
(In reply to comment #7)
> (In reply to comment #6)
> > Thanks; I would've put your name under it but I had committed the fix in the
> > same instant I marked that bug invalid.
> No problem, it was really trivial :)
> 

Hi there,
        I am sorry about that,I am aware the code is still in a state of flux.
I just wanted to notify that the whole code was stopping at that error,when I compile.I should've waited a bit longer,but oh well.I wish I could submit patches,but I don't know anything about C code and I can just about get my head round the actual tree itself.Though I do find it interesting watching the changes.

I like to thank you very much for your help.

Regards,
       STVE555


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.