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

FRR doesn't build with --enable-static-bin configure flag #17424

Open
2 tasks done
matejvrba opened this issue Nov 13, 2024 · 0 comments
Open
2 tasks done

FRR doesn't build with --enable-static-bin configure flag #17424

matejvrba opened this issue Nov 13, 2024 · 0 comments
Assignees
Labels
bug mgmt FRR Management Infra

Comments

@matejvrba
Copy link

Description

Hi,
I was trying to compile frr with static linking enabled, but I ran into linking issue:

  CCLD     mgmtd/mgmtd
/usr/bin/ld: mgmtd/.libs/libmgmt_be_nb.a(mgmtd_libmgmt_be_nb_la-rip_cli.o): in function `rip_cli_init':
/tmp/tmp.b1m5dh9JrF/frr/ripd/rip_cli.c:1317:(.text+0xc2d): undefined reference to `if_rmap_init'
/usr/bin/ld: mgmtd/.libs/libmgmt_be_nb.a(mgmtd_libmgmt_be_nb_la-rip_cli.o):(.data.rel.ro+0x1c80): undefined reference to `group_distribute_list_ipv4_cli_show'
/usr/bin/ld: mgmtd/.libs/libmgmt_be_nb.a(mgmtd_libmgmt_be_nb_la-rip_cli.o):(.data.rel.ro+0x1d10): undefined reference to `group_distribute_list_ipv4_cli_show'
/usr/bin/ld: mgmtd/.libs/libmgmt_be_nb.a(mgmtd_libmgmt_be_nb_la-rip_cli.o):(.data.rel.ro+0x1da0): undefined reference to `group_distribute_list_ipv4_cli_show'

I wasn't yet able to make libyang_fat.a library as suggested by the Static linking guide, but I'm relatively confident the issue isn't linking libyang.

  • functions mentioned in the output appear to be part of frr, not yang
  • when taking the failing command (./libtool --silent --tag=CC --mode=link clang [...] -ljson-c -latomic -lrt) I was able to add ./lib/.libs/libfrr.a to the end of the command and mgmtd linked successfully

Version

rc/10.2 (commit 22746b8d5)

How to reproduce

./bootstrap.sh && ./configure --enable-static --enable-static-bin --enable-shared && make -j $(nproc)

Expected behavior

Linking successfully

Actual behavior

Not linking successfully

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@matejvrba matejvrba added the triage Needs further investigation label Nov 13, 2024
@ton31337 ton31337 added bug mgmt FRR Management Infra and removed triage Needs further investigation labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mgmt FRR Management Infra
Projects
None yet
Development

No branches or pull requests

3 participants