From e93d51e4fde808cbd3089cb0f18dfb1e15a87d82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eric=20M=C3=BCller?= <mueller@kip.uni-heidelberg.de> Date: Thu, 9 Dec 2021 14:16:24 +0100 Subject: [PATCH] Fix ASIC build The code parts handling the addition of `gccxml` to the wafer views breaks the ASIC build (as there is no gccxml package and also no wafer support in general). Not sure how this ever worked before... (but didn't investigate :p) Change-Id: I4c612b727c4962442b21dde7e3460302c2056520 --- .ci/commons.sh | 37 ++++++------------------------- .ci/install_gocryptfs_as_root.sh | 3 ++- .ci/install_spack.sh | 13 +++++++---- .ci/visionary_spack_collection.sh | 26 ++++++++++++++++++++++ 4 files changed, 44 insertions(+), 35 deletions(-) diff --git a/.ci/commons.sh b/.ci/commons.sh index ef43c8c0..3c88a96a 100755 --- a/.ci/commons.sh +++ b/.ci/commons.sh @@ -203,6 +203,13 @@ get_pinned_deps() { # the version of dev tools we want in our view SPEC_VIEW_VISIONARY_DEV_TOOLS="visionary-dev-tools ^${DEPENDENCY_PYTHON3} $(get_pinned_deps dev) %${VISIONARY_GCC}" +# used in VIEWS section below but needs to be defined before sourcing +# associative array: spec to add -> view names seperated by spaces +declare -A spack_add_to_view +# associative array: spec to add -> "yes" for when dependencies should be added +# "no" otherwise +declare -A spack_add_to_view_with_dependencies + source "${SOURCE_DIR}/${CONTAINER_STYLE}_spack_collection.sh" # Control verbosity etc of commands @@ -232,36 +239,6 @@ spack_bootstrap_dependencies=( # Views are put under /opt/spack_views/visionary-xy # The app names are then just xy for smaller terminal lines. -# associative array: spec to add -> view names seperated by spaces -declare -A spack_add_to_view -# associative array: spec to add -> "yes" for when dependencies should be added -# "no" otherwise -declare -A spack_add_to_view_with_dependencies - -# Add gccxml to those views that still depend on it -spack_add_to_view_with_dependencies["gccxml"]="no" -spack_add_to_view["gccxml"]="$( -for view in visionary-wafer{,-nodev}; do - echo ${view} -done | tr '\n' ' ' -)" - -# all views get the default gcc except those in spack_views_no_default_gcc -# (defined above) -spack_add_to_view_with_dependencies["${VISIONARY_GCC}"]="no" -spack_add_to_view["${VISIONARY_GCC}"]="$( - for viewname in "${spack_views[@]+"${spack_views[@]}"}"; do - # check if the current view matches any view that does not get the - # default gcc - # Note: Currently this allow partial matches - if printf "%s\n" "${spack_views_no_default_gcc[@]+"${spack_views_no_default_gcc[@]}"}" \ - | grep -qF "${viewname}"; then - continue - fi - echo ${viewname} - done | tr '\n' ' ' -)" - # prevent readarray from being executed in pipe subshell reset_lastpipe=0 if ! shopt -q lastpipe; then diff --git a/.ci/install_gocryptfs_as_root.sh b/.ci/install_gocryptfs_as_root.sh index ef8d87fe..d14dfc2c 100755 --- a/.ci/install_gocryptfs_as_root.sh +++ b/.ci/install_gocryptfs_as_root.sh @@ -26,5 +26,6 @@ git clone "${GOCRYPTFS_REPO}" "${GOCRYPTFS_INSTALL_PATH}" pushd "${GOCRYPTFS_INSTALL_PATH}" # build and install -./build.bash +#./build.bash +./build-without-openssl.bash popd diff --git a/.ci/install_spack.sh b/.ci/install_spack.sh index daf8a7de..ac555e0c 100755 --- a/.ci/install_spack.sh +++ b/.ci/install_spack.sh @@ -55,11 +55,14 @@ source ${SPACK_INSTALL_SCRIPTS}/${CONTAINER_STYLE}_spack_custom_view.sh populate_views # Hide python3 in ancient (python2-based) views: -# The host system provides a python3 binary which spack prefers over the -# view-provided python2 binary. Since we set PYTHONHOME this leads to +# The host system might provide a python3 binary which spack will prefer over +# the view-provided python2 binary. Since we set PYTHONHOME this leads to # incompatible python libraries search paths. for pyf in ${MY_SPACK_VIEW_PREFIX}/visionary-*/bin/python2; do - ln -fs ${pyf} "$(dirname ${pyf})/python3" + # ignore views w/o python2 + if [ -f ${pyf} ]; then + ln -fs ${pyf} "$(dirname ${pyf})/python3" + fi done umask ${OLD_UMASK} @@ -69,4 +72,6 @@ umask ${OLD_UMASK} # $ singularity shell -s /opt/shell/${SHELL} /containers/stable/latest # which is independent of any app. Especially, this allows custom loading of # modules within the container. -ln -s "$(${MY_SPACK_BIN} location -i zsh)/bin/zsh" /opt/shell/zsh +if ${MY_SPACK_BIN} location -i zsh; then + ln -s "$(${MY_SPACK_BIN} location -i zsh)/bin/zsh" /opt/shell/zsh +fi diff --git a/.ci/visionary_spack_collection.sh b/.ci/visionary_spack_collection.sh index 3204aae8..7eab14af 100644 --- a/.ci/visionary_spack_collection.sh +++ b/.ci/visionary_spack_collection.sh @@ -41,3 +41,29 @@ spack_gid="nogroup" spack_create_user_cmd() { adduser spack --uid 888 --no-create-home --home /opt/spack --disabled-password --system --shell /bin/bash } + +# gccxml is added without dependencies to avoid introducing a second gcc +spack_add_to_view_with_dependencies["gccxml"]="no" + +# all views get the default gcc except those in spack_views_no_default_gcc +# (defined above) +spack_add_to_view_with_dependencies["${VISIONARY_GCC}"]="no" +spack_add_to_view["${VISIONARY_GCC}"]="$( + for viewname in "${spack_views[@]+"${spack_views[@]}"}"; do + # check if the current view matches any view that does not get the + # default gcc + # Note: Currently this allow partial matches + if printf "%s\n" "${spack_views_no_default_gcc[@]+"${spack_views_no_default_gcc[@]}"}" \ + | grep -qF "${viewname}"; then + continue + fi + echo ${viewname} + done | tr '\n' ' ' +)" + +# Add gccxml to those views that still depend on it +spack_add_to_view["gccxml"]="$( +for view in visionary-wafer{,-nodev}; do + echo ${view} +done | tr '\n' ' ' +)" -- GitLab