Skip to contentSkip to conversation

Error "field ‘pse51_si’ has incomplete type" in syscall.h after upgrading Ubuntu Distrib to 13.04

Xenomai Marc Le Douarain 2 participants 5 messages Sep 1, 2013 – Sep 2, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hello everybody,

I have an application using Xenomai that do no more compile after I have recently upgraded from Ubuntu 12.10 to 13.04

Here the error I have in one one file including "phread.h" :
gcc -c tasks.c -o tasks.o -march=i486 ...(custom defines)... xeno-config --skin posix --cflags In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                 from /usr/xenomai/include/nucleus/trace.h:52,
                 from /usr/xenomai/include/nucleus/system.h:27,
                 from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                 from /usr/xenomai/include/asm/xenomai/system.h:2,
                 from /usr/xenomai/include/nucleus/types.h:41,
                 from /usr/xenomai/include/nucleus/thread.h:25,
                 from /usr/xenomai/include/posix/pthread.h:136,
                 from tasks.c:34:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [tasks.o] Erreur 1

gcc installed on this version is 4.7.3
My project based on Linux kernel 2.6.38.8 and Xenomai 2.5.6

any one have an idea, on something that could be done...?
else I'm thinking to install an older version in virtual machine to no more encounter bad surprises with upgrades !

Many thanks in advance.

#1 lore raw
Quoted 21 lines · Marc Le Douarain

Hello everybody,

I have an application using Xenomai that do no more compile after I have recently upgraded from Ubuntu 12.10 to 13.04

Here the error I have in one one file including "phread.h" :
gcc -c tasks.c -o tasks.o -march=i486 ...(custom defines)... xeno-config --skin posix --cflags
In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                  from /usr/xenomai/include/nucleus/trace.h:52,
                  from /usr/xenomai/include/nucleus/system.h:27,
                  from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                  from /usr/xenomai/include/asm/xenomai/system.h:2,
                  from /usr/xenomai/include/nucleus/types.h:41,
                  from /usr/xenomai/include/nucleus/thread.h:25,
                  from /usr/xenomai/include/posix/pthread.h:136,
                  from tasks.c:34:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [tasks.o] Erreur 1

Quoted 6 lines

gcc installed on this version is 4.7.3
My project based on Linux kernel 2.6.38.8 and Xenomai 2.5.6

any one have an idea, on something that could be done...? else I'm thinking to install an older version in virtual machine to no more encounter bad surprises with upgrades !

You are probably lacking a #include, add the missing include and it should be fine. Also, Xenomai 2.5.6 and Linux 2.6.38 are really old, updating is recommended.

Signature · 1 line
                                                                Gilles.
#2 lore raw
Quoted 25 lines · Gilles Chanteperdrix
Quoted 24 lines · Marc Le Douarain

Hello everybody,

I have an application using Xenomai that do no more compile after I have recently upgraded from Ubuntu 12.10 to 13.04

Here the error I have in one one file including "phread.h" :
gcc -c tasks.c -o tasks.o -march=i486 ...(custom defines)... xeno-config --skin posix --cflags
In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                   from /usr/xenomai/include/nucleus/trace.h:52,
                   from /usr/xenomai/include/nucleus/system.h:27,
                   from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                   from /usr/xenomai/include/asm/xenomai/system.h:2,
                   from /usr/xenomai/include/nucleus/types.h:41,
                   from /usr/xenomai/include/nucleus/thread.h:25,
                   from /usr/xenomai/include/posix/pthread.h:136,
                   from tasks.c:34:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [tasks.o] Erreur 1

gcc installed on this version is 4.7.3
My project based on Linux kernel 2.6.38.8 and Xenomai 2.5.6

Quoted 8 lines
Quoted 3 lines

any one have an idea, on something that could be done...? else I'm thinking to install an older version in virtual machine to no more encounter bad surprises with upgrades !

You are probably lacking a #include, add the missing include and it should be fine. Also, Xenomai 2.5.6 and Linux 2.6.38 are really old, updating is recommended.

Thank for the tip, but I've exactly the same error, with an old little "hello" example, I've included.
Example using native tasks, and that was compiling correctly before distrib upgrade...

Bye, bye.

gcc hello_test.c -march=i486 -O2 -fno-omit-frame-pointer /usr/xenomai/bin/xeno-config --skin=native --cflags -march=i486 -O2 /usr/xenomai/bin/xeno-config --skin=native --ldflags -o hello_test In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                  from /usr/xenomai/include/nucleus/trace.h:52,
                  from /usr/xenomai/include/nucleus/system.h:27,
                  from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                  from /usr/xenomai/include/asm/xenomai/system.h:2,
                  from /usr/xenomai/include/nucleus/types.h:41,
                  from /usr/xenomai/include/nucleus/thread.h:25,
                  from /usr/xenomai/include/nucleus/sched.h:31,
                  from /usr/xenomai/include/native/task.h:25,
                  from hello_test.c:7:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [all] Erreur 1

-------------- next part --------------
CFLAGS = -march=i486 -O2 -fno-omit-frame-pointer
LDFLAGS = -march=i486 -O2

CFLAGS += /usr/xenomai/bin/xeno-config --skin=native --cflags LDFLAGS += /usr/xenomai/bin/xeno-config --skin=native --ldflags

all:

	gcc hello_test.c $(CFLAGS) $(LDFLAGS) -o hello_test

cflags:

	echo $(CFLAGS)

ldflags:

	echo $(LDFLAGS)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hello_test.c
Type: text/x-csrc
Size: 1171 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130901/52b8a415/attachment.c>

#3 lore raw
In reply to Gilles Chanteperdrix
Quoted 25 lines · Gilles Chanteperdrix
Quoted 24 lines · Marc Le Douarain

Hello everybody,

I have an application using Xenomai that do no more compile after I have recently upgraded from Ubuntu 12.10 to 13.04

Here the error I have in one one file including "phread.h" :
gcc -c tasks.c -o tasks.o -march=i486 ...(custom defines)... xeno-config --skin posix --cflags
In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                   from /usr/xenomai/include/nucleus/trace.h:52,
                   from /usr/xenomai/include/nucleus/system.h:27,
                   from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                   from /usr/xenomai/include/asm/xenomai/system.h:2,
                   from /usr/xenomai/include/nucleus/types.h:41,
                   from /usr/xenomai/include/nucleus/thread.h:25,
                   from /usr/xenomai/include/posix/pthread.h:136,
                   from tasks.c:34:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [tasks.o] Erreur 1

gcc installed on this version is 4.7.3
My project based on Linux kernel 2.6.38.8 and Xenomai 2.5.6

Quoted 8 lines
Quoted 3 lines

any one have an idea, on something that could be done...? else I'm thinking to install an older version in virtual machine to no more encounter bad surprises with upgrades !

You are probably lacking a #include, add the missing include and it should be fine. Also, Xenomai 2.5.6 and Linux 2.6.38 are really old, updating is recommended.

Thank for the tip, but I've exactly the same error, with an old little "hello" example, directly at the bottom of this message.
Example using native tasks, and that was compiling correctly before distrib upgrade...

Bye, bye.

gcc hello_test.c -march=i486 -O2 -fno-omit-frame-pointer /usr/xenomai/bin/xeno-config --skin=native --cflags -march=i486 -O2 /usr/xenomai/bin/xeno-config --skin=native --ldflags -o hello_test In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                  from /usr/xenomai/include/nucleus/trace.h:52,
                  from /usr/xenomai/include/nucleus/system.h:27,
                  from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                  from /usr/xenomai/include/asm/xenomai/system.h:2,
                  from /usr/xenomai/include/nucleus/types.h:41,
                  from /usr/xenomai/include/nucleus/thread.h:25,
                  from /usr/xenomai/include/nucleus/sched.h:31,
                  from /usr/xenomai/include/native/task.h:25,
                  from hello_test.c:7:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [all] Erreur 1

Here directly the files :

********************
*** hello_test.c ***
********************

#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>

#include <native/task.h>
#include <native/timer.h>

RT_TASK task_desc;

static void task(void *arg)
{

    RTIME now,previous;

    rt_task_set_periodic( NULL, TM_NOW, 1000000000 );
    previous = rt_timer_read( );

    while( 1 )
    {
        rt_task_wait_period( NULL );
        now = rt_timer_read( );

          printf("Hello world xenomai test! %ld.%06ld ms\n", 

(long)(now-previous)/1000000, (long)(now-previous)%1000000 );

/* Outch... printf accesses a Linux ressource so we are now
in secondary mode */
}
}

void catch_signal( int sig )
{
}

int main (void)

{
    int err;

printf("starting...\n");

  signal( SIGTERM,catch_signal );
  signal( SIGINT,catch_signal );

  /* disable memory swap */
  mlockall( MCL_CURRENT | MCL_FUTURE );

  err = rt_task_create( &task_desc, "demo_task", 0, 99, 0 );
  if (err!=0 )
  {
    printf("rt_task_create error : %d\n",err);
    return 1;
  }

  err = rt_task_start( &task_desc, &task, NULL );
  if (err!=0 )
  {
    printf("rt_task_start error : %d\n",err);
    return 1;
  }

  printf("running!\n");
  pause( );

rt_task_delete( &task_desc );
return 0;
}

********************
*** Makefile ***
********************

CFLAGS = -march=i486 -O2 -fno-omit-frame-pointer
LDFLAGS = -march=i486 -O2

CFLAGS += /usr/xenomai/bin/xeno-config --skin=native --cflags LDFLAGS += /usr/xenomai/bin/xeno-config --skin=native --ldflags

all:

    gcc hello_test.c $(CFLAGS) $(LDFLAGS) -o hello_test

cflags:

    echo $(CFLAGS)

ldflags:

    echo $(LDFLAGS)

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 34 lines · Marc Le Douarain
Quoted 25 lines · Gilles Chanteperdrix
Quoted 24 lines · Marc Le Douarain

Hello everybody,

I have an application using Xenomai that do no more compile after I have recently upgraded from Ubuntu 12.10 to 13.04

Here the error I have in one one file including "phread.h" :
gcc -c tasks.c -o tasks.o -march=i486 ...(custom defines)... xeno-config --skin posix --cflags
In file included from /usr/xenomai/include/asm/xenomai/syscall.h:23:0,

                   from /usr/xenomai/include/nucleus/trace.h:52,
                   from /usr/xenomai/include/nucleus/system.h:27,
                   from /usr/xenomai/include/asm/xenomai/system_32.h:137,
                   from /usr/xenomai/include/asm/xenomai/system.h:2,
                   from /usr/xenomai/include/nucleus/types.h:41,
                   from /usr/xenomai/include/nucleus/thread.h:25,
                   from /usr/xenomai/include/posix/pthread.h:136,
                   from tasks.c:34:

/usr/xenomai/include/asm-generic/xenomai/syscall.h:78:17: erreur: field ‘pse51_si’ has incomplete type
make: *** [tasks.o] Erreur 1

gcc installed on this version is 4.7.3
My project based on Linux kernel 2.6.38.8 and Xenomai 2.5.6

Quoted 8 lines
Quoted 3 lines

any one have an idea, on something that could be done...? else I'm thinking to install an older version in virtual machine to no more encounter bad surprises with upgrades !

You are probably lacking a #include, add the missing include and it should be fine. Also, Xenomai 2.5.6 and Linux 2.6.38 are really old, updating is recommended.

Quoted 5 lines

Thank for the tip, but I've exactly the same error, with an old little "hello" example,
I've included.
Example using native tasks, and that was compiling correctly before distrib upgrade...

Apparently, you misunderstood, so I am going to try and explain again. The problematic line of code is "struct siginfo pse51_si", because of the toolchain update, the header defining "struct siginfo" was included in another header, so we made the mistake not to include this header at the time of xenomai 2.5.6 (which was two and a half years ago). But this code disappeared in latest versions of Xenomai. So, you have two solutions:
- add the missing #include directive in Xenomai 2.5.6 sources
- or upgrade to Xenomai 2.6.2.1 which is the latest version.

Signature · 1 line
                                                                Gilles.