[dev] [dwm] under NetBSD

116 views
Skip to first unread message

Mitt Green

unread,
May 3, 2016, 8:53:20 AM5/3/16
to dev mail list
Hi,

I adjusted paths in config.mk:
X11INC = /usr/X11R7/include
X11LIB = /usr/X11R7/lib
FREETYPEINC = ${X11INC}/freetype2‎

It compiles successfully, but startx/xinitrc
show me X for a second and then it goes
back to tty.

Typing dwm from tty gives
'Shared object "libX11.so.7" not found'

libX11.so.7 is in /usr/X11R7/lib (result of find).
NetBSD is similar to OpenBSD, I believe, at least
in this case.

Any help will be highly appreciated.

P.S. X works fine, I've tried Openbox.

/ Mitt

Dimitris Papastamos

unread,
May 3, 2016, 8:59:13 AM5/3/16
to dev mail list

Leonardo Taccari

unread,
May 3, 2016, 12:07:22 PM5/3/16
to dev mail list
Hello Mitt,

Dimitris Papastamos writes:
> On Tue, May 03, 2016 at 03:52:50PM +0300, Mitt Green wrote:
> > [...]
> > Any help will be highly appreciated.
> >
> > P.S. X works fine, I've tried Openbox.
> >
> > / Mitt
>
> http://www.netbsd.org/docs/elf.html#elf-rpath
>
Alternatively you can also use wm/dwm package in pkgsrc (also setting
LOCALPATCHES can be pretty useful in order to have a custom
configuration/patches).


HTH!
Ciao,
L.

Mitt Green

unread,
May 4, 2016, 9:21:02 AM5/4/16
to dev mail list
‎Dimitris Papastamos wrote:

> http://www.netbsd.org/docs/elf.html#elf-rpath

This is helpful, though I still can't solve the problem.
I've tried putting "-Wl, -R/usr/X11R7/lib" in config.mk CFLAGS
and got the same error. Putting it in LDFLAGS
causes ld to complain‎ about not being able to find "file or
directory".

LD_LIBRARY_PATH solves it, however every time
I run make I have to redo it. So, the method
is not preferred. I suppose, I am missing something
with "-Wl, -R".

To Leonardo Taccari:
I have a special folder for suckless in my home,
also I like to switch themes regularly, using
config.h templates‎ for the software.

Thanks,
Mitt

Leonardo Taccari

unread,
May 4, 2016, 9:57:44 AM5/4/16
to dev mail list
Hello Mitt,

Mitt Green writes:
> This is helpful, though I still can't solve the problem.
> I've tried putting "-Wl, -R/usr/X11R7/lib" in config.mk CFLAGS
> and got the same error. Putting it in LDFLAGS
> causes ld to complain‎ about not being able to find "file or
> directory".
Can you please adjust config.mk like the following?:

X11INC = /usr/X11R7/include
X11LIB = /usr/X11R7/lib
FREETYPEINC != freetype-config --cflags
INCS = -I${X11INC} ${FREETYPEINC}
LIBS = -L${X11LIB} -lX11 -Wl,-R${X11LIB} ${XINERAMALIBS} ${FREETYPELIBS}


Ciao,
L.

Mitt Green

unread,
May 4, 2016, 10:57:31 AM5/4/16
to dev mail list
Leonardo Taccari wrote:

> LIBS = -L${X11LIB} -lX11 -Wl,-R${X11LIB} ${XINERAMALIBS} ${FREETYPELIBS}

^ This. My error was the space between "-Wl," and "-R".
Modifying FREETYPEINC is unnecessary, I've uncommented
OpenBSD line.

I'm reading from my smartphone ‎and sometimes
it's hard to say if there's a space or not.

By the way, I couldn't even imagine that such
things could exist in their documentation.
I downloaded The Guide, it's 384 pages long,
covers topics galore and could be used as a generic
guide for Unix, too, I believe. In Linux this is rare.
If someone is interested, here's the link:
https://netbsd.org/docs/guide/download/netbsd-en.pdf

Many thanks,
Mitt

Reply all
Reply to author
Forward
0 new messages