Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Applications fail to build when using both musl and lwip with memory pools #1308

Open
Mihnea27 opened this issue Feb 6, 2024 · 0 comments
Open
Labels
kind/bug Something isn't working

Comments

@Mihnea27
Copy link

Mihnea27 commented Feb 6, 2024

Describe the bug

Applications fail to build when configured to use lib-musl and lib-lwip with memory pools (CONFIG_LWIP_POOLS=y).

Steps to reproduce

  1. Write a basic helloworld application, use Unikraft version 0.16.1 and lib-musl and lib-lwip staging versions.
  2. In the configuration set:
  • x86 as architecture (CONFIG_ARCH_x86_64=y)
  • KVM as platform with qemu as VMM (CONFIG_PLAT_KVM=y and CONFIG_KVM_VMM_QEMU=y)
  • use lib-musl (CONFIG_LIBMUSL=y)
  • use lib-lwip (CONFIG_LIBLWIP=y) with memory pools (CONFIG_LWIP_POOLS=y)
  1. Try to build the application with make

Expected behavior

Application builds successfully.

Which architectures were you using or does this bug affect?

x86_64

Which platforms were you using or does this bug affect?

kvm

Relevant log output

[...]
/home/mihnea27/unikernels/build_error/app-helloworld/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/priv/memp_std.h:31:53: note: in expansion of macro ‘LWIP_MEMPOOL’
   31 | #define LWIP_PBUF_MEMPOOL(name, num, payload, desc) LWIP_MEMPOOL(name, num, (LWIP_MEM_ALIGN_SIZE(sizeof(struct pbuf)) + LWIP_MEM_ALIGN_SIZE(payload)), desc)
      |                                                     ^~~~~~~~~~~~
/home/mihnea27/unikernels/build_error/app-helloworld/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/priv/memp_std.h:134:1: note: in expansion of macro ‘LWIP_PBUF_MEMPOOL’
  134 | LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE,           PBUF_POOL_BUFSIZE,             "PBUF_POOL")
      | ^~~~~~~~~~~~~~~~~
/home/mihnea27/git/unikraft_libs/lib-lwip/include/lwipopts.h:275:24: note: in expansion of macro ‘MAX’
  275 | #define PBUF_POOL_SIZE MAX(((TCP_WND + TCP_MSS - 1) / TCP_MSS), 2 * IP_REASS_MAX_PBUFS)
      |                        ^~~
/home/mihnea27/unikernels/build_error/app-helloworld/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/priv/memp_std.h:134:30: note: in expansion of macro ‘PBUF_POOL_SIZE’
  134 | LWIP_PBUF_MEMPOOL(PBUF_POOL, PBUF_POOL_SIZE,           PBUF_POOL_BUFSIZE,             "PBUF_POOL")
      |                              ^~~~~~~~~~~~~~
/home/mihnea27/git/unikraft/include/uk/essentials.h:77:9: error: braced-group within expression allowed only inside a function
   77 |         ({                                                                     \
      |         ^
/home/mihnea27/unikernels/build_error/app-helloworld/build/liblwip/origin/fork-lwip-UNIKRAFT-2_1_x/src/include/lwip/arch.h:287:40: note: in definition of macro ‘LWIP_MEM_ALIGN_BUFFER’
  287 | #define LWIP_MEM_ALIGN_BUFFER(size) (((size) + MEM_ALIGNMENT - 1U))
[...]
@Mihnea27 Mihnea27 added the kind/bug Something isn't working label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant