Skip to content
Snippets Groups Projects
Commit e93d51e4 authored by Eric Müller's avatar Eric Müller :mountain_bicyclist:
Browse files

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
parent 6d977ef1
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
......@@ -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
......@@ -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' ' '
)"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment