IceWM building on Termux
IntinteDAO opened this issue · 6 comments
Unfortunately I'm very weak in C++ code, so I'd love to know if you are able to help make suitable patches or improve the IceWM code to also include Termux.
What is Termux? Termux is a terminal emulator and tool for Android. So you could say it's kind of like Cygwin for Android. Termux has its own X Server, and while it is Linux itself (because Android is Linux), it is based on Android Libc instead of GNU Libc, and the default compiler is Clang.
So I generally build code using CMake. The configuration executes correctly, but I get an error when building:
FAILED: src/CMakeFiles/ice.dir/misc.cc.o
/home/builder/.termux-build/_cache/android-r25c-api-24-v2/bin/clang++ --target=aarch64-none-linux-android --gcc-toolchain=/home/builder/.termux-build/_cache/android-r25c-api-24-v2 --sysroot=/home/builder/.termux-build/_cache/android-r25c-api-24-v2/sysroot -I/home/builder/.termux-build/icewm/build -I/home/builder/.termux-build/icewm/build/src -I/home/builder/.termux-build/icewm/src/src -fstack-protector-strong -Oz --target=aarch64-linux-android24 -I/data/data/com.termux/files/usr/include -O3 -DNDEBUG -std=gnu++11 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_CONFIG_H -include /home/builder/.termux-build/icewm/build/config.h -fvisibility=hidden -fvisibility-inlines-hidden -I/data/data/com.termux/files/usr/include -I/data/data/com.termux/files/usr/include/freetype2 -I/data/data/com.termux/files/usr/include/libpng16 -I/data/data/com.termux/files/usr/include/fribidi -MD -MT src/CMakeFiles/ice.dir/misc.cc.o -MF src/CMakeFiles/ice.dir/misc.cc.o.d -o src/CMakeFiles/ice.dir/misc.cc.o -c /home/builder/.termux-build/icewm/src/src/misc.cc
/home/builder/.termux-build/icewm/src/src/misc.cc:663:18: error: use of undeclared identifier 'program_invocation_name'
char* path = program_invocation_name;
^
/home/builder/.termux-build/icewm/src/src/misc.cc:679:24: error: use of undeclared identifier 'program_invocation_name'
path = program_invocation_name = newstr(link);
^
/home/builder/.termux-build/icewm/src/src/misc.cc:685:9: error: use of undeclared identifier 'program_invocation_name'
program_invocation_name = path;
^
Maybe you have some idea how to fix it?
Replace the #ifdef __linux__
at line 662 with:
#if defined(__linux__) && defined(_GNU_SOURCE)
If that doesn't work, give the output of gcc -dM -E - </dev/null
.
Thank you for reply. This code doesn't work.
gcc:
https://privatebin.arch-linux.cz/?cf6de9f4a0341fa6#FdewKVgBPvqVnQF2w9zbq9Pxwc7PTwoBog1h76oU8h2w
clang:
https://bin.nixnet.services/?6250b0193a36a80b#EQFjiJRcu7Mmiqvk6nd3PcdbKpyF3LkdKCLvx6x414w3
Why doesn't it work?
Does this work?
#if defined(__linux__) && defined(_GNU_SOURCE) && !defined(__ANDROID__)
Why? Reason.
This one works. I'm working with new issues now
I also needed to change something in icewm-menu-fdo, because desktop files in Termux is /data/data/com.termux/files/usr/share instead /usr/share.
Closing