This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

QT编译时出现 fatal error: asm/rwsem.h: No such file or directory等错误

1 编译时先时出现很多dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'INIT_LIST_HEAD':

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:26:6: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:27:6: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:39:17: warning: 'struct list_head' declared inside parameter list [enabled by default]

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function '__list_add':

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:41:6: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:42:5: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:43:5: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:44:6: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:60:59: warning: 'struct list_head' declared inside parameter list [enabled by default]

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'list_add':

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:28: error: dereferencing pointer to incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:2: warning: passing argument 1 of '__list_add' from incompatible pointer type [enabled by default]

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:37:20: note: expected 'struct list_head *' but argument is of type 'struct list_head *'

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:2: warning: passing argument 2 of '__list_add' from incompatible pointer type [enabled by default]

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:37:20: note: expected 'struct list_head *' but argument is of type 'struct list_head *'

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:74:64: warning: 'struct list_head' declared inside parameter list [enabled by default]

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'list_add_tail':

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:76:22: error: dereferencing pointer to incomplete type

 2 fatal error: asm/rwsem.h: No such file or directory

最后又出现

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/rwsem.h:29:19: error: field 'wait_list' has incomplete type

../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/rwsem.h:41:23: fatal error: asm/rwsem.h: No such file or directory

然后我找了下确实没有asm/rwsem.h这个文件,搞了一天没搞懂。



这是我的pro的配置文件内容

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += main.c \
    unix.c \
    timers_unix.c \
    timer.c \
    sync.c \
    symbols.c \
    states.c \
    sdo.c \
    pdo.c \
    objacces.c \
    nmtSlave.c \
    nmtMaster.c \
    lss.c \
    lifegrd.c \
    emcy.c \
    dcf.c \
    can_socket.c \
    ObjDict.c

OTHER_FILES += \
    canopen_canfestival.pro.user

HEADERS += \
    timers_driver.h \
    timerscfg.h \
    timer.h \
    sysdep.h \
    sync.h \
    states.h \
    sdo.h \
    pdo.h \
    objdictdef.h \
    objacces.h \
    nmtSlave.h \
    nmtMaster.h \
    lss.h \
    lifegrd.h \
    emcy.h \
    def.h \
    dcf.h \
    data.h \
    canfestival.h \
    can_driver.h \
    can.h \
    applicfg.h \
    ObjDict.h \
    config.h
target.path += /home/root
INSTALLS += target
INCLUDEPATH += /home/ti-sdk-am335x-evm-06.00.00.00/
INCLUDEPATH += /home/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include
INCLUDEPATH += /home/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/arch/arm/include
INCLUDEPATH += /home/ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/arch/arm/include/generated
请大神来解答啊,急急!!!!

qt按照TI的hands on with qt文档上配置的,也source了,helloworld能编译通过,并能在beaglebone black板上运行

  • asm-generic/rwsem.h这个文件是存在的,你把头文件路径改到这里试试

  • 但是内核里面很多文件都是#include <asm/......>并不是asm-generic/.......,如果改的话,很多都要改,而且改的都是内核文件了

  • 1 编译时先时出现很多dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'INIT_LIST_HEAD':

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:26:6: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:27:6: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:39:17: warning: 'struct list_head' declared inside parameter list [enabled by default]

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function '__list_add':

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:41:6: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:42:5: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:43:5: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:44:6: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:60:59: warning: 'struct list_head' declared inside parameter list [enabled by default]

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'list_add':

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:28: error: dereferencing pointer to incomplete type

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:2: warning: passing argument 1 of '__list_add' from incompatible pointer type [enabled by default]

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:37:20: note: expected 'struct list_head *' but argument is of type 'struct list_head *'

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:62:2: warning: passing argument 2 of '__list_add' from incompatible pointer type [enabled by default]

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:37:20: note: expected 'struct list_head *' but argument is of type 'struct list_head *'

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: At top level:

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:74:64: warning: 'struct list_head' declared inside parameter list [enabled by default]

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h: In function 'list_add_tail':

    ../../../ti-sdk-am335x-evm-06.00.00.00/board-support/linux-3.2.0-psp04.06.00.11/include/linux/list.h:76:22: error: dereferencing pointer to incomplete type


    请问这些是什么问题了?都是内核报的错

  • 1. 你的内核编译过吗?

    2. 编译内核和编译qt是否用的是同一个tool chain

    3. 请参考 http://processors.wiki.ti.com/index.php/Building_Qt

  • 内核编译过了,在BBB上都跑起来了,而且QT我也是按照TI的文档配置的,编译hello world程序没有问题,并在BBB上运行起来了 

  • BBB上我用的也是TI SDK6.0

  • 我的配置是参考TI的手册:sitara linux training hands on with qt

  • 您好,请问您的问题解决了没有,我现在在编译uboot,也是用的BBB,遇到了同样的问题:

    arch/arm/lib/vectors.S:69:28: fatal error: asm/arch/boot0.h: No such file or directory
    compilation terminated.

    不知道您是怎么解决的

x 出现错误。请重试或与管理员联系。