sysupbda opened a new issue, #5458:
URL: https://github.com/apache/couchdb/issues/5458
When syncing to the latest main branch, and following the instructions in
INSTALL.UNIX for MacOS, the make process fails while linking `quickjs`.
## Description
The `make` process compiles but fails while linking. I ran the link command
using the `-v` option as suggested by the error and it results in the following
messages:
```
couchdb % cc src/couch_quickjs/c_src/couchjs.o
src/couch_quickjs/c_src/couchjs_mainjs_bytecode.o -flto -v -lm
src/couch_quickjs/quickjs/libquickjs.lto.a -o
src/couch_quickjs/priv/couch_mainjs
Apple clang version 16.0.0 (clang-1600.0.26.6)
Target: arm64-apple-darwin24.3.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld"
-demangle -lto_library
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib
-dynamic -arch arm64 -platform_version macos 15.0.0 15.2 -syslibroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
-mllvm -enable-linkonceodr-outlining -o src/couch_quickjs/priv/couch_mainjs
-L/usr/local/lib src/couch_quickjs/c_src/couchjs.o
src/couch_quickjs/c_src/couchjs_mainjs_bytecode.o -lm
src/couch_quickjs/quickjs/libquickjs.lto.a -lSystem
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/16/lib/darwin/libclang_rt.osx.a
ld: multiple errors: could not parse bitcode object file
src/couch_quickjs/quickjs/libquickjs.lto.a[7](libbf.o): 'Invalid attribute
group entry (Producer: 'LLVM19.1.7' Reader: 'LLVM APPLE_1_1600.0.26.6_0')',
using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[7](libbf.o)'; could not parse
bitcode object file
src/couch_quickjs/quickjs/libquickjs.lto.a[6](quickjs-libc.o): 'Invalid
attribute group entry (Producer: 'LLVM19.1.7' Reader: 'LLVM
APPLE_1_1600.0.26.6_0')', using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[6](quickjs-libc.o)'; could not
parse bitcode object file
src/couch_quickjs/quickjs/libquickjs.lto.a[5](cutils.o): 'Invalid attribute
group entry (Producer: 'LLVM19.1.7' Reader: 'LLVM APPLE_1_1600.0.26.6_0')',
using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[5](cutils.o)'; could not parse
bitcode object file src/couch_quickjs/quickjs/libquickjs.lto.a[4](lib
unicode.o): 'Invalid attribute group entry (Producer: 'LLVM19.1.7' Reader:
'LLVM APPLE_1_1600.0.26.6_0')', using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[4](libunicode.o)'; could not parse
bitcode object file src/couch_quickjs/quickjs/libquickjs.lto.a[3](libregexp.o):
'Invalid attribute group entry (Producer: 'LLVM19.1.7' Reader: 'LLVM
APPLE_1_1600.0.26.6_0')', using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[3](libregexp.o)'; could not parse
bitcode object file src/couch_quickjs/quickjs/libquickjs.lto.a[2](quickjs.o):
'Invalid attribute group entry (Producer: 'LLVM19.1.7' Reader: 'LLVM
APPLE_1_1600.0.26.6_0')', using libLTO version 'LLVM version 16.0.0' in
'src/couch_quickjs/quickjs/libquickjs.lto.a[2](quickjs.o)'
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
```
## Steps to Reproduce
1- `brew install autoconf autoconf-archive automake libtool erlang icu4c
spidermonkey pkg-config`
2- `JS_ENGINE=quickjs ./configure --disable-spidermonkey`
3- `make`
Note that I intend to only use quickjs, but the reason I disabled
spidermonkey is that it would complain I don't have a supported version.
## Expected Behaviour
`make` should produce the erlang package that can be deployed to a BEAM VM,
or there should be an executable that wraps starting the VM with the CouchDB
application.
Following the instructions of
https://github.com/apache/couchdb/blob/main/INSTALL.Unix.md#mac-os-x should
result in a working environment.
## Your Environment
Warnings of interest:
`WARN: Missing plugins: [pc]`
Information of interest:
```
Updating snappy from {git,"https://github.com/apache/couchdb-snappy.git",
{tag,"CouchDB-1.0.9"}}
Updating fauxton from {git,"https://github.com/apache/couchdb-fauxton",
{tag,"v1.3.1"}}
Updating ibrowse from {git,"https://github.com/apache/couchdb-ibrowse.git",
{tag,"CouchDB-4.4.2-6"}}
Updating jiffy from {git,"https://github.com/apache/couchdb-jiffy.git",
{tag,"1.1.2"}}
Updating mochiweb from {git,"https://github.com/apache/couchdb-mochiweb.git",
{tag,"v3.2.2"}}
Updating meck from {git,"https://github.com/apache/couchdb-meck.git",
{tag,"CouchDB-0.9.2-1"}}
Updating recon from {git,"https://github.com/apache/couchdb-recon.git",
{tag,"2.5.5"}}
Updating proper from {git,"https://github.com/proper-testing/proper",
"a5ae5669f01143b0828fc21667d4f5e344aa760b"}
```
* CouchDB version used: "main branch" - commit
a2ba5e2cf2d0afe2eea11dcb10c0a3af36ac9fe5
* Operating system and version: `Darwin XXXXXX.local 24.3.0 Darwin Kernel
Version 24.3.0: Thu Jan 2 20:24:06 PST 2025;
root:xnu-11215.81.4~3/RELEASE_ARM64_T8103 arm64`
--
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]