Skip to content

Build failure in GNU Linux smp example #499

@nvetrini

Description

@nvetrini

Hi,

building the ports_smp/linux/gnu/example_build example, I get the following build error in txe_queue_create.c:

CC txe_queue_create.c
/root/home/nicola/eclair/repos/threadx/ports_smp/linux/gnu/example_build/../../../../common_smp/src/txe_queue_create.c: In function ‘_txe_queue_create’:
/root/home/nicola/eclair/repos/threadx/ports_smp/linux/gnu/example_build/../../../../common_smp/src/txe_queue_create.c:182:33: error: ‘TX_QUEUE_MESSAGE_MAX_SIZE’ undeclared (first use in this function); did you mean ‘TX_QUEUE_MESSAGE_COPY’?
  182 |         else if (message_size > TX_QUEUE_MESSAGE_MAX_SIZE)
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                 TX_QUEUE_MESSAGE_COPY
/root/home/nicola/eclair/repos/threadx/ports_smp/linux/gnu/example_build/../../../../common_smp/src/txe_queue_create.c:182:33: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:57: .tmp/generic/txe_queue_create.o] Error 1

The issue can be reproduced by simply calling make with all necessary dependencies installed in the aforementioned folder. It is likely an include path issue, as TX_QUEUE_MESSAGE_MAX_SIZE is defined in either

common/inc/tx_api.h:#define TX_QUEUE_MESSAGE_MAX_SIZE           TX_16_ULONG
common/inc/tx_user_sample.h:#define TX_QUEUE_MESSAGE_MAX_SIZE              TX_ULONG_16

and in txe_queue_create.c the file tx_api.h is included with quotes. I have noticed this issue a while ago (a few months at least) in our CI, but only reported it now. I'd be happy to test changes and report back, if needed.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghardwareNew hardware or architecture support request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions