meator commented on issue #6107:
URL: https://github.com/apache/couchdb/issues/6107#issuecomment-5574216235

   Thank you for your response!
   
   The fact that quickjs is vendored would explain a lot.
   
   The obvious solution would be to edit `src/couch_quickjs/quickjs/Makefile` 
to build `qjsc` with `HOST_CC`, but that would be editing a vendored project. 
Modifying vendored projects increases the maintenance burden and it is usually 
a bad idea, unless the vendorer fully takes over the maintainership of the 
project (making a pseudo-fork). The other solutions I proposed are in my 
opinion better.
   
   I can confirm that quickjs is not the only complication when trying to build 
couchdb. I have came across at least one more problem (build system tries to 
look up `jsapi.h` in host locations in 
`src/couch/priv/couch_js/102/main.cpp:24:10`, this doesn't look like a 
difficult issue to fix, but it is annoying that it doesn't show the command 
being executed, it just shows `Compiling 
/builddir/couchdb-3.5.2/src/couch/priv/couch_js/102/main.cpp` and the error). 
I'll try to dig in a bit more, but I won't try too hard to make it all work, 
since according to you this is all untested.
   
   I'll probably disable cross compilation for the package I am working on.
   
   As I said, I don't know a lot about erlang, I can't provide much guidance 
here.
   
   I have some more comments on couchdb from a package maintainer perspective 
(the documentation implies that `pkg-config` should be installed, is it 
actually used for anything; how should configuration files be deployed; 
etc...), but most of the issues seem to stem from the fact that couchdb wasn't 
really designed to be system installed.
   
   I don't expect you to overhaul the whole build system to make cross 
compilation work and to fix all the issues I pointed out. I think that 
documenting the current state of cross-compilation support for couchdb in for 
example the [installation 
documentation](https://docs.couchdb.org/en/stable/install/unix.html) would be 
sufficient to close this issue.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to