leleliu008

Results 52 issues of leleliu008

Hello, I'm a Android developer. I'm porting large amounts of Rust projects to Android platform. I find some project use this crate to cross-compile for Android. sometime I need to...

https://github.com/facebook/folly/archive/v2021.12.20.00.tar.gz Android NDK: 23.1.7779620 ``` /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --sysroot=/home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DBOOST_ALL_NO_LIB -DFMT_LOCALE -DFMT_SHARED -DFOLLY_XLOG_STRIP_PREFIXES=\"/tmp/tmp.aUuUAgMLAk:/tmp/tmp.aUuUAgMLAk/1640279296/armeabi-v7a\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/tmp/tmp.aUuUAgMLAk -I/tmp/tmp.aUuUAgMLAk/1640279296/armeabi-v7a --sysroot /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Qunused-arguments -fpic -Wl,--dynamic-linker=/system/bin/linker -Wl,--strip-debug -Os -DNDEBUG -I/home/fpliu/.ndk-pkg/install.d/boost/armeabi-v7a/include -I/home/fpliu/.ndk-pkg/install.d/zstd/armeabi-v7a/include -I/home/fpliu/.ndk-pkg/install.d/zlib/armeabi-v7a/include -I/home/fpliu/.ndk-pkg/install.d/icu4c/armeabi-v7a/include -I/home/fpliu/.ndk-pkg/install.d/libiconv/armeabi-v7a/include...

There is no `libutil` in Android's libc. relevant code: [CMakeLists.txt#L76](https://github.com/tsl0922/ttyd/blob/main/CMakeLists.txt#L76) may be following code is better: ```cmake find_library(LIBUTIL util) if (LIBUTIL) list(APPEND LINK_LIBS util) endif() ```

bug

``` /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang --target=i686-none-linux-android24 --sysroot=/home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DDILL_THREADS -DHAVE_MPROTECT -DHAVE_POSIX_MEMALIGN -Ddill_EXPORTS -I/tmp/tmp.ynVAr3y0UK -I/tmp/tmp.ynVAr3y0UK/dns --sysroot /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Qunused-arguments -fpic -Wl,--dynamic-linker=/system/bin/linker -Wl,--strip-debug -Os -DNDEBUG -fno-asynchronous-unwind-tables -I/home/fpliu/.ndk-pkg/install.d/openssl/x86/include --sysroot /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Qunused-arguments -I/home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/i686-linux-android -include /tmp/tmp.ynVAr3y0UK/1640588455/include.h -L/home/fpliu/.ndk-pkg/install.d/openssl/x86/lib --sysroot /home/fpliu/.ndk-pkg/android-ndk-r23b/toolchains/llvm/prebuilt/linux-x86_64/sysroot -L/tmp/tmp.ynVAr3y0UK/1640588455...

``` /tmp/tmp.F4CPONhvAn/dns/dns.c:303:5: warning: macro expansion producing 'defined' has undefined behavior [-Wexpansion-to-defined] #if HAVE___ATOMIC_FETCH_ADD && __GCC_ATOMIC_LONG_LOCK_FREE == 2 ^ /tmp/tmp.F4CPONhvAn/dns/dns.c:295:34: note: expanded from macro 'HAVE___ATOMIC_FETCH_ADD' #define HAVE___ATOMIC_FETCH_ADD (defined __ATOMIC_RELAXED) ^ /tmp/tmp.F4CPONhvAn/dns/dns.c:312:5:...

``` include(GNUInstallDirs) install(TARGETS ${OUT_FILE} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ```

generated libpcap.pc file syntax error example: ``` # # pkg-config file for libpcap. # # These variables come from the configure script, so includedir and # libdir may be defined...

compiling
bug
cmake