[RTEMS Project] #2771: Empty C++ file does not compile with HEAD.
RTEMS trac
trac at rtems.org
Thu Aug 4 00:20:13 UTC 2016
#2771: Empty C++ file does not compile with HEAD.
---------------------+------------------
Reporter: chrisj | Owner:
Type: defect | Status: new
Priority: highest | Milestone: 4.12
Component: cpukit | Version: 4.12
Severity: blocker | Keywords:
---------------------+------------------
I have an application that does not build.
The following C++ file:
{{{
$ cat t1.cpp
#include <rtems.h>
}}}
does not compile with git head 5fe6d07ad5690e3d9c6445ca3a465a700a5a5015 on
Zynq ARM. Build with:
{{{
$ /opt/work/rtems/4.12/bin/arm-rtems4.12-g++ \
-B/opt/work/rtems/4.12/arm-rtems4.12/xilinx_zynq_zc706/lib \
-B/opt/work/bsps/rtems/4.12/arm-rtems4.12/xilinx_zynq_zc706/lib \
-specs bsp_specs -qrtems \
-march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard -mtune=cortex-a9 \
-g -O2 -DNDEBUG -std=c++11 \
-Werror -Wall -Wextra \
-o t1.o \
-c t1.cpp
}}}
Some (too much to post) of the output is:
{{{
In file included from /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/thread.h:36:0,
from /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/heap.h:22,
from /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/rtems/types.h:26,
from /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems.h:31,
from t1.cpp:1:
/opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/timestamp.h: In
function 'void _Timestamp_Set(Timestamp_Control*, time_t, long int)':
/opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/timestamp.h:78:33:
error: 'timespec2bintime' was not declared in this scope
timespec2bintime( &_ts, _time );
^
/opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/timestamp.h: In
function 'void _Timestamp_Set_to_zero(Timestamp_Control*)':
/opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/timestamp.h:94:8:
error: invalid use of incomplete type 'Timestamp_Control {aka struct
bintime}'
_time->sec = 0;
^~
In file included from /opt/work/rtems/4.12/arm-
rtems4.12/include/sys/time.h:299:0,
from /opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/timestamp.h:43,
from /opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/thread.h:36,
from /opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/score/heap.h:22,
from /opt/work/si/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems/rtems/types.h:26,
from /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/include/rtems.h:31,
from t1.cpp:1:
/opt/work/rtems/4.12/arm-rtems4.12/include/machine/_time.h:40:15: note:
forward declaration of 'Timestamp_Control {aka struct bintime}'
extern struct bintime _Timecounter_Boottimebin;
^~~~~~~
}}}
If '-std=c++11' is removed or replaced with '-std=gnu++11' the error
becomes:
{{{
arm-rtems4.12-g++: fatal error: /opt/work/bsps/rtems/4.12/arm-
rtems4.12/xilinx_zynq_zc706/lib/bsp_specs: attempt to rename spec
'endfile' to already defined spec 'old_endfile'
}}}
--
Ticket URL: <http://devel.rtems.org/ticket/2771>
RTEMS Project <http://www.rtems.org/>
RTEMS Project
More information about the bugs
mailing list