You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by "big-r81 (via GitHub)" <gi...@apache.org> on 2025/08/22 18:24:42 UTC
[PR] dev: support multiarch names (Debian based systems) [couchdb]
big-r81 opened a new pull request, #5626:
URL: https://github.com/apache/couchdb/pull/5626
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2343033954
##########
configure:
##########
@@ -327,6 +328,7 @@ if [ "${WITH_SPIDERMONKEY}" = "true" ] && [ "${ERLANG_OS}" = "unix" ]; then
# This list is taken from src/couch/rebar.config.script, please keep them in sync.
if [ ! -d "/usr/include/${SM_HEADERS}" ] && \
+ [ ! -d "/usr/include/${MULTIARCH_NAME}" ] && \
Review Comment:
Oh good catch, I will look into the debian image for the correct path. Interesting that this worked. It seems that the compiler then searches the directories recursively.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2342144099
##########
src/couch/rebar.config.script:
##########
@@ -151,6 +151,25 @@ ProperConfig = case code:lib_dir(proper) of
_ -> [{d, 'WITH_PROPER'}]
end.
+DpkgArchitectureCmd = "dpkg-architecture -q DEB_HOST_MULTIARCH".
+GenericMozJSIncludePaths = "-I/usr/include/mozjs-" ++ SMVsn ++ " -I/usr/local/include/mozjs-" ++ SMVsn.
+GenericMozJSLibPaths = "-L/usr/local/lib -L/opt/homebrew/lib".
+
+WithDpkgArchitecture = case os:find_executable("dpkg-architecture") of
+ false -> false;
+ _ -> true
+end.
+
+MozJSIncludePath = case WithDpkgArchitecture of
+ false -> GenericMozJSIncludePaths;
+ true -> GenericMozJSIncludePaths ++ " -I/usr/include/" ++ string:strip(os:cmd(DpkgArchitectureCmd), right, $\n) ++ "/mozjs-" ++ SMVsn
Review Comment:
strip is deprecated, use string:trim instead
```
string:trim("\n foo \t \n") -> "foo"
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 merged PR #5626:
URL: https://github.com/apache/couchdb/pull/5626
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "pgj (via GitHub)" <gi...@apache.org>.
pgj commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2349295064
##########
configure:
##########
@@ -46,6 +46,7 @@ CLOUSEAU_URI=${CLOUSEAU_URI:-"https://github.com/cloudant-labs/clouseau/releases
CLOUSEAU_VSN=${CLOUSEAU_VSN:-"2.25.0"}
CLOUSEAU_DIR="$(pwd)"/clouseau
ARCH="$(uname -m)"
+MULTIARCH_NAME="$(dpkg-architecture -q DEB_HOST_MULTIARCH || true)"
Review Comment:
Oh, `true`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2342154197
##########
configure:
##########
@@ -327,6 +328,7 @@ if [ "${WITH_SPIDERMONKEY}" = "true" ] && [ "${ERLANG_OS}" = "unix" ]; then
# This list is taken from src/couch/rebar.config.script, please keep them in sync.
if [ ! -d "/usr/include/${SM_HEADERS}" ] && \
+ [ ! -d "/usr/include/${MULTIARCH_NAME}" ] && \
Review Comment:
Should we add SM_HEADERS here, or we're just checking for debian/ubuntu systems in general?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "pgj (via GitHub)" <gi...@apache.org>.
pgj commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2348857802
##########
configure:
##########
@@ -46,6 +46,7 @@ CLOUSEAU_URI=${CLOUSEAU_URI:-"https://github.com/cloudant-labs/clouseau/releases
CLOUSEAU_VSN=${CLOUSEAU_VSN:-"2.25.0"}
CLOUSEAU_DIR="$(pwd)"/clouseau
ARCH="$(uname -m)"
+MULTIARCH_NAME="$(dpkg-architecture -q DEB_HOST_MULTIARCH || true)"
Review Comment:
This is run unconditionally (on every OS), probably that is what causes `configure` to fail on macOS (and on other non-Debian systems).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2344630743
##########
configure:
##########
@@ -327,6 +328,7 @@ if [ "${WITH_SPIDERMONKEY}" = "true" ] && [ "${ERLANG_OS}" = "unix" ]; then
# This list is taken from src/couch/rebar.config.script, please keep them in sync.
if [ ! -d "/usr/include/${SM_HEADERS}" ] && \
+ [ ! -d "/usr/include/${MULTIARCH_NAME}" ] && \
Review Comment:
Okay, $SM_HEADERS added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "rnewson (via GitHub)" <gi...@apache.org>.
rnewson commented on PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#issuecomment-3291939838
```
➜ couchdb git:(auto-delete-tseq) ./configure --disable-spidermonkey --with-nouveau --js-engine=quickjs
./configure: line 49: dpkg-architecture: command not found
```
error on MacOS
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "nickva (via GitHub)" <gi...@apache.org>.
nickva commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2342165899
##########
src/couch/rebar.config.script:
##########
@@ -195,45 +214,20 @@ end.
"-DXP_UNIX -I/usr/include/mozjs-86 -I/usr/local/include/mozjs-86 -I/opt/homebrew/include/mozjs-86/ -std=c++17 -Wno-invalid-offsetof",
"-L/usr/local/lib -L /opt/homebrew/lib/ -std=c++17 -lmozjs-86 -lm"
};
- {unix, _} when SMVsn == "91" ->
- {
- "$CFLAGS -DXP_UNIX -I/usr/include/mozjs-91 -I/usr/local/include/mozjs-91 -I/opt/homebrew/include/mozjs-91/ -std=c++17 -Wno-invalid-offsetof",
- "$LDFLAGS -L/usr/local/lib -L /opt/homebrew/lib/ -std=c++17 -lmozjs-91 -lm"
- };
- {unix, _} when SMVsn == "102" ->
- {
- "$CFLAGS -DXP_UNIX -I/usr/include/mozjs-102 -I/usr/local/include/mozjs-102 -I/opt/homebrew/include/mozjs-102/ -std=c++17 -Wno-invalid-offsetof",
- "$LDFLAGS -L/usr/local/lib -L /opt/homebrew/lib/ -std=c++17 -lmozjs-102 -lm"
- };
- {unix, _} when SMVsn == "115" ->
- {
- "$CFLAGS -DXP_UNIX -I/usr/include/mozjs-115 -I/usr/local/include/mozjs-115 -I/opt/homebrew/include/mozjs-115/ -std=c++17 -Wno-invalid-offsetof",
- "$LDFLAGS -L/usr/local/lib -L /opt/homebrew/lib/ -std=c++17 -lmozjs-115 -lm"
- };
- {unix, _} when SMVsn == "128" ->
+ {unix, _} when SMVsn == "91"; SMVsn == "102"; SMVsn == "115"; SMVsn == "128" ->
Review Comment:
Very nice cleanup!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2344632555
##########
src/couch/rebar.config.script:
##########
@@ -151,6 +151,25 @@ ProperConfig = case code:lib_dir(proper) of
_ -> [{d, 'WITH_PROPER'}]
end.
+DpkgArchitectureCmd = "dpkg-architecture -q DEB_HOST_MULTIARCH".
+GenericMozJSIncludePaths = "-I/usr/include/mozjs-" ++ SMVsn ++ " -I/usr/local/include/mozjs-" ++ SMVsn.
+GenericMozJSLibPaths = "-L/usr/local/lib -L/opt/homebrew/lib".
+
+WithDpkgArchitecture = case os:find_executable("dpkg-architecture") of
+ false -> false;
+ _ -> true
+end.
+
+MozJSIncludePath = case WithDpkgArchitecture of
+ false -> GenericMozJSIncludePaths;
+ true -> GenericMozJSIncludePaths ++ " -I/usr/include/" ++ string:strip(os:cmd(DpkgArchitectureCmd), right, $\n) ++ "/mozjs-" ++ SMVsn
Review Comment:
I changed all `string:strip` to `string:trim`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] dev: support multiarch names (Debian based systems) [couchdb]
Posted by "big-r81 (via GitHub)" <gi...@apache.org>.
big-r81 commented on code in PR #5626:
URL: https://github.com/apache/couchdb/pull/5626#discussion_r2349178321
##########
configure:
##########
@@ -46,6 +46,7 @@ CLOUSEAU_URI=${CLOUSEAU_URI:-"https://github.com/cloudant-labs/clouseau/releases
CLOUSEAU_VSN=${CLOUSEAU_VSN:-"2.25.0"}
CLOUSEAU_DIR="$(pwd)"/clouseau
ARCH="$(uname -m)"
+MULTIARCH_NAME="$(dpkg-architecture -q DEB_HOST_MULTIARCH || true)"
Review Comment:
Yes, but it wouldn't break the build here. The fail on macOS was through a missing path. It will be fixed in #5657.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@couchdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org