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

Fix build with bison >= 3.7.5 #28

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Fix build with bison >= 3.7.5 #28

merged 1 commit into from
Mar 18, 2021

Conversation

foutrelis
Copy link
Contributor

@foutrelis foutrelis commented Mar 14, 2021

Fixes the following linker error:

/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'

@foutrelis foutrelis marked this pull request as draft March 17, 2021 14:17
The YYUSE macro was renamed to YY_USE in bison 3.7.5; we might as well
avoid using it altogether and cast the unused variable to void instead.

Fixes the following linker error:

/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'
@foutrelis foutrelis marked this pull request as ready for review March 17, 2021 14:41
@foutrelis foutrelis changed the title Replace YYUSE with attribute unused in src/parser.y Replace YYUSE call with void cast in src/parser.y Mar 17, 2021
@foutrelis foutrelis changed the title Replace YYUSE call with void cast in src/parser.y Fix build with bison >= 3.7.5 Mar 17, 2021
@foutrelis foutrelis requested a review from happyCoder92 March 17, 2021 23:47
@happyCoder92 happyCoder92 merged commit 32768d3 into google:master Mar 18, 2021
@happyCoder92
Copy link
Collaborator

Thanks for the fix! :)

@foutrelis foutrelis deleted the bison-3.7.5 branch March 18, 2021 08:55
picnoir added a commit to picnoir/nixpkgs that referenced this pull request Apr 23, 2021
The nsjail build has been broken since the 3.7.5 bison bump:

  /nix/store/(...)/bin/ld: kafel/libkafel.a(libkafel.o):
    in function `kafel_yyerror':
  arm_syscalls.c:(.text+0x6833): undefined reference to `YYUSE'

The issue is coming from kafel and has been fixed upstream. More infos
at: google/kafel#28.

Kafel being distributed through a git submodule in the nsjail repo, we
can't directly fetchpatch the fix from Github. We had to manually
modify the said patch to add a /kafel prefix.

We'll need to remove this patch for the next nsjail version bump.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants