leleliu008 / ndk-pkg

A package builder/manager for Android NDK to build projects written in C, C++, Rust, Golang, etc.

Home Page:http://blog.fpliu.com/project/ndk-pkg

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to build htop: `ld: error: undefined symbol: backtrace`

benoitjpnet opened this issue · comments

/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi21-clang -Wall -Wcast-align -Wcast-qual -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings -Wextra-semi-stmt -Wimplicit-int-conversion -Wnull-dereference -pedantic -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"/home/benpro/.ndk-pkg/install.d/android/21/htop/armeabi-v7a/etc\"" -I"/home/benpro/.ndk-pkg/installing.d/android/21/htop/src/linux" -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 --sysroot /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Qunused-arguments -fPIC -Wl,--as-needed -Wl,--strip-debug -Os -DNDEBUG -rdynamic  -L/home/benpro/.ndk-pkg/installing.d/android/21/htop/armeabi-v7a/lib -L/home/benpro/.ndk-pkg/installing.d/android/21/htop -L/home/benpro/.ndk-pkg/install.d/android/21/ncurses/armeabi-v7a/lib -L/home/benpro/.ndk-pkg/install.d/android/21/libstrchrnul/armeabi-v7a/lib -L/home/benpro/.ndk-pkg/install.d/android/21/liblanginfo/armeabi-v7a/lib --sysroot /opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -L/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/21 -Wl,--as-needed -Wl,--strip-debug -l:libstrchrnul.a -l:liblanginfo.a -o htop htop.o   Action.o Affinity.o AffinityPanel.o AvailableColumnsPanel.o AvailableMetersPanel.o BatteryMeter.o CategoriesPanel.o ClockMeter.o ColorsPanel.o ColumnsPanel.o CommandLine.o CommandScreen.o Compat.o CPUMeter.o CRT.o DateMeter.o DateTimeMeter.o DiskIOMeter.o DisplayOptionsPanel.o DynamicColumn.o DynamicMeter.o EnvScreen.o FunctionBar.o Hashtable.o Header.o HeaderOptionsPanel.o HostnameMeter.o IncSet.o InfoScreen.o ListItem.o LoadAverageMeter.o MainPanel.o MemoryMeter.o MemorySwapMeter.o Meter.o MetersPanel.o NetworkIOMeter.o Object.o OpenFilesScreen.o OptionItem.o Panel.o Process.o ProcessList.o ProcessLocksScreen.o RichString.o ScreenManager.o ScreensPanel.o Settings.o SignalsPanel.o SwapMeter.o SysArchMeter.o TasksMeter.o TraceScreen.o UptimeMeter.o UsersTable.o Vector.o XUtils.o generic/gettime.o generic/hostname.o generic/uname.o linux/CGroupUtils.o linux/HugePageMeter.o linux/IOPriorityPanel.o linux/LibSensors.o linux/LinuxProcess.o linux/LinuxProcessList.o linux/Platform.o linux/PressureStallMeter.o linux/SELinuxMeter.o linux/SystemdMeter.o linux/ZramMeter.o zfs/ZfsArcMeter.o zfs/ZfsCompressedArcMeter.o   -lncursesw -lm /home/benpro/.ndk-pkg/install.d/android/21/ncurses/armeabi-v7a/lib/libncursesw.a 
ld: error: undefined symbol: backtrace
>>> referenced by CRT.c
>>>               CRT.o:(CRT_handleSIGSEGV)

ld: error: undefined symbol: backtrace_symbols_fd
>>> referenced by CRT.c
>>>               CRT.o:(CRT_handleSIGSEGV)
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:1341: htop] Error 1
make[1]: Leaving directory '/home/benpro/.ndk-pkg/installing.d/android/21/htop/armeabi-v7a/build'
make: *** [Makefile:1065: all] Error 2
make: Leaving directory '/home/benpro/.ndk-pkg/installing.d/android/21/htop/armeabi-v7a/build'
💔  target [htop/armeabi-v7a] install failed! you can go to directory[/home/benpro/.ndk-pkg/installing.d/android/21/htop] to look at the details.

I am not familiar with compiling, any idea of what could be the issue?

Found that I had to add in dep.pkg's formula:

libexecinfo