[dev] [slstatus] FreeBSD compiling problem ld undefined symbol

From: Jason Smith <unwillexist_AT_cock.li>
Date: Tue, 30 Jul 2019 09:22:07 +0300

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 ?
Received on Tue Jul 30 2019 - 08:22:07 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 30 2019 - 11:24:09 CEST