public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Build error in ecos-current
@ 2004-09-08 21:18 Joshua Boyd
  2004-09-09  2:32 ` Tony Butt
  2004-09-09 11:13 ` Andrew Lunn
  0 siblings, 2 replies; 4+ messages in thread
From: Joshua Boyd @ 2004-09-08 21:18 UTC (permalink / raw)
  To: ecos-discuss

I have an ecos current checked out from august 20th.

In the file: packages/services/compress/zlib/current/src/zutil.h
line 458 
extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
/* (size given to avoid silly warnings with Visual C++) */

What I don't understand is why the const keyword is used twice.

My attention was drawn to this by the following build error:
/home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.c:16:
conflicting types for `z_errmsg'
make: Leaving directory `/home/jdboyd/tmp/dmxTest_build'
/home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.h:48:
previous declaration of `z_errmsg'

Now, it appears that neither file has changed in the last 3 months.


I'm using GCC 3.2.1.  The ecoscentric provided binaries in fact.  Must I
upgrade to 3.4.1 to use the current CVS versions?  I was planning on
testing 3.4.1, but I wanted to take one thing at a time.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Build error in ecos-current
  2004-09-08 21:18 [ECOS] Build error in ecos-current Joshua Boyd
@ 2004-09-09  2:32 ` Tony Butt
  2004-09-09 11:13 ` Andrew Lunn
  1 sibling, 0 replies; 4+ messages in thread
From: Tony Butt @ 2004-09-09  2:32 UTC (permalink / raw)
  To: Joshua Boyd; +Cc: ecos-discuss

Joshua Boyd wrote:

>I have an ecos current checked out from august 20th.
>
>In the file: packages/services/compress/zlib/current/src/zutil.h
>line 458 
>extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
>/* (size given to avoid silly warnings with Visual C++) */
>
>What I don't understand is why the const keyword is used twice.
>
>My attention was drawn to this by the following build error:
>/home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.c:16:
>conflicting types for `z_errmsg'
>make: Leaving directory `/home/jdboyd/tmp/dmxTest_build'
>/home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.h:48:
>previous declaration of `z_errmsg'
>
>Now, it appears that neither file has changed in the last 3 months.
>
>
>I'm using GCC 3.2.1.  The ecoscentric provided binaries in fact.  Must I
>upgrade to 3.4.1 to use the current CVS versions?  I was planning on
>testing 3.4.1, but I wanted to take one thing at a time.
>
>  
>
Using const twice says a const pointer to const data (so I believe).
This should be entirely OK.

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Build error in ecos-current
  2004-09-08 21:18 [ECOS] Build error in ecos-current Joshua Boyd
  2004-09-09  2:32 ` Tony Butt
@ 2004-09-09 11:13 ` Andrew Lunn
  2004-09-09 14:56   ` Joshua Boyd
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2004-09-09 11:13 UTC (permalink / raw)
  To: Joshua Boyd; +Cc: ecos-discuss

On Wed, Sep 08, 2004 at 05:05:35PM -0400, Joshua Boyd wrote:
> I have an ecos current checked out from august 20th.
> 
> In the file: packages/services/compress/zlib/current/src/zutil.h
> line 458 
> extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
> /* (size given to avoid silly warnings with Visual C++) */
> 
> What I don't understand is why the const keyword is used twice.
> 
> My attention was drawn to this by the following build error:
> /home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.c:16:
> conflicting types for `z_errmsg'
> make: Leaving directory `/home/jdboyd/tmp/dmxTest_build'
> /home/jdboyd/projects/sw/ecos-current/packages/services/compress/zlib/current/src/zutil.h:48:
> previous declaration of `z_errmsg'
> 
> Now, it appears that neither file has changed in the last 3 months.
> 
> 
> I'm using GCC 3.2.1.  The ecoscentric provided binaries in fact.  Must I
> upgrade to 3.4.1 to use the current CVS versions?  I was planning on
> testing 3.4.1, but I wanted to take one thing at a time.

Please could you give exact steps to reproduce the error. It works for
me.

lunn@londo:~/eCos/work2$ ecosconfig new ebsa
lunn@londo:~/eCos/work2$ ecosconfig add zlib
C CYGPKG_COMPRESS_ZLIB, "requires" constraint not satisfied: CYGPKG_CRC
lunn@londo:~/eCos/work2$ ecosconfig add crc  
lunn@londo:~/eCos/work2$ ecosconfig tree
lunn@londo:~/eCos/work2$ make -s
headers finished
build finished
/home/lunn/eCos/anoncvs-clean/packages/services/compress/zlib/current/tests/zlib1.c: In function `entry0':
/home/lunn/eCos/anoncvs-clean/packages/services/compress/zlib/current/tests/zlib1.c:169: warning: implicit declaration of function `diag_printf'
/home/lunn/eCos/anoncvs-clean/packages/services/compress/zlib/current/tests/zlib1.c:170: warning: implicit declaration of function `diag_dump_buf'
/home/lunn/eCos/anoncvs-clean/packages/services/compress/zlib/current/tests/zlib1.c:177: warning: passing arg 2 of `z_uncompress' from incompatible pointer type
lunn@londo:~/eCos/work2$ 

ie just some warnings in the test programs, no fatal errors.

lunn@londo:~/eCos/work2$ arm-elf-gcc -v
Reading specs from /opt/ecos/gnutools/arm-elf/bin/../lib/gcc-lib/arm-elf/3.2.1/specs
Configured with: /home/demonweb/tools/ecos-gnutools-v1.4/r2/arm-elf/x86_linux_lsb1_3/tar_bz2/source/gcc-3.2.1/configure --target=arm-elf --prefix=/home/demonweb/tools/ecos-gnutools-v1.4/r2/arm-elf/x86_linux_lsb1_3/tar_bz2/opt/ecos/gnutools/arm-elf --enable-languages=c,c++ --with-gnu-as --with-gnu-ld --with-newlib --with-gxx-include-dir=/home/demonweb/tools/ecos-gnutools-v1.4/r2/arm-elf/x86_linux_lsb1_3/tar_bz2/opt/ecos/gnutools/arm-elf/arm-elf/include
Thread model: single
gcc version 3.2.1

        Thanks
                Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] Build error in ecos-current
  2004-09-09 11:13 ` Andrew Lunn
@ 2004-09-09 14:56   ` Joshua Boyd
  0 siblings, 0 replies; 4+ messages in thread
From: Joshua Boyd @ 2004-09-09 14:56 UTC (permalink / raw)
  To: ecos-discuss

On Thu, Sep 09, 2004 at 01:13:49PM +0200, Andrew Lunn wrote:

> Please could you give exact steps to reproduce the error. It works for
> me.

I found the problem.  Somehow I have an old zutil.c file.

Mine read:
const char * z_errmsg[10] = {
and I thought I had the latest CVS version, but I looked in cvsweb, and
there it reads:
const char * const z_errmsg[10] = {

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-09-09 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08 21:18 [ECOS] Build error in ecos-current Joshua Boyd
2004-09-09  2:32 ` Tony Butt
2004-09-09 11:13 ` Andrew Lunn
2004-09-09 14:56   ` Joshua Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).