RT-Thread / rt-thread

RT-Thread is an open source IoT Real-Time Operating System (RTOS).
https://www.rt-thread.io
Apache License 2.0
10.52k stars 5.03k forks source link

debian10编译qemu-vexpress-a9失败 #2950

Closed ziyouchutuwenwu closed 5 years ago

ziyouchutuwenwu commented 5 years ago

环境

$ uname -a
Linux debian 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u2 (2019-08-08) x86_64 GNU/Linux
$ cat /etc/debian_version
10.0

流程

git clone https://github.com/RT-Thread/rt-thread.git
sudo apt install scons

下载gcc编译器,使用下面这里的
https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/8-2019q3/RC1.1/gcc-arm-none-eabi-8-2019-q3-update-linux.tar.bz2

rt-thread/bsp/qemu-vexpress-a9/rtconfig.py
修改gcc的路径
EXEC_PATH   = '/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/bin/'

cd rt-thread/bsp/qemu-vexpress-a9/
scons -c; scons --menuconfig; scons

错误信息

In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:23,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/sched.h:19:5: error: expected identifier before numeric constant
     SCHED_OTHER = 0,
     ^~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:29: warning: "PTHREAD_CREATE_JOINABLE" redefined
 #define PTHREAD_CREATE_JOINABLE     0x00

In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:47: note: this is the location of the previous definition
 #define PTHREAD_CREATE_JOINABLE  1

In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:30: warning: "PTHREAD_CREATE_DETACHED" redefined
 #define PTHREAD_CREATE_DETACHED     0x01

In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:46: note: this is the location of the previous definition
 #define PTHREAD_CREATE_DETACHED 0

In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:32: warning: "PTHREAD_EXPLICIT_SCHED" redefined
 #define PTHREAD_EXPLICIT_SCHED      0

In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:43: note: this is the location of the previous definition
 #define PTHREAD_EXPLICIT_SCHED 2      /* set from provided attribute object */

In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:35:14: error: conflicting types for 'pthread_t'
 typedef long pthread_t;
              ^~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:32:20: note: previous declaration of 'pthread_t' was here
 typedef __uint32_t pthread_t;            /* identify a thread */
                    ^~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:36:14: error: conflicting types for 'pthread_condattr_t'
 typedef long pthread_condattr_t;
              ^~~~~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:186:3: note: previous declaration of 'pthread_condattr_t' was here
 } pthread_condattr_t;         /* a condition attribute object */
   ^~~~~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:38:14: error: conflicting types for 'pthread_mutexattr_t'
 typedef long pthread_mutexattr_t;
              ^~~~~~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:169:3: note: previous declaration of 'pthread_mutexattr_t' was here
 } pthread_mutexattr_t;
   ^~~~~~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:41:13: error: conflicting types for 'pthread_key_t'
 typedef int pthread_key_t;
             ^~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:190:20: note: previous declaration of 'pthread_key_t' was here
 typedef __uint32_t pthread_key_t;        /* thread-specific data keys */
                    ^~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:42:13: error: conflicting types for 'pthread_once_t'
 typedef int pthread_once_t;
             ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:195:3: note: previous declaration of 'pthread_once_t' was here
 } pthread_once_t;       /* dynamic package initialization */
   ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:79:8: error: redefinition of 'struct sched_param'
 struct sched_param
        ^~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:23,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/sched.h:48:8: note: originally defined here
 struct sched_param {
        ^~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:95:29: error: conflicting types for 'pthread_attr_t'
 typedef struct pthread_attr pthread_attr_t;
                             ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:75:3: note: previous declaration of 'pthread_attr_t' was here
 } pthread_attr_t;
   ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:102:30: error: conflicting types for 'pthread_mutex_t'
 typedef struct pthread_mutex pthread_mutex_t;
                              ^~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:154:20: note: previous declaration of 'pthread_mutex_t' was here
 typedef __uint32_t pthread_mutex_t;      /* identify a mutex */
                    ^~~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:109:29: error: conflicting types for 'pthread_cond_t'
 typedef struct pthread_cond pthread_cond_t;
                             ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/types.h:223,
                 from /home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:12,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/_pthreadtypes.h:176:20: note: previous declaration of 'pthread_cond_t' was here
 typedef __uint32_t pthread_cond_t;       /* identify a condition variable */
                    ^~~~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:19:
/home/mmc/dev/embedded/rtt/rt-thread/components/libc/pthreads/pthread.h:191:5: error: conflicting types for 'pthread_kill'
 int pthread_kill(pthread_t thread, int sig);
     ^~~~~~~~~~~~
In file included from /home/mmc/dev/embedded/rtt/rt-thread/include/libc/libc_signal.h:67,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtdef.h:466,
                 from /home/mmc/dev/embedded/rtt/rt-thread/include/rtthread.h:24,
                 from /home/mmc/dev/embedded/rtt/rt-thread/components/libc/compilers/newlib/libc.c:10:
/home/mmc/dev/embedded/rtt/gcc-arm-none-eabi-8-2019-q3-update/arm-none-eabi/include/sys/signal.h:226:5: note: previous declaration of 'pthread_kill' was here
 int pthread_kill (pthread_t, int);
     ^~~~~~~~~~~~
scons: *** [build/kernel/components/libc/compilers/newlib/libc.o] Error 1
ziyouchutuwenwu commented 5 years ago

换了个编译器,gcc-arm-none-eabi-6_2-2016q4,好了,谢谢