[AG-TECH] vic with gcc3
Christoph Willing
chris at vislab.usyd.edu.au
Fri Aug 8 17:51:06 CDT 2003
On Fri, 2003-08-08 at 10:42, Christoph Willing wrote:
> On Fri, 2003-08-08 at 04:26, Stephen Bosch wrote:
[snip]
>>I'm perfectly happy building directly from source but the sources have
>>to build -- building vic fails with the following error:
[snip]
>>video/grabber-qcam.cpp
>>video/grabber-qcam.cpp:66: qcam.h: No such file or directory
>>video/grabber-qcam.cpp:69: qcam-os.h: No such file or directory
>>make: *** [video/grabber-qcam.o] Error 1
>>
>>Obviously a missing header. What is the header from?
>>
>
> I think you'll find that you have some devices /dev/qcam0, /dev/qcam1
> and /dev/qcam2. The vic configure script looks for such a device.
Either
> delete reference to qcam in the configure script or delete all the
> /dev/qcam* devices (actually I just renamed them while compiling vic).
> At this point, everything will compile with gcc2.
>
> However, the next gotcha is that Slackware 9 (and other 9
distributions)
> uses gcc3, which is more discriminating about the code it compiles
than
> gcc2 was. In particular gcc3 won't like some function casts at lines
> 456, 458 & 459 of main.cpp.
>
> The quick solution is to use one of the gcc2 compilers. I have a Slack
> 8.1 machine with gcc 2.95.3 for exactly this kind of thing.
>
> The better solution is for someone to update the signal handling code.
>
...and the the better solution is -
much easier than I thought, namely the patch below. Copy it to the
ag-vic directory as vic-gcc3.patch and install it with:
patch -p0 < vic-gcc3.patch
then run the build script.
Alternatively, manually edit the main.ccp file in the ag-vic/vic
directory. At line 182, change
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 96
to
#if (__GNUC__ <= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
then build.
chris
### patch for gcc3 ##### Don't include this line! ############
--- vic/main.cpp.orig 2003-08-08 21:53:49.000000000 +1000
+++ vic/main.cpp 2003-08-08 21:54:17.000000000 +1000
@@ -179,7 +179,7 @@
#ifdef __SUNPRO_CC
#define SIGARGS int arg
#else
-#if __GNUC__ == 2 && __GNUC_MINOR__ >= 96
+#if (__GNUC__ <= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
#define SIGARGS int
#else
#define SIGARGS ...
################## Don't include this line ! ##################
--
Chris Willing Telephone (61-2) 9351 3914
VisLab, A28 Facsimile (61-2) 9351 7726
University of Sydney
NSW 2006 Australia http://www.vislab.usyd.edu.au
More information about the ag-tech
mailing list