HaxeFoundation / HaxeFoundation/haxe

static linking fails - ar: libdeps specified more than once

Open
#12,284 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

When building https://github.com/snikket-im/snikket-sdk with this patch:

```
diff --git a/cpp.hxml b/cpp.hxml
index 1b039f6..d0fe0e8 100644
--- a/cpp.hxml
+++ b/cpp.hxml
@@ -14,4 +14,4 @@ snikket.persistence.Sqlite
--cpp cpp
-D HXCPP_NO_CPP11
-D HaxeCBridge.name=snikket
--D dll_link
+-D static_link
```

I get the following error:

```
Compiling group: hxcpp_sqlite
c++ -I/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/hxcpp/git/project/thirdparty/sqlite-3.40.1 -c -fvisibility=hidden -O2 -fpic -fPIC -Wno-overflow -DHX_LINUX -DSTATIC_LINK(static) -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_ALIGN_ALLOC(haxe) -DHX_SMART_STRINGS(haxe) -DHXCPP_API_LEVEL=430(haxe) -m64 -DHXCPP_M64 -I/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/hxcpp/git/include ... tags=[haxe,static]
- /home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/hxcpp/git/project/thirdparty/sqlite-3.40.1/sqlite3.c []
- Sqlite.cpp
Link: liboutput.a
ar: libdeps specified more than once
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/datetime/3,1,4/src/datetime/DateTime.hx:34: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/datetime/3,1,4/src/datetime/DateTime.hx:49: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/datetime/3,1,4/src/datetime/DateTime.hx:69: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/Header.hx:201: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/Protocol.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/http-status/1,3,1/src/httpstatus/HttpStatusCode.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/Method.hx:3: characters 1-7 : Warning : (WDeprecatedEnumAbstract) `@:enum abstract` is deprecated in favor of `enum abstract`
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/Fetch.hx:26: characters 10-22 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/clients/SocketClient.hx:22: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_http/0,10,0/src/tink/http/clients/StdClient.hx:19: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:408: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_io/0,9,0/src/tink/io/StreamParser.hx:45: characters 14-26 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:717: characters 26-38 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:696: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_io/0,9,0/src/tink/io/std/InputSource.hx:15: characters 11-23 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_io/0,9,0/src/tink/io/std/OutputSink.hx:23: characters 56-68 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:593: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:448: characters 7-19 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:650: characters 12-24 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
/home/anjan/code/aports/testing/snikket-sdk/src/snikket-sdk-72a19608040ab5633e85f599370b6e8f8156d023/tink_streams/0,4,0/src/tink/streams/Stream.hx:671: characters 11-23 : Warning : (WDeprecated) use Future.irreversible() - or better yet: new Future()
Error: Build failed
```

Issue has been reported to downstream repo: https://github.com/snikket-im/snikket-sdk/issues/45

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the build with the static_link change in cpp.hxml and inspect the hxcpp_sqlite archive step that reports “ar: libdeps specified more than once.” Compare the static-link path with the working dll_link path, using the downstream snikket-sdk issue as context. Done means the static build completes without the duplicate libdeps error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, sqlite
Domain
build-system, compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.