strawman2511 I try compile dwm (not in pkgsrc) in NetBSD and run it. I have my config.mk file look like this PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man X11INC = /usr/pkg/include X11LIB = /usr/pkg/lib XINERAMALIBS = -lXinerama XINERAMAFLAGS = -DXINERAMA FREETYPELIBS = -lfontconfig -lXft FREETYPEINC = /usr/pkg/include/freetype2 INCS = -I${X11INC} -I${FREETYPEINC} LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\"${XINERAMAFLAGS} CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS} CC = cc and my .xinitrc exec dwm But the output when I startx is: dwm: Shared object "libX11.so.6 not found" /usr/pkg/bin/xinit: connection to X server lost What did I do wrong?
nia Need to set the runtime library path in LDFLAGS. -Wl,-R/usr/X11R7/lib when using base Xorg, -Wl,-R/usr/pkg/lib when using pkgsrc Xorg. This is handled automatically in pkgsrc and when using pkg-config, by the way...
strawman2511 Need to set the runtime library path in LDFLAGS. -Wl,-R/usr/X11R7/lib when using base Xorg, -Wl,-R/usr/pkg/lib when using pkgsrc Xorg. nia I'm sorry. I don't think I can't understand all of your comment, if you can, please explain clearly for me?
strawman2511 Thanks everyone, now it really works well. But @Jay I wonder if I install dwm from pkgsrc assume that I don't 'make clean' dwm, how can I recompiling it again?
pin strawman2511 There's a work around, PM me if you want it. It could break things and I don't want to post breakage instructions 😉