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

Unable to disable vtysh compilation (compilation from source) #15752

Open
2 tasks done
jeromeag opened this issue Apr 16, 2024 · 8 comments
Open
2 tasks done

Unable to disable vtysh compilation (compilation from source) #15752

jeromeag opened this issue Apr 16, 2024 · 8 comments

Comments

@jeromeag
Copy link

Description

./configure --disable-vtysh
make

fails with:

  CC       lib/vty.lo
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:201:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  201 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ
lib/vty.c:201:27: note: each undeclared identifier is reported only once for each function it appears in
lib/vty.c: In function 'vty_event_serv':
lib/vty.c:3014:14: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
 3014 |         case VTYSH_READ:
      |              ^~~~~~~~~~
      |              VTY_READ
lib/vty.c:3015:14: error: 'VTYSH_WRITE' undeclared (first use in this function); did you mean 'VTY_WRITE'?
 3015 |         case VTYSH_WRITE:
      |              ^~~~~~~~~~~
      |              VTY_WRITE
lib/vty.c: In function 'vty_event':
lib/vty.c:3055:14: error: 'VTYSH_SERV' undeclared (first use in this function); did you mean 'VTY_SERV'?
 3055 |         case VTYSH_SERV:
      |              ^~~~~~~~~~
      |              VTY_SERV
lib/vty.c: At top level:
lib/vty.c:95:12: warning: 'vtysh_flush' used but never defined
   95 | static int vtysh_flush(struct vty *vty);
      |            ^~~~~~~~~~~
lib/vty.c:123:13: warning: 'integrate_default' defined but not used [-Wunused-variable]
  123 | static char integrate_default[] = SYSCONFDIR INTEGRATE_DEFAULT_CONFIG;
      |             ^~~~~~~~~~~~~~~~~

Version

commit f26a44f8d

How to reproduce

git clone  https://github.com/FRRouting/frr.git
cd frr
./bootstrap.sh
./configure --disable-vtysh
make

Expected behavior

Succesfull compilation

Actual behavior

Failed compilation

Additional context

No response

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@jeromeag jeromeag added the triage Needs further investigation label Apr 16, 2024
@ton31337 ton31337 added bug vtysh and removed triage Needs further investigation labels Apr 16, 2024
@donaldsharp
Copy link
Member

From my perspective vtysh is a required component. We should disable the ability to turn this off.
Can you give us an understanding of your actual use case here?

@jeromeag
Copy link
Author

For cyber security requirement, we may need to remove every binaries that are not drastically required from the package we deliver.
In our environment, we will never use the CLI. So strictly speaking, we do not need the VTY shell.

@mjstapp
Copy link
Contributor

mjstapp commented Apr 16, 2024

That's hard to understand (at least for me). If you ever reported a problem, the first things you'd be asked for would be show output, and debug output. At this time, it's pretty hard to imagine operating FRR without vtysh. You might choose not to deliver the vtysh binary with all of your deployments - but it's hard to understand building FRR without cli support.

@eqvinox
Copy link
Contributor

eqvinox commented Apr 16, 2024

binaries that are not drastically required from the package we deliver.
In our environment, we will never use the CLI. So strictly speaking, we do not need the VTY shell.

vtysh -b is used to load the configuration at startup. It is therefore "drastically"/"strictly speaking" required.

If you are currently using per-daemon configs (/etc/frr/zebra.conf), please refer to https://github.com/FRRouting/frr/blob/master/doc/accords/integrated-config-wins — support for these files is deprecated and will go away at some point.

@jeromeag
Copy link
Author

jeromeag commented Apr 16, 2024

I just pointed out a compilation configuration issue.
I naively thought that the configuration can entirely be loaded by other means (e.g. Netconf).

If this configure option is non sense, one way to fix the issue may be to simply remove the configure option.

@donaldsharp
Copy link
Member

Well working with FRR is beyond just loading config. Hence the questions from our side about how do you plan to debug/fix issues on the network when they arrive without vtysh? That is why we consider it integral. Frankly I'm not surprised that the configure option fails to work properly, although I personally am not going to be bothered to submit a fix to disable that command in configure, I would not be opposed to someone else doing the work.

@mjstapp
Copy link
Contributor

mjstapp commented Apr 17, 2024

It looks like the 'disable-vtysh' is used when cross-compiling, when the clippy tool is being built. That may be a construction of David L's - is it still necessary? or could we make changes to the 'clippy-only' path so that we could remove 'disable-vtysh' ?

@eqvinox
Copy link
Contributor

eqvinox commented Apr 21, 2024

It looks like the 'disable-vtysh' is used when cross-compiling, when the clippy tool is being built. That may be a construction of David L's - is it still necessary?

The construct as a whole is still necessary, autoconf can't build a host tool in the same "wash" as target binaries.

or could we make changes to the 'clippy-only' path so that we could remove 'disable-vtysh' ?

This can be done but would mean piling more hacks on top of hacks :( …

httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 2, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 2, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 5, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 5, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 9, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
httpstorm added a commit to httpstorm/openwrt.packages that referenced this issue May 12, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
1715173329 pushed a commit to openwrt/packages that referenced this issue May 28, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] #24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
mhusaam pushed a commit to mhusaam/packages that referenced this issue May 28, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
liudf0716 pushed a commit to liudf0716/packages that referenced this issue Jun 13, 2024
Fixes [1]
lib/vty.c: In function 'vty_mgmt_resume_response':
lib/vty.c:195:27: error: 'VTYSH_READ' undeclared (first use in this function); did you mean 'VTY_READ'?
  195 |                 vty_event(VTYSH_READ, vty);
      |                           ^~~~~~~~~~
      |                           VTY_READ

The error is a bug in frr: not all use cases of the VTYSH_* enums are
guarded by #ifdef VTYSH. These enums are enabled by the VTYSH macro,
which is defined if sub package frr-vtysh is enabled in menuconfig.
According to support ticket [2], building without frr-vtysh is
no longer supported.

[1] openwrt#24063
[2] FRRouting/frr#15752 (comment)

Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants