-
Notifications
You must be signed in to change notification settings - Fork 171
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
Setup local env fails #1375
Comments
That is because some lua deps have The proper fix should be done in the lua deps repos, replacing
That should do it |
thanks @eguzki ! It does get me further, but now it fails with this...
|
Actually, my hint about the git configuration is not needed, because the Makefile already does that for us (target translate_git_protocol called as dependecy of the target The error is about trying to load a dependecy that is not found Which commitID of the master branch are you working on? Try to run |
Ok, this is something related to macos. We will fix that. |
@eguzki great, many thanks! can you please ping me once this is available? |
unfortunate I don't understand the issue (yet), but is there anything I can help with? |
I am waiting to have one macOS so I can dig into the issue. Some lua library is not being installed and the lua manager, rover, does not check when a dep is not found and when accessing the name, it crashes. That's all I can say until I can reproduce in a macOS and figure out which dep is not being found and why |
@eguzki maybe I can help you with some more details? just let me know what information you require and I'm happy to reproduce and provide it. |
I did some investigation on this today. Here are a couple changes to workaround the issues reported (until a proper fix is sent). 1. "Connection refused"To avoid Error:
Fix: diff --git a/Makefile b/Makefile
index dc8a667d..d1586798 100644
--- a/Makefile
+++ b/Makefile
@@ -216,7 +216,7 @@ $(GATEWAY_CONTEXT)/Roverfile.lock : $(GATEWAY_CONTEXT)/Roverfile $(GATEWAY_CONTE
translate_git_protocol:
@git config --global url.https://github.com/.insteadOf git:https://github.com/
-lua_modules: $(ROVER) $(GATEWAY_CONTEXT)/Roverfile.lock translate_git_protocol
+lua_modules: $(ROVER) translate_git_protocol $(GATEWAY_CONTEXT)/Roverfile.lock
# This variable is to skip issues with openssl 1.1.1
# https://github.com/wahern/luaossl/issues/175
EXTRA_CFLAGS="-DHAVE_EVP_KDF_CTX=1" $(ROVER) install --roverfile=$(GATEWAY_CONTEXT)/Roverfile > /dev/null 2. "Rockspec format 3.0 not supported" (lua-resty-jwt v0.2.3) – the root cause of the last issue reported by @imodTo avoid Error:
Fix: diff --git a/gateway/apicast-scm-1.rockspec b/gateway/apicast-scm-1.rockspec
index bac8c66a..bc7999e0 100644
--- a/gateway/apicast-scm-1.rockspec
+++ b/gateway/apicast-scm-1.rockspec
@@ -14,7 +14,7 @@ dependencies = {
'inspect',
'lyaml',
'router',
- 'lua-resty-jwt',
+ 'lua-resty-jwt == 0.2.0',
'lua-resty-url',
'lua-resty-env',
'lua-resty-execvp', 3. "Could not find header file for PCRE" (jsonschema v0.9.8)To avoid Error:
Fix: diff --git a/gateway/Roverfile b/gateway/Roverfile
index a331fe06..b0f16e93 100644
--- a/gateway/Roverfile
+++ b/gateway/Roverfile
@@ -9,7 +9,7 @@ luarocks {
group 'testing' {
module { 'busted' },
module { 'luacov' },
- module { 'jsonschema' },
+ module { 'jsonschema', '0.8' },
},
group 'development' { I have tested the above on macOS with M1 chip and the fixes make After applying all the 3 fixes above and running
In time: I also observed the following error when trying to compile luaossl at one of my attempts:
Exiting the container and running |
I have run on Linux with your fixes (in details), but unfortunately I have the issue
I cannot solve the issue running iff --git a/Makefile b/Makefile
index dc8a667d..d1586798 100644
--- a/Makefile
+++ b/Makefile
@@ -216,7 +216,7 @@ $(GATEWAY_CONTEXT)/Roverfile.lock : $(GATEWAY_CONTEXT)/Roverfile $(GATEWAY_CONTE
translate_git_protocol:
@git config --global url.https://github.com/.insteadOf git:https://github.com/
-lua_modules: $(ROVER) $(GATEWAY_CONTEXT)/Roverfile.lock translate_git_protocol
+lua_modules: $(ROVER) translate_git_protocol $(GATEWAY_CONTEXT)/Roverfile.lock
# This variable is to skip issues with openssl 1.1.1
# https://github.com/wahern/luaossl/issues/175
EXTRA_CFLAGS="-DHAVE_EVP_KDF_CTX=1" $(ROVER) install --roverfile=$(GATEWAY_CONTEXT)/Roverfile > /dev/null
diff --git a/gateway/Roverfile b/gateway/Roverfile
index a331fe06..b0f16e93 100644
--- a/gateway/Roverfile
+++ b/gateway/Roverfile
@@ -9,7 +9,7 @@ luarocks {
group 'testing' {
module { 'busted' },
module { 'luacov' },
- module { 'jsonschema' },
+ module { 'jsonschema', '0.8' },
},
group 'development' {
diff --git a/gateway/Roverfile.lock b/gateway/Roverfile.lock
index 055ca7a6..72e914f6 100644
--- a/gateway/Roverfile.lock
+++ b/gateway/Roverfile.lock
@@ -1,40 +1,40 @@
-argparse 0.6.0-1||production
-busted 2.0.rc12-1||testing
+argparse 0.7.1-1||production
basexx 0.4.1-1||development
binaryheap 0.4-1||development
-bit32 5.3.0-1||development
-compat53 0.7-1||development
-cqueues 20190813.51-0||development
-dkjson 2.5-2||testing
+bit32 5.3.5.1-1||development
+busted 2.1.1-1||testing
+compat53 0.8-1||development
+cqueues 20200726.51-0||development
+date 2.2-2||production
+dkjson 2.6-1||testing
fifo 0.2-0||development
-http 0.3-0||development
-inspect 3.1.1-0||production
+http 0.4-0||development
+inspect 3.1.3-0||production
+jsonschema 0.8-0|c1d72d86bb3dc5b33da57d47febc47657d29ea74|testing
ldoc 1.4.6-2||development
-date 2.2-2||production
liquid 0.2.0-2||production
-jsonschema 0.8-0|aa4740624cca4c10585bd7d086b42aa0b9ab14fa|testing
lpeg 1.0.2-1||development
lpeg_patterns 0.5-0||development
lua-resty-env 0.4.0-1||production
lua-resty-execvp 0.1.1-1||production
-lua-resty-http 0.15-0||production
-lua-resty-iputils 0.3.0-1||production
+lua-resty-http 0.17.0.beta.1-0||production
+lua-resty-iputils 0.3.0-2||production
lua-resty-jit-uuid 0.0.7-2||production
lua-resty-jwt 0.2.0-0||production
lua-resty-repl 0.0.6-0|3878f41b7e8f97b1c96919db19dbee9496569dda|development
lua-resty-url 0.3.5-1||production
lua-term 0.7-1||testing
lua_cliargs 3.0-2||testing
-luacov 0.13.0-1||testing
-luafilesystem 1.7.0-2||production,development,testing
-luaossl 20190731-0||development
-luassert 1.8.0-0||testing
+luacov 0.15.0-1||testing
+luafilesystem 1.8.0-1||testing,production,development
+luaossl 20220711-0||development
+luassert 1.9.0-1||testing
luasystem 0.2.1-0||testing
-lyaml 6.2.4-1||production
+lyaml 6.2.7-1||production
markdown 0.33-1||development
mediator_lua 1.1.2-0||testing
-net-url 0.9-1||testing
-nginx-lua-prometheus 0.20181120-3||production
-penlight 1.7.0-1||production,development,testing
+net-url 1.1-1||testing
+nginx-lua-prometheus 0.20220527-1||production
+penlight 1.13.1-1||testing,production,development
router 2.1-0||production
-say 1.3-1||testing
+say 1.4.1-3||testing
\ No newline at end of file
diff --git a/gateway/apicast-scm-1.rockspec b/gateway/apicast-scm-1.rockspec
index bac8c66a..bc7999e0 100644
--- a/gateway/apicast-scm-1.rockspec
+++ b/gateway/apicast-scm-1.rockspec
@@ -14,7 +14,7 @@ dependencies = {
'inspect',
'lyaml',
'router',
- 'lua-resty-jwt',
+ 'lua-resty-jwt == 0.2.0',
'lua-resty-url',
'lua-resty-env',
'lua-resty-execvp', |
@eguzki, you're right. This is caused by the It is not a Linux nor macOS specific issue, but triggered whenever trying to compile this version of the module on any system with OpenSSL 1.1.1 while setting The root cause is this fix of ours, combined with this requirement from luaossl 20220711 and the fact that OpenSSL 1.1.1 does not include the I have tried a few things to workaround this issue without bumping to OpenSSL 3.x or having to rebuild the devel image in my local machine, but nothing worked given other constraints. I'll try a different approach tomorrow. |
Hi @imod, Thanks to the great job from @guicassolato , the fix for aarch64 hosts was recently merged to Let us know if you can setup the local environment |
Thanks @eguzki and @guicassolato - I just tried to setup my local environment and so far everything seems to be working fine! |
Hi,
I'm trying to setup a local environment to develop a custom policy, but I fail to get APIcast up and running as described...
Version
master
branchSteps To Reproduce
git clone [email protected]:3scale/APIcast.git
cd APIcast
make development
make dependencies
--> failsCurrent Result
Additional Information
git
(ssh and https) andcurl
(https)The text was updated successfully, but these errors were encountered: