I added a comment to config.mk
Thanks for your work!
Regards,
Aaron
On 19-07-30 Tue, Jason Smith wrote:
On 19/07/30 09:22AM, Jason Smith wrote:
I added -lkvm to LDFLAGS and everything compile without any problem.
Thanks to Micheal Buch.
Here is what I get when I tried make:
cc -o slstatus -L/usr/local/lib -s components/battery.o components/cpu.o
components/datetime.o components/disk.o components/entropy.o
components/hostname.o components/ip.o components/kernel_release.o
components/keyboard_indicators.o components/keymap.o components/load_avg.o
components/netspeeds.o components/num_files.o components/ram.o
components/run_command.o
components/swap.o components/temperature.o components/uptime.o
components/user.o components/volume.o components/wifi.o util.o slstatus.o -lX11
/usr/bin/ld: error: undefined symbol: kvm_openfiles
>>> referenced by swap.c
>>> components/swap.o:(getswapinfo)
/usr/bin/ld: error: undefined symbol: kvm_getswapinfo
>>> referenced by swap.c
>>> components/swap.o:(getswapinfo)
/usr/bin/ld: error: undefined symbol: kvm_close
>>> referenced by swap.c
>>> components/swap.o:(getswapinfo)
/usr/bin/ld: error: undefined symbol: kvm_close
>>> referenced by swap.c
>>> components/swap.o:(getswapinfo)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make: stopped in /usr/local/src/slstatus
Here is my config.mk:
# slstatus version
VERSION = 0
# customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
X11INC = /usr/local/include
X11LIB = /usr/local/lib
# flags
CPPFLAGS = -I$(X11INC) -D_DEFAULT_SOURCE
CFLAGS = -std=c99 -pedantic -Wall -Wextra -Os
LDFLAGS = -L$(X11LIB) -s
LDLIBS = -lX11
# compiler and linker
CC = cc
What is the problem with swap.c and swap.o ?
--
Web: https://drkhsh.at/ or http://drkhsh5rv6pnahas.onion/
Gopher: gopher://drkhsh.at or gopher://drkhsh5rv6pnahas.onion
GPG: 0x7A65E38D55BE96FE
Fingerprint: 4688 907C 8720 3318 0D9F AFDE 7A65 E38D 55BE 96FE