20230512Z Pulling docker image from git.broccolimicro and building from local Dockerfile both fail. Following README $ docker pull git.broccolimicro.io/broccoli/broccoli-cli:latest [...] 56429ff5a91d: Download complete 6540afa3cf1d: Downloading ce826760c54c: Download complete 029082f86153: Download complete received unexpected HTTP status: 500 Internal Server Error Running bcli up command directly $ docker run -d -v $HOME:/host --rm --name "bcli-develop" -h "bcli-develop" -e USER=$USER -e USER_ID=$(id -u) -e GROUP_ID=$(id -g) -e DISPLAY=$DISPLAY -v "/tmp/.X11-unix:/tmp/.X11-unix:rw" git.broccolimicro.io/b\ roccoli/broccoli-cli:latest > /dev/null [...] 029269996d20: Retrying in 2 seconds 6540afa3cf1d: Retrying in 2 seconds 029269996d20: Retrying in 1 second 6540afa3cf1d: Retrying in 1 second 029269996d20: Downloading 6540afa3cf1d: Downloading docker: received unexpected HTTP status: 500 Internal Server Error. See 'docker run --help'. Building image from Dockerfile $ docker build -t bcli-official . [...] *** *** WARNING: There were no packages configured so no libraries or tests/examples will be built! *** Set up for creating a distribution ... Finished configuring Trilinos! -- If publishing results using Trilinos, please cite us: https://trilinos.github.io/cite.html -- Configuring incomplete, errors occurred! See also "/toolsrc/Trilinos/build/CMakeFiles/CMakeOutput.log". See also "/toolsrc/Trilinos/build/CMakeFiles/CMakeError.log". The command '/bin/sh -c cmake -D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpic++ -D CMAKE_Fortran_COMPILER=mpif77 -D CMAKE_INSTALL_PREFIX="/opt/trilinos" -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" -D AMD_LIBRARY_DIRS="/usr/lib" -D MPI_BASE_DIR="/usr" -C /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake /toolsrc/Trilinos' returned a non-zero code: 1 Error appears to be with Trilinos build. docker run , and executing cmake command in /toolsrc/Trilinos, reports: root@bcli-develop:/toolsrc/Trilinos# cmake -D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpic++ -D CMAKE_Fortran_COMPILER=mpif77 -D CMAKE_INSTALL_PREFIX="/opt/trilinos" -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" -D AMD_LIBRARY_DIRS="/usr/lib" -D MPI_BASE_DIR="/usr" -C /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake /toolsrc/Trilinos loading initial cache file /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake CMake Error: Error processing file: /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake Configuring Trilinos build directory CMake Error at cmake/tribits/core/package_arch/TribitsGlobalMacros.cmake:110 (message): ERROR! CMAKE_CURRENT_SOURCE_DIR=/toolsrc/Trilinos == CMAKE_CURRENT_BINARY_DIR=/toolsrc/Trilinos Trilinos does not support in source builds! NOTE: You must now delete the CMakeCache.txt file and the CMakeFiles/ directory under the source directory for Trilinos or you will not be able to configure Trilinos correctly! You must now run something like: $ cd /toolsrc/Trilinos/ $ rm -r CMakeCache.txt CMakeFiles/ Please create a different directory and configure Trilinos under that such as: $ cd /toolsrc/Trilinos/ $ mkdir MY_BUILD $ cd MY_BUILD $ cmake [OPTIONS] .. Call Stack (most recent call first): cmake/tribits/core/package_arch/TribitsProjectImpl.cmake:93 (tribits_assert_and_setup_project_and_static_system_vars) cmake/tribits/core/package_arch/TribitsProject.cmake:92 (tribits_project_impl) CMakeLists.txt:109 (TRIBITS_PROJECT) -- Configuring incomplete, errors occurred! See also "/toolsrc/Trilinos/CMakeFiles/CMakeOutput.log". Created MY_BUILD directory, re-ran build command, errored. In CMakeFiles/CMakeError.log, encountered isnan error, see: https://stackoverflow.com/questions/44614297/trouble-building-trilininos-using-cmake Added build flags disabling ISNAN: cmake -D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpic++ -D CMAKE_Fortran_COMPILER=mpif77 -D CMAKE_INSTALL_PREFIX="/opt/trilinos" -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" -D AMD_LIBRARY_DIRS="/usr/lib" -D MPI_BASE_DIR="/usr" -D FINITE_VALUE_HAVE_GLOBAL_ISNAN=OFF -D FINITE_VALUE_HAVE_GLOBAL_ISINF=OFF -C /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake /toolsrc/Trilinos No change. There is no file /toolsrc/Xyce/cmake/trilinos/trilinos-config-MPI.cmake. root@bcli-develop:/toolsrc/Trilinos/MY_BUILD# ls /toolsrc/Xyce/cmake/trilinos/ AMD trilinos-MPI-base.cmake trilinos-MPI-beta.cmake trilinos-base.cmake trilinos-beta.cmake Removing the -C flag configures successfully, but without any packages being configured. All Xyce .cmake files report success, with no packages configured. Passing a non-existent file produces the ISNAN error. Test: Removing -C config flag from Dockerfile. Result: Trilinos builds New error: Step 25/115 : RUN cmake -D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpic++ -D CMAKE_Fortran_COMPILER=mpif77 -D CMAKE_INSTALL_PREFIX="/opt/trilinos" -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" -D AMD_LIBRARY_DIRS="/usr/lib" -D MPI_BASE_DIR="/usr" RUN cmake --build . -j 16 -t install ---> Running in 991c67f15adf CMake Error: Unknown argument -t CMake Error: Run 'cmake --help' for all supported options. The command '/bin/sh -c cmake -D CMAKE_C_COMPILER=mpicc -D CMAKE_CXX_COMPILER=mpic++ -D CMAKE_Fortran_COMPILER=mpif77 -D CMAKE_INSTALL_PREFIX="/opt/trilinos" -D TPL_AMD_INCLUDE_DIRS="/usr/include/suitesparse" -D AMD_LIBRARY_DIRS="/usr/lib" -D MPI_BASE_DIR="/usr" RUN cmake --build . -j 16 -t install' returned a non-zero code: 1 Per man page: -t ..., --target ... Build instead of the default target. Multiple targets may be given, separated by spaces. Test: changing -t to --target Result: Same error. Trailing "\" in <-D MPI_BASE_DIR="/usr" \> was causing the next RUN command to be appended. Removed trailing "\", lack of config file caused no packages for Trilinos to be built, causing later error. Test: substitute with -C /toolsrc/Xyce/cmake/trilinos/trilinos-MPI-base.cmake \ Result: Multi-hour build time, ctrl-c at 69%. On April 10, the Xyce Trilinos config files were re-organized, obsoleting and introducing base and beta, MPI and non, config files: https://github.com/Xyce/Xyce/commit/cf552df48ea2539c9d02e494d627aa135605b7b8 The last commit with the expected file structure is https://github.com/Xyce/Xyce/blob/d5a8c1e9317fed2172879d769242f3b4fec54668/cmake/trilinos/trilinos-config-MPI.cmake Test: Replace with to clone the tag-specified version 7.6, which is both the latest official release, yet predates the directory restructuring. https://github.com/Xyce/Xyce/releases/tag/Release-7.6.0 Directory structure at time of release. https://github.com/Xyce/Xyce/tree/046a561ee2db376cf459edaeb8b6b67563da980d/cmake/trilinos https://stackoverflow.com/questions/45241502/how-can-i-git-clone-a-specific-release Result: Computer appears to have logged out and terminated running programs; docker build possibly continuing in the background. Test: Try again. Result: Success. Build proceded to 44/116, failing on 45. Error: Step 45/116 : RUN git clone https://www.tpope.io/vim/fugitive.git /template/.vim/pack/plugins/start/fugitive ---> Running in 857c7eb5090c Cloning into '/template/.vim/pack/plugins/start/fugitive'... fatal: unable to access 'https://www.tpope.io/vim/fugitive.git/': Could not resolve host: www.tpope.io The command '/bin/sh -c git clone https://www.tpope.io/vim/fugitive.git /template/.vim/pack/plugins/start/fugitive' returned a non-zero code: 128 redirects to Test: Replace url accordingly. Result: Success. Later step emitted a warning, produced due to building in a screen terminal; build continued. Error: 50/116 uses --mount, requires BuildKit. Resolution: https://docs.docker.com/build/buildkit/ To set the BuildKit environment variable when running the docker build command, run: DOCKER_BUILDKIT=1 docker build . Command modified to Result: Rebuilding from the top, presumably for caching. Error: 39/79, no user or secret files found, authentication to git.broccolimicro.io failed. Test: https://docs.docker.com/engine/reference/commandline/secret_create/ sudo docker swarm init Store user and token in repsective files, add to docker secrets via sudo docker secret create sudo docker secret create user jtore-user sudo docker secret create token jtorre-docker-token Result: failed to cat Test: https://stackoverflow.com/questions/66446874/right-way-to-use-secret-flag-in-docker-buildkit Result: Secrets found, 39/79 passed. Error: => ERROR [56/79] RUN make all ------ > [56/79] RUN make all: #65 0.328 make: *** No rule to make target 'all'. Stop. ------ executor failed running [/bin/sh -c make all]: exit code: 2 Source: # install actsim WORKDIR /toolsrc RUN git clone https://github.com/asyncvlsi/actsim.git WORKDIR actsim RUN ./configure WORKDIR ext RUN make all WORKDIR .. RUN ./grab_xyce.sh /toolsrc/Xyce/build RUN make CXX=mpic++ CC=mpicc install Test: ### Build and Installation This program is for use with [the ACT toolkit](https://github.com/asyncvlsi/act). * Please install the ACT toolkit first; installation instructions are [here](https://github.com/asyncvlsi/act/blob/master/README.md). * Also install the ACT [standard library](https://github.com/asyncvlsi/stdlib). * Build this program using the standard ACT tool install instructions [here](https://github.com/asyncvlsi/act/blob/master/README_tool.md). To build, run `./configure` and then `./build.sh` and `make install`. Reorder build commands: # install actsim WORKDIR /toolsrc RUN git clone https://github.com/asyncvlsi/actsim.git WORKDIR actsim RUN ./configure RUN ./grab_xyce.sh /toolsrc/Xyce/build #WORKDIR ext RUN ./build.sh #RUN make all #WORKDIR .. #RUN ./grab_xyce.sh /toolsrc/Xyce/build RUN make CXX=mpic++ CC=mpicc install Result: Build advances to "building actsim" Error: In file included from /opt/cad/include/N_CIR_Xyce.h:51, #66 12.08 from /opt/cad/include/N_CIR_GenCouplingSimulator.h:45, #66 12.08 from xycesim.cc:33: #66 12.08 /opt/cad/include/N_PDS_fwd.h:40:10: fatal error: mpi.h: No such file or directory #66 12.08 40 | #include #66 12.08 | ^~~~~~~ #66 12.08 compilation terminated. #66 12.08 make: *** [/opt/cad/scripts/Makefile.std:275: xycesim.o] Error 1 ------ executor failed running [/bin/sh -c ./build.sh]: exit code: 2 Investigation: build.sh calls as included in Makefile from $ACT_HOME/scripts/Makefile.std In Makefile.std: 274: .cc.o: 275: $(CXX) -c $(CFLAGS) $(DFLAGS) -std=$(CPPSTD) $< Per https://stackoverflow.com/questions/66034609/fatal-error-mpi-h-no-such-file-or-directory is not being passed to make. Test: add prior to Result: Same point of failure. 20230513Z Test: Fork https://github.com/asyncvlsi/actsim.git, modify build.sh to include CXX=mpic++ CC=mpicc Result: Same failure. Test: Fork https://www.github.com/asyncvlsi/act.git, modify Makefile.std include CXX=mpic++ CC=mpicc Result: Build passes. Test (Possible Refinement): Keep intra-Makefile.std parameters, export and under <# install actsim>, to provide mpicc and mpic++ to act's Makefile.std. Result: Reversion, mpi.h not found error. Returning to jpt4/act fork with hardcoded compiler names. TODO: Determine means of preserving parametricity of act/scripts/Makefile.std. 57/79, actsim/build.sh passes. Error: [74/79] RUN cp prdbase prspice /opt/cad/bin 0.5s => [75/79] RUN --mount=type=secret,id=user --mount=type=secret,id=token git clone https://$(cat /run/sec 1.9s => ERROR [76/79] RUN cp pr/* /opt/cad/bin 0.5s ------ > [76/79] RUN cp pr/* /opt/cad/bin: #85 0.426 cp: -r not specified; omitting directory 'pr/chp' Test: Result: 76/79 passes All stages pass, image built. 20230514Z bcli2-develop.sh Change sshfs @git.broccolimicro.io to @nedbingham.com sudo before all docker commands bcli2 up runs bcli-local Docker image Error: Permission denied accessing $HOME/tech. No sudo, so cannot force access. Attempting sshfs mount on host machine reports fusermount3 as access denied, need sudo to bypass. Test: Re-install fusermount3 as setuid root. https://guix.gnu.org/manual/en/html_node/Setuid-Programs.html Setuid relative to /gnu/store core path: https://www.reddit.com/r/GUIX/comments/ydoqbo/comment/itwpdl3/?utm_source=reddit&utm_medium=web2x&context=3 Result: docker and sshfs no longer require sudo, /tech no longer mounted as root.