Gw v0.10.1
Linker cannot find libs. How should these be defined in the build?
ld.lld: error: unable to find library -lpthread
[2918](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2919)
ld.lld: error: unable to find library -lX11
[2919](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2920)
ld.lld: error: unable to find library -lhts
[2920](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2921)
ld.lld: error: unable to find library -lfreetype
[2921](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2922)
ld.lld: error: unable to find library -luuid
[2922](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2923)
ld.lld: error: unable to find library -lcurl
[2923](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2924)
ld.lld: error: unable to find library -lglfw
[2924](https://github.com/termux/termux-packages/actions/runs/9841341897/job/27167721840?pr=20796#step:8:2925)
ld.lld: error: unable to find library -lfontconfig
gw has TERMUX_PKG_AUTO_UPDATE set to true.
https://github.com/termux/termux-packages/blob/224857d7521ca9a2b606a875a64ffabfefc875ac/x11-packages/gw/build.sh#L1-L11
It would have auto-updated if there weren't build issues with the new version.
As such a simple version bump and updating the checksum is not going to be enough in this case.
From the CI logs, it looks like it is unable to find (most of?) its build time dependencies.
And also requires curl as a dependency now.
aarch64-linux-android-clang++ -fstack-protector-strong -Oz -Wall -std=c++17 -fno-common -fwrapv -fno-omit-frame-pointer -O3 -DNDEBUG -g -D LINUX -D __STDC_FORMAT_MACROS ./src/drawing.o ./src/glfw_keys.o ./src/hts_funcs.o ./src/main.o ./src/menu.o ./src/parser.o ./src/plot_commands.o ./src/plot_controls.o ./src/plot_manager.o ./src/segments.o ./src/term_out.o ./src/themes.o ./src/utils.o ./lib/libBigWig/bwRead.o ./lib/libBigWig/bwValues.o ./lib/libBigWig/bwWrite.o ./lib/libBigWig/io.o -L./lib/skia/out/Release-arm64 -lskia -lm -ljpeg -lpng -lpthread -lX11 -lEGL -lGLESv2 -lhts -lfreetype -luuid -lz -lcurl -licu -ldl -lglfw -lsvg -lfontconfig -o gw
ld.lld: error: unable to find library -lpthread
ld.lld: error: unable to find library -lX11
ld.lld: error: unable to find library -lhts
ld.lld: error: unable to find library -lfreetype
ld.lld: error: unable to find library -luuid
ld.lld: error: unable to find library -lcurl
ld.lld: error: unable to find library -lglfw
ld.lld: error: unable to find library -lfontconfig
clang-17: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:125: gw] Error 1
Error: Process completed with exit code 2.
Thanks @TomJo2000 Some of those libs are in the build recipe already, some I think should be on the system already (X11, pthread), so not sure why the linker is failing?
It looks like there should be something added to LDLIBS or similar, the linker can't find various libs, even though some of them are in the recipe? Does anyone know how to fix this? Thanks!
Patch the makefiles or use LDFLAGS with -L${TERMUX_PREFIX}/lib
https://github.com/kcleal/gw/blob/b4f4706ba94fb5b86fb5eca4d9fce68e99e0102e/Makefile#L55
Ah I fail to mention that LDFLAGS already have -L${TERMUX_PREFIX}/lib inside our build scripts.
It's just that the Makefile is clearing out the LDFLAGS, so you have remove that line by patching it.
We'll still wanna squash these commits. But I can take it from here.
The build error was caused by an overlooked array reference in alist's build script.
Fixed it in https://github.com/termux/termux-packages/commit/aa97f6e3eed35907c0da2ce748dfdeefbe90d7cf.
I'm going to rebase this PR on top of that commit.
And, we're all green.
No idea what went wrong with the previous CI run, we're all green here now.
Package contents check out. I think we have all concerns addressed? I'd like to just get this PR done.
Just gonna wait out the CI run, and then we can squash this mess.
Also @kcleal, please consider squashing your commits after rebasing against the master branch. It makes the review process much easier for us. Also thanks for the PR
I'm fine doing rebases and squashing myself. I just generally prefer to leave the PR author in control of what exactly is in what commit, and what the commit message(s) are.
Think that might be our first 3 author commit in the repo lol.
Thanks, really appreciate the help!