Closed lucassardois closed 2 years ago
@MartinBrugnara can you please check?
Cannot reproduce, tested with sh, bash, zsh. It seams that the issue is not with sh.
@lucassardois could you please share your setup ?
I'm running the benchmark on a Debian 10 (Buster)
. Make version is GNU Make 4.2.1
build for x86_64-pc-linux-gnu
. In the Makefile
file, I also had to do some other changes. Here is the result of git diff Makefile
with branch V2
:
diff --git a/Makefile b/Makefile
index effc436..2f042db 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+SHELL := /bin/bash
+
help: ## Print this help message
@grep -E '^[a-zA-Z0-9$$()_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
@@ -12,10 +14,10 @@ init: ## boostrap experimental env
cd CONTROL && $(MAKE) .venv
@echo "Step 4 - Generating configuration template"
cd CONTROL && \
- mkdir -p runtime/{data,logs,samples,schemas} && \
+ mkdir -p runtime/data runtime/logs runtime/samples runtime/schemas && \
cp -v ../SHELLS/common/src/main/resources/tinkerpop-modern_mod.json runtime/data/ && \
source .venv/bin/activate && \
- python control.py generate-config \
+ python3 control.py generate-config \
--config conf.toml \
--runtime_dir ./runtime \
--dataset_dir ./runtime/data \
What was the issue with this line mkdir -p runtime/{data,logs,samples,schemas}
?
python vs python3, should not be necessary if the virtualenv was created correctly. Can you please check that it has indeed been created and with which python version?
source .venv/bin/activate ; python --version
* What was the issue with this line `mkdir -p runtime/{data,logs,samples,schemas}` ? * python vs python3, should not be necessary if the virtualenv was created correctly. Can you please check that it has indeed been created and with which python version? `source .venv/bin/activate ; python --version`
I did this because I had issues with the mkdir -p runtime/{data,logs,samples,schemas}
syntax not being supported by my shell. I'm going to revert my Makefile back to it's initial state it in order to debug more accurately other issues.
I had an issue with python picking the wrong dependencies but you are right source .venv/bin/activate ; python --version
return Python 3.7.3 so it should be working as is.
Cannot reproduce, tested with sh, bash, zsh. It seams that the issue is not with sh.
@lucassardois could you please share your setup ?
Just remove the SHELL := /bin/bash
line and now when I run make:
Step 4 - Generating configuration template
cd CONTROL && \
mkdir -p runtime/{data,logs,samples,schemas} && \
cp -v ../SHELLS/common/src/main/resources/tinkerpop-modern_mod.json runtime/data/ && \
source .venv/bin/activate && \
python control.py generate-config \
--config conf.toml \
--runtime_dir ./runtime \
--dataset_dir ./runtime/data \
--shell_dir ../SHELLS/dist
'../SHELLS/common/src/main/resources/tinkerpop-modern_mod.json' -> 'runtime/data/tinkerpop-modern_mod.json'
/bin/sh: 4: source: not found
make: *** [Makefile:14: init] Error 127
Virtualenv Perfect.
source
May this be related to https://stackoverflow.com/questions/13702425/source-command-not-found-in-sh-shell/13702876
** My sh
experiments above were actually falling back to GNU bash, version 3.2.57
.
Ok my /usr/bin/sh
was pointing to dash
(debian). Setting it to point to bash the original Makefile now works correctly. Thanks!
Makefile commands are runs in the default shell /bin/sh on my machine as defined in the Makefile documentation. Running inside this shell make the
source
command fail. To fix the Makefile (and run the benchmark) I had to add the following line inMakefile
andCONTROL/Makefile
: