* [Xenomai] posix/stdio.h error: ?size_t? does not name a type
@ 2012-12-28 12:26 Mariusz Janiak
2012-12-28 15:01 ` Gilles Chanteperdrix
0 siblings, 1 reply; 9+ messages in thread
From: Mariusz Janiak @ 2012-12-28 12:26 UTC (permalink / raw)
To: Xenomai
Hi
After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
/usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
I have found one thread related to this problem
http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
Mariusz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 12:26 [Xenomai] posix/stdio.h error: ?size_t? does not name a type Mariusz Janiak
@ 2012-12-28 15:01 ` Gilles Chanteperdrix
2012-12-28 15:33 ` hauptmech
0 siblings, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2012-12-28 15:01 UTC (permalink / raw)
To: Mariusz Janiak; +Cc: Xenomai
On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
> Hi
>
> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>
> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>
> I have found one thread related to this problem
>
> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>
> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
Hi Mariusz,
thanks for the report. Could you tell me which distribution and which
version you are using? We are certainly not going to include unistd.h in
stdio.h, the fact that size_t is not defined indicates that something
else is wrong as there are services supposedly defined in stdio.h which
use size_t.
Regards.
>
> Mariusz
>
>
>
>
>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>
--
Gilles.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
@ 2012-12-28 15:13 Mariusz Janiak
0 siblings, 0 replies; 9+ messages in thread
From: Mariusz Janiak @ 2012-12-28 15:13 UTC (permalink / raw)
To: Xenomai
Dnia Piątek, 28 Grudnia 2012 16:01 Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> napisał(a)
> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>
> > Hi
> >
> > After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
> >
> > from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
> > from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
> > /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
> > make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
> >
> > I have found one thread related to this problem
> >
> > http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
> >
> > Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>
>
> Hi Mariusz,
>
> thanks for the report. Could you tell me which distribution and which
> version you are using? We are certainly not going to include unistd.h in
> stdio.h, the fact that size_t is not defined indicates that something
> else is wrong as there are services supposedly defined in stdio.h which
> use size_t.
I have Ubuntu 12.10 x86_64, gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1).
Mariusz
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 15:01 ` Gilles Chanteperdrix
@ 2012-12-28 15:33 ` hauptmech
2012-12-28 15:44 ` Gilles Chanteperdrix
0 siblings, 1 reply; 9+ messages in thread
From: hauptmech @ 2012-12-28 15:33 UTC (permalink / raw)
To: xenomai
On 12/28/2012 04:01 PM, Gilles Chanteperdrix wrote:
> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>
>> Hi
>>
>> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>>
>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
>> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
>> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>>
>> I have found one thread related to this problem
>>
>> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>>
>> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>
> Hi Mariusz,
>
> thanks for the report. Could you tell me which distribution and which
> version you are using? We are certainly not going to include unistd.h in
> stdio.h, the fact that size_t is not defined indicates that something
> else is wrong as there are services supposedly defined in stdio.h which
> use size_t.
>
> Regards.
http://gcc.gnu.org/gcc-4.7/porting_to.html (search for unistd.h)
The correct fix is probably to add unistd.h to MQLib.hpp (and other
include files that are missing it)
>
>> Mariusz
>>
>>
>>
>>
>>
>> _______________________________________________
>> Xenomai mailing list
>> Xenomai@xenomai.org
>> http://www.xenomai.org/mailman/listinfo/xenomai
>>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 15:33 ` hauptmech
@ 2012-12-28 15:44 ` Gilles Chanteperdrix
[not found] ` <50DDCFB4.3070206@nta-inc.net>
0 siblings, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2012-12-28 15:44 UTC (permalink / raw)
To: hauptmech; +Cc: xenomai
On 12/28/2012 04:33 PM, hauptmech wrote:
> On 12/28/2012 04:01 PM, Gilles Chanteperdrix wrote:
>> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>>
>>> Hi
>>>
>>> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>>>
>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
>>> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
>>> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>>>
>>> I have found one thread related to this problem
>>>
>>> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>>>
>>> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>>
>> Hi Mariusz,
>>
>> thanks for the report. Could you tell me which distribution and which
>> version you are using? We are certainly not going to include unistd.h in
>> stdio.h, the fact that size_t is not defined indicates that something
>> else is wrong as there are services supposedly defined in stdio.h which
>> use size_t.
>>
>> Regards.
> http://gcc.gnu.org/gcc-4.7/porting_to.html (search for unistd.h)
>
> The correct fix is probably to add unistd.h to MQLib.hpp (and other
> include files that are missing it)
This does not look like the same issue: using size_t is valid in stdio.h
without including unistd.h
I will install the same distribution as Mariusz to try and reproduce the
issue.
--
Gilles.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
[not found] ` <50DDCFB4.3070206@nta-inc.net>
@ 2012-12-28 17:02 ` Jeff Webb
2012-12-28 17:29 ` Jeff Webb
0 siblings, 1 reply; 9+ messages in thread
From: Jeff Webb @ 2012-12-28 17:02 UTC (permalink / raw)
To: xenomai
On 12/28/2012 10:58 AM, Jeff Webb wrote:
> On 12/28/2012 09:44 AM, Gilles Chanteperdrix wrote:
>> On 12/28/2012 04:33 PM, hauptmech wrote:
>>
>>> On 12/28/2012 04:01 PM, Gilles Chanteperdrix wrote:
>>>> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>>>>>
>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
>>>>> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
>>>>> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>>>>>
>>>>> I have found one thread related to this problem
>>>>>
>>>>> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>>>>>
>>>>> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>>>>
>>>> Hi Mariusz,
>>>>
>>>> thanks for the report. Could you tell me which distribution and which
>>>> version you are using? We are certainly not going to include unistd.h in
>>>> stdio.h, the fact that size_t is not defined indicates that something
>>>> else is wrong as there are services supposedly defined in stdio.h which
>>>> use size_t.
>>>>
>>>> Regards.
>>> http://gcc.gnu.org/gcc-4.7/porting_to.html (search for unistd.h)
>>>
>>> The correct fix is probably to add unistd.h to MQLib.hpp (and other
>>> include files that are missing it)
>>
>>
>> This does not look like the same issue: using size_t is valid in stdio.h
>> without including unistd.h
>>
>> I will install the same distribution as Mariusz to try and reproduce the
>> issue.
>>
I ran into a similar issue under Ubuntu 12.04 and Xenomai-2.6.1+. I was also using C++, so maybe it isn't a problem in C...
-Jeff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 17:02 ` Jeff Webb
@ 2012-12-28 17:29 ` Jeff Webb
2012-12-28 17:41 ` Jeff Webb
2012-12-28 17:59 ` Gilles Chanteperdrix
0 siblings, 2 replies; 9+ messages in thread
From: Jeff Webb @ 2012-12-28 17:29 UTC (permalink / raw)
To: xenomai
On 12/28/2012 11:02 AM, Jeff Webb wrote:
> On 12/28/2012 10:58 AM, Jeff Webb wrote:
>> On 12/28/2012 09:44 AM, Gilles Chanteperdrix wrote:
>>> On 12/28/2012 04:33 PM, hauptmech wrote:
>>>
>>>> On 12/28/2012 04:01 PM, Gilles Chanteperdrix wrote:
>>>>> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>>>>>
>>>>>> Hi
>>>>>>
>>>>>> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>>>>>>
>>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
>>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
>>>>>> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
>>>>>> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>>>>>>
>>>>>> I have found one thread related to this problem
>>>>>>
>>>>>> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>>>>>>
>>>>>> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>>>>>
>>>>> Hi Mariusz,
>>>>>
>>>>> thanks for the report. Could you tell me which distribution and which
>>>>> version you are using? We are certainly not going to include unistd.h in
>>>>> stdio.h, the fact that size_t is not defined indicates that something
>>>>> else is wrong as there are services supposedly defined in stdio.h which
>>>>> use size_t.
>>>>>
>>>>> Regards.
>>>> http://gcc.gnu.org/gcc-4.7/porting_to.html (search for unistd.h)
>>>>
>>>> The correct fix is probably to add unistd.h to MQLib.hpp (and other
>>>> include files that are missing it)
>>>
>>>
>>> This does not look like the same issue: using size_t is valid in stdio.h
>>> without including unistd.h
>>>
>>> I will install the same distribution as Mariusz to try and reproduce the
>>> issue.
>>>
>
> I ran into a similar issue under Ubuntu 12.04 and Xenomai-2.6.1+. I was also using C++, so maybe it isn't a problem in C...
>
> -Jeff
>
Here's some more information. This C++ program fails to compile under Xenomai because ‘size_t’ does not name a type. It compiles fine without Xenomai:
#include <iostream>
int main()
{
size_t t = 1;
t += 1;
return 0;
}
But this one compiles:
#include <cstdio>
#include <iostream>
int main()
{
size_t t = 1;
t += 1;
return 0;
}
The following program compiles as C++ or C:
#include <stdio.h>
int main()
{
size_t t = 1;
t += 1;
return 0;
}
I hope this helps.
-Jeff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 17:29 ` Jeff Webb
@ 2012-12-28 17:41 ` Jeff Webb
2012-12-28 17:59 ` Gilles Chanteperdrix
1 sibling, 0 replies; 9+ messages in thread
From: Jeff Webb @ 2012-12-28 17:41 UTC (permalink / raw)
To: xenomai
On 12/28/2012 11:29 AM, Jeff Webb wrote:
> On 12/28/2012 11:02 AM, Jeff Webb wrote:
>> On 12/28/2012 10:58 AM, Jeff Webb wrote:
>>> On 12/28/2012 09:44 AM, Gilles Chanteperdrix wrote:
>>>> On 12/28/2012 04:33 PM, hauptmech wrote:
>>>>
>>>>> On 12/28/2012 04:01 PM, Gilles Chanteperdrix wrote:
>>>>>> On 12/28/2012 01:26 PM, Mariusz Janiak wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> After successful Xenomai 2.6.2 installation (with Gilles help), I have started building OROCOS 2.6 with xeno support, and once again I went into trouble. This time I am not sure that it is a Xenomai related bug. The problem is following
>>>>>>>
>>>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.hpp:42,
>>>>>>> from /worek/install/orocos-toolchain-xeno/rtt/rtt/transports/mqueue/MQLib.cpp:40:
>>>>>>> /usr/xenomai/include/xenomai/posix/stdio.h:30:1: error: ?size_t? does not name a type
>>>>>>> make[2]: *** [rtt/transports/mqueue/CMakeFiles/rtt-transport-mqueue-xenomai_plugin.dir/MQLib.cpp.o] Błąd 1
>>>>>>>
>>>>>>> I have found one thread related to this problem
>>>>>>>
>>>>>>> http://www.xenomai.org/pipermail/xenomai/2012-September/026143.html
>>>>>>>
>>>>>>> Adding #include <unistd.h> in /usr/xenomai/include/xenomai/posix/stdio.h have solved my problem, but I don't know if it is a suitable solution.
>>>>>>
>>>>>> Hi Mariusz,
>>>>>>
>>>>>> thanks for the report. Could you tell me which distribution and which
>>>>>> version you are using? We are certainly not going to include unistd.h in
>>>>>> stdio.h, the fact that size_t is not defined indicates that something
>>>>>> else is wrong as there are services supposedly defined in stdio.h which
>>>>>> use size_t.
>>>>>>
>>>>>> Regards.
>>>>> http://gcc.gnu.org/gcc-4.7/porting_to.html (search for unistd.h)
>>>>>
>>>>> The correct fix is probably to add unistd.h to MQLib.hpp (and other
>>>>> include files that are missing it)
>>>>
>>>>
>>>> This does not look like the same issue: using size_t is valid in stdio.h
>>>> without including unistd.h
>>>>
>>>> I will install the same distribution as Mariusz to try and reproduce the
>>>> issue.
>>>>
>>
>> I ran into a similar issue under Ubuntu 12.04 and Xenomai-2.6.1+. I was also using C++, so maybe it isn't a problem in C...
>>
>> -Jeff
>>
>
> Here's some more information. This C++ program fails to compile under Xenomai because ‘size_t’ does not name a type. It compiles fine without Xenomai:
>
> #include <iostream>
>
> int main()
> {
> size_t t = 1;
> t += 1;
> return 0;
> }
>
> But this one compiles:
>
> #include <cstdio>
> #include <iostream>
>
> int main()
> {
> size_t t = 1;
> t += 1;
> return 0;
> }
>
> The following program compiles as C++ or C:
>
> #include <stdio.h>
>
> int main()
> {
> size_t t = 1;
> t += 1;
> return 0;
> }
>
Sorry, I need to be more clear. The compile problem is due to size_t being used in a header file, not my main program. The following example also fails to compile unless stdio.h or cstdio are included from the main program before iostream.
#include <iostream>
int main()
{
return 0;
}
In file included from /usr/include/wchar.h:37:0,
from /usr/include/c++/4.6/cwchar:46,
from /usr/include/c++/4.6/bits/postypes.h:42,
from /usr/include/c++/4.6/iosfwd:42,
from /usr/include/c++/4.6/ios:39,
from /usr/include/c++/4.6/ostream:40,
from /usr/include/c++/4.6/iostream:40,
from jefftest.cpp:2:
/usr/include/xenomai/posix/stdio.h:30:1: error: ‘size_t’ does not name a type
Sorry for all the traffic, but I realized what I wrote in my last message was not clear.
-Jeff
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai] posix/stdio.h error: ?size_t? does not name a type
2012-12-28 17:29 ` Jeff Webb
2012-12-28 17:41 ` Jeff Webb
@ 2012-12-28 17:59 ` Gilles Chanteperdrix
1 sibling, 0 replies; 9+ messages in thread
From: Gilles Chanteperdrix @ 2012-12-28 17:59 UTC (permalink / raw)
To: Jeff Webb; +Cc: xenomai
On 12/28/2012 06:29 PM, Jeff Webb wrote:
> Here's some more information. This C++ program fails to compile
> under Xenomai because ‘size_t’ does not name a type. It compiles
> fine without Xenomai:
> (...)
> I hope this helps.
A lot, thanks, please try the following commit:
http://git.xenomai.org/?p=xenomai-2.6.git;a=commit;h=943a0801349548f85227f7a3032eb6ac0a5258e2
--
Gilles.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-12-28 17:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-28 12:26 [Xenomai] posix/stdio.h error: ?size_t? does not name a type Mariusz Janiak
2012-12-28 15:01 ` Gilles Chanteperdrix
2012-12-28 15:33 ` hauptmech
2012-12-28 15:44 ` Gilles Chanteperdrix
[not found] ` <50DDCFB4.3070206@nta-inc.net>
2012-12-28 17:02 ` Jeff Webb
2012-12-28 17:29 ` Jeff Webb
2012-12-28 17:41 ` Jeff Webb
2012-12-28 17:59 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2012-12-28 15:13 Mariusz Janiak
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.