-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
chore: fix 'make deps' #3472
chore: fix 'make deps' #3472
Conversation
Signed-off-by: yiyiyimu <[email protected]>
Makefile
Outdated
@@ -55,7 +55,9 @@ help: default | |||
.PHONY: deps | |||
deps: default | |||
ifeq ($(LUAROCKS_VER),luarocks 3.) | |||
ifeq ("$(wildcard ~/.luarocks)", "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think calling mkdir ~/.luarocks
even it exists doesn't do any harm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would leave an error message, which confused me at first before I realize it does no harm and what I missed is sudo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Yiyiyimu
I think you are making something wrong. The make deps
only install dependencies locally. There is no need to call sudo
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it I installed luarocks with apt
, so when it changes luarocks config, it needs sudo privilege. I'll change to the method mentioned in #3467 and see if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use mkdir -p ~/.luarocks
would be better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that would be better! Thanks!
And I made a mistake yesterday. No matter how we install luarocks, the config would always write to /usr/local/etc/luarocks
, so we all need sudo permission. Is that the same on your side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about:
deps: default
ifeq ($(LUAROCKS_VER),luarocks 3.)
mkdir ~/.luarocks || true
- luarocks config variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
+ luarocks config --local variables.OPENSSL_LIBDIR $(addprefix $(OR_PREFIX), openssl/lib)
luarocks config variables.OPENSSL_INCDIR $(addprefix $(OR_PREFIX), openssl/include)
luarocks install rockspec/apisix-master-0.rockspec --tree=deps --only-deps --local
else
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's weird... I installed lua5.3 and configure luarocks to it this morning to do some stuff, and found out it changes some config that even though I re-configure luarocks to luajit from openresty, it still tries to find lua5.3.
So I remove everything about luarocks, and re-install it with the script. Now this time, it would write config to ~/.luarocks
without the --local
flag.
I'm not so sure right now. If you could not reproduce this problem, I'll close it
Signed-off-by: yiyiyimu <[email protected]>
Signed-off-by: yiyiyimu <[email protected]>
Fixed in v2.3 #3466. Closed. |
Signed-off-by: yiyiyimu [email protected]
What this PR does / why we need it:
related to #3415
Pre-submission checklist: