Skip to contentSkip to conversation

git compile failure

DISCUSSION Yan Seiner 3 participants 8 messages Jan 29, 2009 – Feb 1, 2009 5 messages not in the archive

lore
Share & tools
lore

Yan Seiner

author
#0 lore raw

I'm trying to build nouveau form git. The compile fails with:

gcc -DHAVE_CONFIG_H -I. -I.. -D_XOPEN_SOURCE=500 -I -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -g -O2 -Wall -minline-all-stringops -D_XOPEN_SOURCE=500 -I -I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -MT nouveau_device.lo -MD -MP -MF .deps/nouveau_device.Tpo -c nouveau_device.c -fPIC -DPIC -o .libs/nouveau_device.o
In file included from nouveau_device.c:27:
nouveau_drmif.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:51: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:54: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:57: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:60: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:96: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:100: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:108: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:110: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:123: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:127: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:130: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint32_t’
nouveau_drmif.h:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint32_t’
nouveau_drmif.h:139: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:161: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:165: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:168: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’
nouveau_drmif.h:171: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:174: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_drmif.h:179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
nouveau_device.c: In function ‘nouveau_device_open_existing’:
nouveau_device.c:53: warning: implicit declaration of function ‘nouveau_device_get_param’
make[2]: *** [nouveau_device.lo] Error 1
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/src'

The first offending line is here:

NOUVEAU_PRIVATE int
nouveau_device_open_existing(struct nouveau_device **, int close, int fd, drm_context_t ctx);

The rest of the errors are for similar syntax. Basically, the compiler doesn't like the "NOUVEAU_PRIVATE int" part.

What am I looking for? Is there a header file I'm missing somewhere? Or am I picking up a wrong header file?

--Yan

Signature · 10 lines
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner      (_)\(_)       ,>/'_     o__
       Personal Trainer      (_)\(_)    ,>/'_        o__
             Professional Engineer     (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)

You are an adult when you realize that everyone's an idiot sometimes. You
are wise when you include yourself.

A message that is not in the archive (sent off-list or not yet received): 141d1c48884ed68f7e91236a287d48a9.squirrel-+Pg63oGcj7QHmtrW3VDF9w@public.gmane.org

#2 lore raw
Quoted 11 lines · On Thu, 29 Jan 2009 09:10:24 -0800 (PST) "Yan Seiner" <[email protected]> wrote:

I'm trying to build nouveau form git. The compile fails with:

gcc -DHAVE_CONFIG_H -I. -I.. -D_XOPEN_SOURCE=500 -I

(quoted diff) +0 -3
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -g -O2
-Wall -minline-all-stringops -D_XOPEN_SOURCE=500 -I
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -MT

nouveau_device.lo -MD -MP -MF .deps/nouveau_device.Tpo -c nouveau_device.c -fPIC -DPIC -o .libs/nouveau_device.o In file included from nouveau_device.c:27:
nouveau_drmif.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’

I've no idea how that happens. It compiles fine for me, just tried. You might try something like

$ git remote update
$ make distclean
$ git rebase origin/master
$ ./autogen.sh
$ make

...

Quoted 7 lines

nouveau_device.c: In function ‘nouveau_device_open_existing’:
nouveau_device.c:53: warning: implicit declaration of function ‘nouveau_device_get_param’
make[2]: *** [nouveau_device.lo] Error 1
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/src'

Quoted 5 lines

The first offending line is here:

NOUVEAU_PRIVATE int
nouveau_device_open_existing(struct nouveau_device **, int close, int fd, drm_context_t ctx);

./src/nouveau_local.h:29:#define NOUVEAU_PRIVATE _X_HIDDEN

Signature · 6 lines
Pekka Paalanen
http://www.iki.fi/pq/
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 20090129231559.302a708e-cxYvVS3buNOdIgDiPM52R8c4bpwCjbIv@public.gmane.org

author
#4 lore raw
Quoted 18 lines · Pekka Paalanen
Quoted 6 lines · On Thu, 29 Jan 2009 09:10:24 -0800 (PST) "Yan Seiner"…

I'm trying to build nouveau form git. The compile fails with:

gcc -DHAVE_CONFIG_H -I. -I.. -D_XOPEN_SOURCE=500 -I

(quoted diff) +0 -3
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -g -O2
-Wall -minline-all-stringops -D_XOPEN_SOURCE=500 -I
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -MT
Quoted 6 lines

nouveau_device.lo -MD -MP -MF .deps/nouveau_device.Tpo -c nouveau_device.c -fPIC -DPIC -o .libs/nouveau_device.o
In file included from nouveau_device.c:27:
nouveau_drmif.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘int’

I've no idea how that happens. It compiles fine for me, just tried. You might try something like

Quoted 5 lines
$ git remote update
$ make distclean
$ git rebase origin/master
$ ./autogen.sh
$ make

Thanks.

I'll try this when I get access again. For now, I've traced it to X11/Xfuncproto.h not being #included. I suspect it has to do with the way debian packages its #includes.

Anyway, the missing #define is in X11/Xfuncproto.h; now I need to figure out where to stick it.

Anmyone out there using debian .debs for the build deps?

--Yan

Quoted 24 lines

...

Quoted 7 lines

nouveau_device.c: In function ‘nouveau_device_open_existing’:
nouveau_device.c:53: warning: implicit declaration of function ‘nouveau_device_get_param’
make[2]: *** [nouveau_device.lo] Error 1
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/src'

Quoted 5 lines

The first offending line is here:

NOUVEAU_PRIVATE int
nouveau_device_open_existing(struct nouveau_device **, int close, int fd, drm_context_t ctx);

./src/nouveau_local.h:29:#define NOUVEAU_PRIVATE _X_HIDDEN

--
Pekka Paalanen
http://www.iki.fi/pq/

!DSPAM:49821ca3160401804284693!

Signature · 10 lines
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner      (_)\(_)       ,>/'_     o__
       Personal Trainer      (_)\(_)    ,>/'_        o__
             Professional Engineer     (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)

You are an adult when you realize that everyone's an idiot sometimes. You
are wise when you include yourself.
author
#5 lore raw
In reply to a message not in the archive
Quoted 19 lines · Pekka Paalanen
Quoted 6 lines · On Thu, 29 Jan 2009 09:10:24 -0800 (PST) "Yan Seiner" <[email protected]> wrote:

I'm trying to build nouveau form git. The compile fails with:

gcc -DHAVE_CONFIG_H -I. -I.. -D_XOPEN_SOURCE=500 -I

(quoted diff) +0 -3
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -g -O2
-Wall -minline-all-stringops -D_XOPEN_SOURCE=500 -I
-I/usr/include/pixman-1 -I/usr/include/drm -I/usr/include/X11/dri -MT
Quoted 6 lines

nouveau_device.lo -MD -MP -MF .deps/nouveau_device.Tpo -c nouveau_device.c -fPIC -DPIC -o .libs/nouveau_device.o In file included from nouveau_device.c:27:
nouveau_drmif.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int’

I've no idea how that happens. It compiles fine for me, just tried. You might try something like

Quoted 6 lines
$ git remote update
$ make distclean
$ git rebase origin/master
$ ./autogen.sh
$ make

OK, I've tried that.... No joy. The problem is that the autogen script doesn't find any of the correct header files. It's a debian dependency issue. Even when I edit the source by hand to put in the correct locations, it still fails. I think I'm wasting a lot of time trying to reverse-engineer the debian deps rather than building nouveau. Is there a 'getting started' howto for building X? I only need the very basics for testing nouveau. Is there some basic basic script that will pull down the tarballs and allow me to install a minimal xorg for testing nouveau?

--Yan

Quoted 9 lines

...

Quoted 7 lines

nouveau_device.c: In function ‘nouveau_device_open_existing’:
nouveau_device.c:53: warning: implicit declaration of function ‘nouveau_device_get_param’
make[2]: *** [nouveau_device.lo] Error 1
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/src'

Quoted 10 lines
Quoted 6 lines

The first offending line is here:

NOUVEAU_PRIVATE int
nouveau_device_open_existing(struct nouveau_device **, int close, int fd, drm_context_t ctx);

./src/nouveau_local.h:29:#define NOUVEAU_PRIVATE _X_HIDDEN

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): 49830BB2.2040602-6T0/[email protected]

#7 lore raw
Quoted 9 lines · On Fri, 30 Jan 2009 06:16:18 -0800 Yan Seiner…

OK, I've tried that.... No joy. The problem is that the autogen script doesn't find any of the correct header files. It's a debian dependency issue. Even when I edit the source by hand to put in the correct locations, it still fails. I think I'm wasting a lot of time trying to reverse-engineer the debian deps rather than building nouveau. Is there a 'getting started' howto for building X? I only need the very basics for testing nouveau. Is there some basic basic script that will pull down the tarballs and allow me to install a minimal xorg for testing nouveau?

Could you provide some basic information, like which Debian you are using and which Xorg version you have?

I trust you already saw
http://nouveau.freedesktop.org/wiki/DebianTips
and it didn't help?

I asked on IRC, and two Debian users replied saying they don't have the problem (unstable+experimental, and Lenny).

Signature · 2 lines
Pekka Paalanen
http://www.iki.fi/pq/

A message that is not in the archive (sent off-list or not yet received): 20090130195749.4f03acb2-cxYvVS3buNOdIgDiPM52R8c4bpwCjbIv@public.gmane.org

author
#9 lore raw
Quoted 12 lines · Pekka Paalanen
Quoted 9 lines · On Fri, 30 Jan 2009 06:16:18 -0800 Yan Seiner…

OK, I've tried that.... No joy. The problem is that the autogen script doesn't find any of the correct header files. It's a debian dependency issue. Even when I edit the source by hand to put in the correct locations, it still fails. I think I'm wasting a lot of time trying to reverse-engineer the debian deps rather than building nouveau. Is there a 'getting started' howto for building X? I only need the very basics for testing nouveau. Is there some basic basic script that will pull down the tarballs and allow me to install a minimal xorg for testing nouveau?

First of all, thanks for all your help. I really appreciate this.

Quoted 3 lines

Could you provide some basic information, like which Debian you are using and which Xorg version you have?

It's unstable/experimental.

yan@selene:~$ dpkg --list | grep xorg | grep ii | awk '{print $2 " " $3}'
xorg 1:7.4~5
xorg-dev 1:7.4~5
xorg-docs 1:1.4-4
xserver-xorg 1:7.4~5
xserver-xorg-core 2:1.5.99.901-2
xserver-xorg-dev 2:1.5.99.901-2
xserver-xorg-input-evdev 1:2.1.1-1
xserver-xorg-video-apm 1:1.2.1-1
xserver-xorg-video-ark 1:0.7.1-1
xserver-xorg-video-chips 1:1.2.1-1
xserver-xorg-video-cirrus 1:1.2.1-3
xserver-xorg-video-intel 2:2.6.1-1
xserver-xorg-video-radeon 1:6.10.0-2
xserver-xorg-video-vesa 1:2.1.0-1
Quoted 4 lines

I trust you already saw
http://nouveau.freedesktop.org/wiki/DebianTips
and it didn't help?

I've been all through that; I've even wiped out all my xorg debs and reinstalled just to make sure.

Quoted 3 lines

I asked on IRC, and two Debian users replied saying they don't have the problem (unstable+experimental, and Lenny).

What appears to be happening is that NOUVEAU_PRIVATE is #defined as _X_HIDDEN, which is #defined in /usr/include/X11/Xfuncproto.h. For whatever reason, autogen.sh is not picking up any of the header files in /usr/include.

If I try to follow the directions in DebianTips, the compile fails because it cannot find the definition of _X_HIDDEN.

It's a header file misconfiguration somewhere on my system, I guess.

--Yan

Signature · 10 lines
  o__
  ,>/'_          o__
  (_)\(_)        ,>/'_        o__
Yan Seiner      (_)\(_)       ,>/'_     o__
       Personal Trainer      (_)\(_)    ,>/'_        o__
             Professional Engineer     (_)\(_)       ,>/'_
Who says engineers have to be pencil necked geeks?  (_)\(_)

You are an adult when you realize that everyone's an idiot sometimes. You
are wise when you include yourself.
author
#10 lore raw
In reply to a message not in the archive
Quoted 18 lines · Pekka Paalanen
Quoted 10 lines · On Fri, 30 Jan 2009 06:16:18 -0800 Yan Seiner…

OK, I've tried that.... No joy. The problem is that the autogen script doesn't find any of the correct header files. It's a debian dependency issue. Even when I edit the source by hand to put in the correct locations, it still fails. I think I'm wasting a lot of time trying to reverse-engineer the debian deps rather than building nouveau. Is there a 'getting started' howto for building X? I only need the very basics for testing nouveau. Is there some basic basic script that will pull down the tarballs and allow me to install a minimal xorg for testing nouveau?

Could you provide some basic information, like which Debian you are using and which Xorg version you have?

Quoted 8 lines

I trust you already saw
http://nouveau.freedesktop.org/wiki/DebianTips
and it didn't help?

I asked on IRC, and two Debian users replied saying they don't have the problem (unstable+experimental, and Lenny).

OK, I finally got a couple of solid hours to figure out what's going on. Seems that the code I got from git assumes that all of the xorg header files are in the src dir - but they don't get pulled in. Copying stuff over just didn't work. I went ahead fixed all of that to where it would pull in the header files from the correct dirs for debian lenny.

A git-diff is at http://www.seiner.com/debian-nouveau.diff

Let me know if this is useful. I can either post it on the wiki or submit a bug report.

nouveau_drv.so built OK; the man page build crashed with

Making all in man
make[2]: Entering directory /usr/src/nouveau/xf86-video-nouveau/man' make[2]: *** No rule to make target nouveau.@DRIVER_MAN_SUFFIX@', needed by `all-am'. Stop.
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/man' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau'

--Yan

A message that is not in the archive (sent off-list or not yet received): 4984E455.4070701-6T0/[email protected]

#12 lore raw
Quoted 9 lines · Yan Seiner

nouveau_drv.so built OK; the man page build crashed with

Making all in man
make[2]: Entering directory /usr/src/nouveau/xf86-video-nouveau/man' make[2]: *** No rule to make target nouveau.@DRIVER_MAN_SUFFIX@', needed by `all-am'. Stop.
make[2]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau/man' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/nouveau/xf86-video-nouveau'

Did note from this error is causing RAOFs ppa
(https://launchpad.net/~raof/+archive/ppa) to fail on build for both Hardy and Intrepid (apologies for using buntuisms).

Not sure what is going on here because there does appear to be a Makefile and other stuff in the man sub dir. Am not enough of a make guru to work out what is meant to be happening here, looks like the scripts are trying to build the man file for nouveau, but is @DRIVER_MAN_SUFFIX@ meant to be 'man' or something else? '4'? ....

Cheers,

Mark