Bug 80047 - Compilation Error in webcam module of CVS
Summary: Compilation Error in webcam module of CVS
Status: RESOLVED FIXED
Alias: None
Product: kstars
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kstars
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-21 08:56 UTC by Xavier Fung
Modified: 2004-06-01 09:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xavier Fung 2004-04-21 08:56:56 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.3.3 Redhat Linux 3.3.3-3
OS:          Linux

I am using KDE 3.2.1 on Fedora Core 2 Test 2.
I have enountered an error upon compiling kstars, in which the error happens in the indi/webcam module. Here is the error message:

[xavier@localhost kstars]$ make
Making all in kstars
make[1]: Entering directory `/home/xavier/kdeedu/kstars/kstars'
Making all in indi
make[2]: Entering directory `/home/xavier/kdeedu/kstars/kstars/indi'
Making all in fli
make[3]: Entering directory `/home/xavier/kdeedu/kstars/kstars/indi/fli'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/xavier/kdeedu/kstars/kstars/indi/fli'
Making all in webcam
make[3]: Entering directory `/home/xavier/kdeedu/kstars/kstars/indi/webcam'
gcc  -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2   -Wformat-security -Wmissing-format-attribute -c `test -f 'ccvt_mmx_old.S' || echo './'`ccvt_mmx_old.S
ccvt_mmx_old.S:450:22: pasting "ccvt_420i_rgb24" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:477:22: pasting "ccvt_420i_bgr24" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:505:22: pasting "ccvt_420i_rgb32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:532:22: pasting "ccvt_420i_bgr32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:562:22: pasting "ccvt_yuyv_rgb32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:589:22: pasting "ccvt_yuyv_bgr32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:622:22: pasting "ccvt_420p_rgb32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:666:22: pasting "ccvt_420p_bgr32" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:720:22: pasting "ccvt_rgb24_420p" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:827:22: pasting "ccvt_bgr24_420p" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:947:21: pasting "ccvt_420i_420p" and ":" does not give a valid preprocessing token
ccvt_mmx_old.S:1019:21: pasting "ccvt_420i_yuyv" and ":" does not give a valid preprocessing token
make[3]: *** [ccvt_mmx_old.o] Error 1
make[3]: Leaving directory `/home/xavier/kdeedu/kstars/kstars/indi/webcam'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xavier/kdeedu/kstars/kstars/indi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xavier/kdeedu/kstars/kstars'
make: *** [all-recursive] Error 1

I have followed the "CVS howto" part of the homepage to fetch CVS and compile kstars only. The kdeeduplot module compiles without any problem, but I get stuck when I start compiling kstars. My system has kdeedu package version 3.2.1 installed, but from my past experience it is ok to make CVS over the present package.
Comment 1 kstars 2004-04-21 09:47:36 UTC
Hello,

We are aware of this issue.  It's some problem with gcc version 3.3.x, 
but we have not yet tracked it dowen.  As a workaround, you can do the 
following:

1. cd to kstars/kstars/indi/webcam
2. paste the failed compile command onto the command line, but omit the 
"-ansi" argument:

 gcc  -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith \
 -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 \
 -D_BSD_SOURCE -O2 -Wformat-security -Wmissing-format-attribute \
 -c `test -f 'ccvt_mmx_old.S' || echo './'`ccvt_mmx_old.S 

3. cd back to the top directory, and try "make" again.

Thank you for the bug report.

regards,
Jason
Comment 2 Xavier Fung 2004-04-21 18:54:06 UTC
Hello Jason,

The problem mentioned has been resolved by not enabling -ansi. Thank you.

However, another compliation matter comes. Here is the error message:

make[3]: Entering directory `/home/xavier/kdeedu/kstars/kstars/indi'
source='indidrivermain.c' object='indidrivermain.o' libtool=no \
depfile='.deps/indidrivermain.Po' tmpdepfile='.deps/indidrivermain.TPo' \
depmode=gcc3 /bin/sh ../../../admin/depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I../../..   -DQT_THREAD_SUPPORT  -D_REENTRANT  -ansi -W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2   -Wformat-security -Wmissing-format-attribute -c `test -f 'indidrivermain.c' || echo './'`indidrivermain.c
indidrivermain.c: In function `IDLog':
indidrivermain.c:441: warning: function might be possible candidate for `printf' format attribute
indidrivermain.c: In function `IUUpdateSwitches':
indidrivermain.c:561: error: assignment of read-only member `s'
indidrivermain.c: In function `IUUpdateNumbers':
indidrivermain.c:585: error: assignment of read-only member `s'
indidrivermain.c:592: error: assignment of read-only member `s'
indidrivermain.c: In function `clientMsgCB':
indidrivermain.c:637: warning: unused parameter `arg'
indidrivermain.c: In function `dispatch':
indidrivermain.c:705: warning: implicit declaration of function `f_scansexa'
indidrivermain.c:727: warning: declaration of `ep' shadows a previous local
indidrivermain.c:673: warning: shadowed declaration is here
indidrivermain.c: In function `pstateStr':
indidrivermain.c:863: warning: return discards qualifiers from pointer target type
indidrivermain.c:864: warning: return discards qualifiers from pointer target type
indidrivermain.c:865: warning: return discards qualifiers from pointer target type
indidrivermain.c:866: warning: return discards qualifiers from pointer target type
indidrivermain.c: In function `sstateStr':
indidrivermain.c:878: warning: return discards qualifiers from pointer target type
indidrivermain.c:879: warning: return discards qualifiers from pointer target type
indidrivermain.c: In function `ruleStr':
indidrivermain.c:891: warning: return discards qualifiers from pointer target type
indidrivermain.c:892: warning: return discards qualifiers from pointer target type
indidrivermain.c:893: warning: return discards qualifiers from pointer target type
indidrivermain.c: In function `permStr':
indidrivermain.c:905: warning: return discards qualifiers from pointer target type
indidrivermain.c:906: warning: return discards qualifiers from pointer target type
indidrivermain.c:907: warning: return discards qualifiers from pointer target type
indidrivermain.c: At top level:
indidrivermain.c:929: warning: initialization discards qualifiers from pointer target type
make[3]: *** [indidrivermain.o] Error 1
make[3]: Leaving directory `/home/xavier/kdeedu/kstars/kstars/indi'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/xavier/kdeedu/kstars/kstars/indi'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/xavier/kdeedu/kstars/kstars'
make: *** [all-recursive] Error 1

It seems there are some coding problems here.
Thanks for your quick reply.

Xavier
Comment 3 kstars 2004-04-21 19:18:41 UTC
Hello,

 On Wednesday 21 April 2004 09:54 am, Xavier Fung wrote:
> indidrivermain.c:441: warning: function might be possible candidate for
> `printf' format attribute indidrivermain.c: In function `IUUpdateSwitches':
> indidrivermain.c:561: error: assignment of read-only member `s'
> indidrivermain.c: In function `IUUpdateNumbers':
> indidrivermain.c:585: error: assignment of read-only member `s'
> indidrivermain.c:592: error: assignment of read-only member `s'

This is again, a problem that is restricted to only some versions of gcc.  On 
my system, these errors are only warnings.  This is why we haven't caught the 
problem yet.

Also, this issue is already reported as Bug #80019, so please watch that bug 
report for updates (I may have a fix already, but I want to run it by the 
INDI programmer first).

regards,
Jason
Comment 4 kstars 2004-06-01 09:41:45 UTC
Jasem committed the fix.