All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Parse Error
@ 2015-04-07  6:24 Nejc Urbajs
  2015-04-07  6:42 ` Nejc Urbajs
  0 siblings, 1 reply; 11+ messages in thread
From: Nejc Urbajs @ 2015-04-07  6:24 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/html, Size: 277 bytes --]

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

* Re: Parse Error
  2015-04-07  6:24 Parse Error Nejc Urbajs
@ 2015-04-07  6:42 ` Nejc Urbajs
  0 siblings, 0 replies; 11+ messages in thread
From: Nejc Urbajs @ 2015-04-07  6:42 UTC (permalink / raw)
  To: cca_liam_maps; +Cc: yocto

[-- Attachment #1: Type: text/html, Size: 966 bytes --]

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

* Re: Parse Error
  2015-04-07  6:47 Nejc Urbajs
@ 2015-04-07  6:52 ` Nejc Urbajs
  0 siblings, 0 replies; 11+ messages in thread
From: Nejc Urbajs @ 2015-04-07  6:52 UTC (permalink / raw)
  To: cca_liam_maps; +Cc: yocto

[-- Attachment #1: Type: text/html, Size: 1224 bytes --]

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

* Re: Parse Error
@ 2015-04-07  6:47 Nejc Urbajs
  2015-04-07  6:52 ` Nejc Urbajs
  0 siblings, 1 reply; 11+ messages in thread
From: Nejc Urbajs @ 2015-04-07  6:47 UTC (permalink / raw)
  To: ross.burton; +Cc: yocto

[-- Attachment #1: Type: text/html, Size: 410 bytes --]

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

* Re: Parse Error
  2015-04-05 14:43 Rickard Bremer
@ 2015-04-05 19:38 ` Burton, Ross
  0 siblings, 0 replies; 11+ messages in thread
From: Burton, Ross @ 2015-04-05 19:38 UTC (permalink / raw)
  To: Rickard Bremer; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On 5 April 2015 at 15:43, Rickard Bremer <rickard.bremer@tritech.se> wrote:

> $ bitbake core-image-minimal
> ERROR: ParseError at
> /var/lib/jenkins/workspace/thesis-build-yocto/meta-openembedded/meta-oe/recipes-core/packagegroups/
> packagegroup-basic.bb:12: Could not inherit file classes/bluetooth.bbclass
>

Looks like your meta-oe is from master but your oe-core is from a release
branch?  bluetooth.bbclass is only in oe-core master (and the shortly to be
released 1.8 aka "Fido").

Ross

[-- Attachment #2: Type: text/html, Size: 1010 bytes --]

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

* Parse Error
@ 2015-04-05 14:43 Rickard Bremer
  2015-04-05 19:38 ` Burton, Ross
  0 siblings, 1 reply; 11+ messages in thread
From: Rickard Bremer @ 2015-04-05 14:43 UTC (permalink / raw)
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 444 bytes --]

Hello,

Since this morning i've been starting up a new build from scratch. I cant figure out howto proceed :

$ bitbake core-image-minimal
ERROR: ParseError at /var/lib/jenkins/workspace/thesis-build-yocto/meta-openembedded/meta-oe/recipes-core/packagegroups/packagegroup-basic.bb:12: Could not inherit file classes/bluetooth.bbclass

Summary: There was 1 ERROR message shown, returning a non-zero exit code.


Best Regards
Rickard

[-- Attachment #2: Type: text/html, Size: 820 bytes --]

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

* Re: parse error
  2004-09-25  6:29 ` Elias Athanasopoulos
@ 2004-09-28  6:14   ` Jan-Benedict Glaw
  2004-09-26 22:51     ` Elias Athanasopoulos
  0 siblings, 1 reply; 11+ messages in thread
From: Jan-Benedict Glaw @ 2004-09-28  6:14 UTC (permalink / raw)
  To: linux prg

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

On Sat, 2004-09-25 09:29:01 +0300, Elias Athanasopoulos <elathan@phys.uoa.gr>
wrote in message <20040925062900.GC1997@velka.phys.uoa.gr>:
> On Sun, Sep 26, 2004 at 03:32:52PM +0100, Ankit Jain wrote:
> > hi
> > 
> > i could not understand why compiler has put semi colon
> > before else due t owhich this parse error comes....
> > 
> > thanks
> > 
> >   
> > #define exch(x,y) { int tmp; tmp=x; x=y; y=tmp; }
> 
> #define exch(x,y) do { int tmp; tmp=x; x=y; y=tmp; } while(0);

Nearly:-) Omit the last semicolon to make it work...

MfG, JBG

-- 
Jan-Benedict Glaw       jbglaw@lug-owl.de    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 fuer einen Freien Staat voll Freier Bürger" | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

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

* RE: parse error
@ 2004-09-27 15:58 Huber, George K RDECOM CERDEC STCD SRI
  0 siblings, 0 replies; 11+ messages in thread
From: Huber, George K RDECOM CERDEC STCD SRI @ 2004-09-27 15:58 UTC (permalink / raw)
  To: 'Ankit Jain', linux prg

Ankit wrote:

>i could not understand why compiler has put semi colon
>before else due t owhich this parse error comes....

>#define exch(x,y) { int tmp; tmp=x; x=y; y=tmp; }

Remember that macro expansion occures early in the compilation process 
(it occures in step 4 if I remember correctly).  In this case a simple
text replacement is performed.

>However that wouldn't work in some cases. The following code is 
>meant to be an if-statement with two branches:

  if(x>y)
    exch(x,y);          // Branch 1
  else  
    do_something();     // Branch 2

As written, assuming exch() is a function you would have a two branch
if statement.  However, because exch is a macro, this is what is passed
from the c preprocessor to the compiler (because exch(..) is replaced with
the body of the defination:

if(x>y)
  { int tmp; tmp=x; x=y; y=tmp;};
else
  do_something();

and you have a one-brance if statement along with a parse error of an 
unassociated elst statement.  There are two fixes to this problem.  The 
first is to remove the semi-colon after the if statement:

if(x>y)
  exch(x,y)
else
  do_something();

This will expand to what you expect.  This is probably the least 
satisfactory fix.  The better fix would be to wrap the entire macro in a 
do-while loop, leaving the semicolon in place (i.e. this construct allows 
a macro call to be treated like a function).

#define exch(x,y)  do{int tmp; tmp=x; x=y; y=tmp;}while(0)

if(x>y)
  do{int tmp; tmp=x; x=y; y=tmp;}while(0);
else
 ...


You should be aware that while macros are powerful, they can be tricky to 
use.  As an example, consifer what would happen with this statement

exch(a, b+4)

George

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

* Re: parse error
  2004-09-28  6:14   ` Jan-Benedict Glaw
@ 2004-09-26 22:51     ` Elias Athanasopoulos
  0 siblings, 0 replies; 11+ messages in thread
From: Elias Athanasopoulos @ 2004-09-26 22:51 UTC (permalink / raw)
  To: linux prg

On Tue, Sep 28, 2004 at 08:14:51AM +0200, Jan-Benedict Glaw wrote:
> On Sat, 2004-09-25 09:29:01 +0300, Elias Athanasopoulos <elathan@phys.uoa.gr>
> wrote in message <20040925062900.GC1997@velka.phys.uoa.gr>:
> > On Sun, Sep 26, 2004 at 03:32:52PM +0100, Ankit Jain wrote:
> > > hi
> > > 
> > > i could not understand why compiler has put semi colon
> > > before else due t owhich this parse error comes....
> > > 
> > > thanks
> > >   
> > > #define exch(x,y) { int tmp; tmp=x; x=y; y=tmp; }
> > 
> > #define exch(x,y) do { int tmp; tmp=x; x=y; y=tmp; } while(0);
> 
> Nearly:-) Omit the last semicolon to make it work...

Right. :-) Actually after a lot of C Coding it's too difficult to
develop the habit to omit a last semicolon in one line of code. 

Regards,
-- 
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	

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

* parse error
@ 2004-09-26 14:32 Ankit Jain
  2004-09-25  6:29 ` Elias Athanasopoulos
  0 siblings, 1 reply; 11+ messages in thread
From: Ankit Jain @ 2004-09-26 14:32 UTC (permalink / raw)
  To: linux prg

hi

i could not understand why compiler has put semi colon
before else due t owhich this parse error comes....

thanks

  
#define exch(x,y) { int tmp; tmp=x; x=y; y=tmp; }

However that wouldn't work in some cases. The
following code is meant to be an if-statement with two
branches:

  if(x>y)
    exch(x,y);          // Branch 1
  else  
    do_something();     // Branch 2

But it would be interpreted as an if-statement with
only one branch:

  if(x>y) {                     // Single-branch
if-statement!!!
    int tmp;            // The one and only branch
consists
    tmp = x;            // of the block.
    x = y;
    y = tmp;
  }
  ;                             // empty statement
  else                  // ERROR!!! "parse error
before else"
    do_something();


________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html

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

* Re: parse error
  2004-09-26 14:32 Ankit Jain
@ 2004-09-25  6:29 ` Elias Athanasopoulos
  2004-09-28  6:14   ` Jan-Benedict Glaw
  0 siblings, 1 reply; 11+ messages in thread
From: Elias Athanasopoulos @ 2004-09-25  6:29 UTC (permalink / raw)
  To: Ankit Jain; +Cc: linux prg

On Sun, Sep 26, 2004 at 03:32:52PM +0100, Ankit Jain wrote:
> hi
> 
> i could not understand why compiler has put semi colon
> before else due t owhich this parse error comes....
> 
> thanks
> 
>   
> #define exch(x,y) { int tmp; tmp=x; x=y; y=tmp; }

#define exch(x,y) do { int tmp; tmp=x; x=y; y=tmp; } while(0);

Regards,
-- 
University of Athens			I bet the human brain 
Physics Department				is a kludge --Marvin Minsky 

	

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

end of thread, other threads:[~2015-04-07  6:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-07  6:24 Parse Error Nejc Urbajs
2015-04-07  6:42 ` Nejc Urbajs
  -- strict thread matches above, loose matches on Subject: below --
2015-04-07  6:47 Nejc Urbajs
2015-04-07  6:52 ` Nejc Urbajs
2015-04-05 14:43 Rickard Bremer
2015-04-05 19:38 ` Burton, Ross
2004-09-27 15:58 parse error Huber, George K RDECOM CERDEC STCD SRI
2004-09-26 14:32 Ankit Jain
2004-09-25  6:29 ` Elias Athanasopoulos
2004-09-28  6:14   ` Jan-Benedict Glaw
2004-09-26 22:51     ` Elias Athanasopoulos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.