[YLUG] [steve at patter.me.uk: [Wylug-help] Compiler trouble]

Seb James seb at esfnet.co.uk
Tue May 18 08:18:26 UTC 2010


Hello there,

Ok, missing files in /usr/include/sys is clearly a problem for your
compiler.

I had a look on my own Debian system to see what package provides files
in /usr/include/sys:

[seb at circle 09:15:51 ~]$ dpkg --search /usr/include/sys/acct.h
libc6-dev: /usr/include/sys/acct.h

So I would try re-installing libc6-dev. That should do the job.

Hope that helps.

Seb James

On Mon, 2010-05-17 at 18:09 +0100, Stephen Patterson wrote:
> You might have seen this already on the wylug list, but its bugging me to 
> hell.
> 
> ----- Forwarded message from Stephen Patterson <steve at patter.me.uk> -----
> 
> > From: Stephen Patterson <steve at patter.me.uk>
> > To: WYLUG HELP <wylug-help at wylug.org.uk>
> > Date: Sun, 16 May 2010 19:11:03 +0100
> > Subject: [Wylug-help] Compiler trouble
> > 
> > I've got a system running Debian Sid, fully updated &
> > build-essential installed, and for some reason I can't compile even
> > the simplest of C programs - hello world.
> > 
> > I've attached a logfile of the errors from compiling this code, and
> > I've found out that /usr/include/sys is an empty directory.
> > 
> > #include <stdio.h>
> > 
> > main()
> > {
> >     for(;;)
> >             {
> >                         printf ("Hello World!\n");
> >                               }
> > }
> > 
> > gcc hello.C
> > 
> > any ideas?
> > 
> > -- 
> > Stephen Patterson
> > steve at patter.me.uk :: http://patter.me.uk/
> > http://uk.linkedin.com/pub/stephen-patterson/1b/533/544
> > GPG: B416F0DE :: Jabber: patter at jabber.org
> > 
> 
> > In file included from /usr/include/stdio.h:28,
> >                  from hello.C:1:
> > /usr/include/features.h:346:25: error: sys/cdefs.h: No such file or directory
> > In file included from /usr/include/stdio.h:34,
> >                  from hello.C:1:
> > /usr/lib/gcc/i486-linux-gnu/4.3.4/include/stddef.h:214: error: expected constructor, destructor, or type conversion before ???typedef???
> > In file included from hello.C:1:
> > /usr/include/stdio.h:49: error: expected constructor, destructor, or type conversion before ???typedef???
> > /usr/include/stdio.h:50: error: ???__END_NAMESPACE_STD??? does not name a type
> > In file included from /usr/include/stdio.h:75,
> >                  from hello.C:1:
> > /usr/include/libio.h:332: error: ???size_t??? does not name a type
> > /usr/include/libio.h:336: error: ???size_t??? was not declared in this scope
> > /usr/include/libio.h:364: error: ???size_t??? has not been declared
> > /usr/include/libio.h:373: error: ???size_t??? has not been declared
> > /usr/include/libio.h:460: error: expected initializer before ???__THROW???
> > /usr/include/libio.h:461: error: expected initializer before ???__THROW???
> > /usr/include/libio.h:469: error: expected initializer before ???__THROW???
> > /usr/include/libio.h:470: error: expected initializer before ???__THROW???
> > /usr/include/libio.h:471: error: expected initializer before ???__THROW???
> > /usr/include/libio.h:493: error: ???size_t??? does not name a type
> > /usr/include/libio.h:498: error: expected initializer before ???__THROW???
> > In file included from hello.C:1:
> > /usr/include/stdio.h:91: error: expected constructor, destructor, or type conversion before ???typedef???
> > /usr/include/stdio.h:97: error: expected constructor, destructor, or type conversion before ???typedef???
> > In file included from hello.C:1:
> > /usr/include/stdio.h:155: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:157: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:162: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:172: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:182: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:186: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:192: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:205: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:214: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:219: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:219: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:229: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:249: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:255: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:274: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:276: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:283: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:289: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:296: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:302: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:309: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:313: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:313: error: expected primary-expression before ???__restrict__???
> > /usr/include/stdio.h:313: error: expected primary-expression before ???char???
> > /usr/include/stdio.h:314: error: expected primary-expression before ???int???
> > /usr/include/stdio.h:314: error: ???size_t??? was not declared in this scope
> > /usr/include/stdio.h:314: error: initializer expression list treated as compound expression
> > /usr/include/stdio.h:314: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:320: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:324: error: variable or field ???setlinebuf??? declared void
> > /usr/include/stdio.h:324: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:324: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:333: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:342: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:348: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:348: error: expected primary-expression before ???__restrict__???
> > /usr/include/stdio.h:348: error: expected primary-expression before ???const???
> > /usr/include/stdio.h:349: error: expected primary-expression before ???__arg???
> > /usr/include/stdio.h:349: error: initializer expression list treated as compound expression
> > /usr/include/stdio.h:357: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:358: error: ???__END_NAMESPACE_STD??? does not name a type
> > /usr/include/stdio.h:367: error: ???size_t??? has not been declared
> > /usr/include/stdio.h:369: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:376: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:381: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:384: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:407: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:413: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:416: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:445: error: ???__END_NAMESPACE_STD??? does not name a type
> > /usr/include/stdio.h:462: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:467: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:504: error: ???__END_NAMESPACE_C99??? does not name a type
> > /usr/include/stdio.h:514: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:514: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:532: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:543: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:543: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:555: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:556: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:576: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:584: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:592: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:592: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:595: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:604: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:612: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:622: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:639: error: ???size_t??? has not been declared
> > /usr/include/stdio.h:640: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:640: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:642: error: ???size_t??? has not been declared
> > /usr/include/stdio.h:643: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:643: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:652: error: ???size_t??? has not been declared
> > /usr/include/stdio.h:653: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:653: error: expected initializer before ???__wur???
> > /usr/include/stdio.h:662: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:675: error: ???FILE??? has not been declared
> > /usr/include/stdio.h:682: error: ???size_t??? does not name a type
> > /usr/include/stdio.h:688: error: ???size_t??? does not name a type
> > /usr/include/stdio.h:699: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:710: error: ???size_t??? does not name a type
> > /usr/include/stdio.h:712: error: ???size_t??? does not name a type
> > /usr/include/stdio.h:722: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:727: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:727: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:727: error: expected ???,??? or ???;??? before ???__wur???
> > /usr/include/stdio.h:732: error: variable or field ???rewind??? declared void
> > /usr/include/stdio.h:732: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:732: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:746: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:751: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:751: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:751: error: expected ???,??? or ???;??? before ???__wur???
> > /usr/include/stdio.h:771: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:776: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:776: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:776: error: expected primary-expression before ???const???
> > /usr/include/stdio.h:776: error: initializer expression list treated as compound expression
> > /usr/include/stdio.h:791: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:792: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:792: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:792: error: expected ???,??? or ???;??? before ???__wur???
> > /usr/include/stdio.h:793: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:793: error: expected primary-expression before ???__restrict__???
> > /usr/include/stdio.h:793: error: ???fpos64_t??? was not declared in this scope
> > /usr/include/stdio.h:793: error: expected primary-expression before ???__restrict__???
> > /usr/include/stdio.h:793: error: initializer expression list treated as compound expression
> > /usr/include/stdio.h:794: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:794: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:794: error: expected primary-expression before ???const???
> > /usr/include/stdio.h:794: error: initializer expression list treated as compound expression
> > /usr/include/stdio.h:799: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:801: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:801: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:801: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:803: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:803: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:803: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:808: error: expected constructor, destructor, or type conversion before ???extern???
> > /usr/include/stdio.h:809: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:809: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:809: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:810: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:810: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:810: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:819: error: expected constructor, destructor, or type conversion before ???extern???
> > In file included from /usr/include/stdio.h:826,
> >                  from hello.C:1:
> > /usr/include/bits/sys_errlist.h:27: error: expected constructor, destructor, or type conversion before ???extern???
> > In file included from hello.C:1:
> > /usr/include/stdio.h:831: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:831: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:831: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:836: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:836: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:836: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:846: error: expected initializer before ???*??? token
> > /usr/include/stdio.h:852: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:852: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:858: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:874: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:878: error: expected initializer before ???__THROW???
> > /usr/include/stdio.h:886: error: variable or field ???flockfile??? declared void
> > /usr/include/stdio.h:886: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:886: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:890: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:890: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:890: error: expected ???,??? or ???;??? before ???__THROW???
> > /usr/include/stdio.h:893: error: variable or field ???funlockfile??? declared void
> > /usr/include/stdio.h:893: error: ???FILE??? was not declared in this scope
> > /usr/include/stdio.h:893: error: ???__stream??? was not declared in this scope
> > /usr/include/stdio.h:916: error: ???__END_DECLS??? does not name a type
> 
> > _______________________________________________
> > Wylug-help mailing list
> > Wylug-help at wylug.org.uk
> > https://mailman.lug.org.uk/mailman/listinfo/wylug-help
> 
> 
> ----- End forwarded message -----
> 
> _______________________________________________
> York mailing list
> York at lists.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/york






More information about the York mailing list