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

ARC toolchain comes with bison that fails to relocate with relocate-sdk.sh #17

Open
dezgeg opened this issue Aug 9, 2018 · 2 comments

Comments

@dezgeg
Copy link

dezgeg commented Aug 9, 2018

Both arcle-hs38--glibc--stable-2018.02-2 and arcle-hs38--glibc--bleeding-edge-2018.07-3 seem to come with a bison binary that is still looking in the original installation path for its internal files even after I've run relocate-sdk.sh:

+bison: /opt/arcle-hs38--glibc--stable-2018.02-2/share/bison/m4sugar/m4sugar.m4: cannot open: No such file or directory
+make[2]: *** [scripts/Makefile.lib:228: scripts/kconfig/zconf.tab.c] Error 1
+make[1]: *** [Makefile:492: tb100_defconfig] Error 2
+make: *** [Makefile:148: sub-make] Error 2

and

+bison: /opt/arcle-hs38--glibc--bleeding-edge-2018.07-3/share/bison/m4sugar/m4sugar.m4: cannot open: No such file or directory
+make[2]: *** [scripts/Makefile.lib:228: scripts/kconfig/zconf.tab.c] Error 1
+make[1]: *** [Makefile:492: nsim_hs38be_defconfig] Error 2
+make: *** [Makefile:148: sub-make] Error 2

As far as I can tell, the other toolchains that I tried didn't come with bison (or flex for that matter) at all. So just removing bison would 'fix' this and make the ARC toolchains consistent with the other toolchains.

@tpetazzoni
Copy link
Contributor

Thanks for your report! Indeed the host directory is currently "polluted" with various build utilities that are needed for the toolchain build, but not for using the toolchain. We should clean them up. I think we should use the package-file-list.txt file to keep only the files that are installed by the toolchain packages.

However, what you're pointing about Bison is a real Buildroot bug: a SDK with host-bison installed is not properly fixed after relocate-sdk.sh.

@dezgeg
Copy link
Author

dezgeg commented Aug 9, 2018

Thanks for your report! Indeed the host directory is currently "polluted" with various build utilities that are needed for the toolchain build, but not for using the toolchain. We should clean them up. I think we should use the package-file-list.txt file to keep only the files that are installed by the toolchain packages.

Yes, makes sense.

However, what you're pointing about Bison is a real Buildroot bug: a SDK with host-bison installed is not properly fixed after relocate-sdk.sh.

Ah, I wasn't sure to which extent Buildroot toolchains support relocation since it gets complicated quite fast... but in the case of Bison it would seem enough to replace the bison binary with a wrapper script that sets BISON_PKGDATADIR based on this in src/output.c:

char const *
pkgdatadir (void)
{
  char const *cp = getenv ("BISON_PKGDATADIR");
  return cp ? cp : PKGDATADIR;
}

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

No branches or pull requests

2 participants