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

XRT default setup.sh can cause buildroot failure for CWD in LD_LIBRARY_PATH #240

Open
timsnyder-siv opened this issue May 25, 2022 · 1 comment

Comments

@timsnyder-siv
Copy link
Contributor

When one uses XRT for Alveo support, the default setup.sh will put a trailing colon in LD_LIBRARY_PATH and then buildroot/support/dependencies/dependencies.sh will think that CWD is in LD_LIBRARY_PATH.

2022-05-25 19:32:39,136 [run         ] [DEBUG]  #
2022-05-25 19:32:39,136 [run         ] [DEBUG]  # configuration written to /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/.config
2022-05-25 19:32:39,136 [run         ] [DEBUG]  #
2022-05-25 19:32:39,420 [run         ] [DEBUG]  Running: "make clean" in /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/firechip/distros/br/buildroot
2022-05-25 19:32:47,868 [run         ] [DEBUG]  rm -rf /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/target /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/images /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/host  \
2022-05-25 19:32:47,869 [run         ] [DEBUG]  /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/staging \
2022-05-25 19:32:47,869 [run         ] [DEBUG]  /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/legal-info /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/graphs
2022-05-25 19:32:47,940 [run         ] [DEBUG]  Running: "make" in /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/firechip/distros/br/buildroot
2022-05-25 19:32:55,973 [run         ] [DEBUG]  /opt/conda/envs/firesim/bin/make -j1 O=/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output HOSTCC="/opt/conda/envs/firesim/bin/gcc" HOSTCXX="/opt/conda/envs/firesim/bin/g++" syncconfig
2022-05-25 19:32:56,256 [run         ] [DEBUG]  mkdir -p /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/lxdialog
2022-05-25 19:32:56,258 [run         ] [DEBUG]  PKG_CONFIG_PATH="" /opt/conda/envs/firesim/bin/make CC="/opt/conda/envs/firesim/bin/gcc" HOSTCC="/opt/conda/envs/firesim/bin/gcc" \
2022-05-25 19:32:56,258 [run         ] [DEBUG]  obj=/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config -C support/kconfig -f Makefile.br conf
2022-05-25 19:32:56,361 [run         ] [DEBUG]  /opt/conda/envs/firesim/bin/gcc -D_GNU_SOURCE -I/opt/conda/envs/firesim/include/ncursesw -I/opt/conda/envs/firesim/include -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config -DCONFIG_=\"\"  -MM *.c > /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/.depend 2>/dev/null || :
2022-05-25 19:32:56,733 [run         ] [DEBUG]  /opt/conda/envs/firesim/bin/gcc -D_GNU_SOURCE -I/opt/conda/envs/firesim/include/ncursesw -I/opt/conda/envs/firesim/include -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config -DCONFIG_=\"\"   -c conf.c -o /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/conf.o
2022-05-25 19:32:56,923 [run         ] [DEBUG]  /opt/conda/envs/firesim/bin/gcc -D_GNU_SOURCE -I/opt/conda/envs/firesim/include/ncursesw -I/opt/conda/envs/firesim/include -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config -DCONFIG_=\"\"  -I. -c /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/zconf.tab.c -o /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/zconf.tab.o
2022-05-25 19:32:57,626 [run         ] [DEBUG]  /opt/conda/envs/firesim/bin/gcc -D_GNU_SOURCE -I/opt/conda/envs/firesim/include/ncursesw -I/opt/conda/envs/firesim/include -DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1 -DLOCALE  -I/home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config -DCONFIG_=\"\"   /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/conf.o /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/zconf.tab.o  -o /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/conf
2022-05-25 19:32:57,672 [run         ] [DEBUG]  rm /home/azureuser/firesim/target-design/chipyard/software/firemarshal/boards/default/distros/br/buildroot/output/build/buildroot-config/zconf.tab.c
2022-05-25 19:32:58,013 [run         ] [DEBUG]  
2022-05-25 19:32:58,014 [run         ] [DEBUG]  You seem to have the current working directory in your
2022-05-25 19:32:58,014 [run         ] [DEBUG]  LD_LIBRARY_PATH environment variable. This doesn't work.
2022-05-25 19:32:58,014 [run         ] [DEBUG]  make[1]: *** [support/dependencies/dependencies.mk:27: dependencies] Error 1
2022-05-25 19:32:58,034 [run         ] [DEBUG]  make: *** [Makefile:84: _all] Error 2
2022-05-25 19:32:58,036 [main        ] [ERROR]  Failed to build workload br-base.json

To work around this, I removed the trailing colon. I'm going to report this against xilinx/XRT as well because their setup.csh script checks for the existence of LD_LIBRARY_PATH so that the trailing colon isn't added if it isn't yet defined.

marshal might want to check for leading or trailing colon on LD_LIBRARY_PATH and provide a better error message or fix it on the fly.

@timsnyder-siv
Copy link
Contributor Author

Filed Xilinx/XRT#6738 and they quickly responded with a PR.

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

1 participant