martanne / dvtm

dvtm brings the concept of tiling window management, popularized by X11-window managers like dwm to the console. As a console window manager it tries to make it easy to work with multiple console based programs.
MIT License
851 stars 105 forks source link

Building Against netbsd-curses? #42

Open githububub opened 7 years ago

githububub commented 7 years ago

Building against netbsd-curses appears to build successfully, but launching dvtm 0.15 as dvtm or DVTM_TERM=rxvt-unicode dvtm (urxvt) or DVTM_TERM=st-256color dvtm (st) results in a no-op terminal window that cannot accept any input and must be killed to exit.

==> Starting build()... cleaning cleaning dvtm build options: CC dvtm.c CC vt.c CFLAGS = -march=native -O2 -pipe -fstack-protector-all -fomit-frame-pointer -std=c99 -I. -DVERSION="0.15" -DNDEBUG -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED LDFLAGS = -Wl,-z,now -Wl,-O1,--sort-common,--as-needed,-z,relro -lc -lutil -lcurses -lterminfo CC = cc vt.c: In function ‘vt_forkpty’: vt.c:1636:4: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result [-Wunused-result] chdir(cwd); ^~~~~~ CC -o dvtm ==> Entering fakeroot environment... ==> Starting package()... stripping executable installing executable file to /tmp/dvtm/pkg/dvtm/usr/bin installing manual page to /tmp/dvtm/pkg/dvtm/usr/share/man/man1 installing terminfo description 2 entries and 0 aliases written to dvtm.info.cdb ==> Tidying install... -> Removing doc files... -> Removing libtool files... -> Removing static library files... -> Stripping unneeded symbols from binaries and libraries... -> Compressing man and info pages... ==> Checking for packaging issue... ==> Creating package "dvtm"... -> Generating .PKGINFO file... -> Generating .BUILDINFO file... -> Generating .MTREE file... -> Compressing package... 100 % 32.1 KiB / 100.0 KiB = 0.321
==> Leaving fakeroot environment. ==> Finished making: dvtm 0.15-2 (Sat Nov 12 16:00:34 UTC 2016)

dvtm.info.cdb terminfo database is built un the source directory (expected). However, dvtm.info.cdb is not installed to /usr/share/terminfo automatically per the default config.mk (not expected). No problem. Modifying the dvtm PKGBUILD recipe to install dvtm.info.cdb to /usr/share/terminfo and setting TERMINFO=/usr/share/terminfo does not resolve the no-op issue (not expected). Modifying config.mk and the build recipe to install dvtm.info.cdb to $HOME with TERMINFO set accordingly does not resolve the issue either. How to get dvtm up and running?

rofl0r commented 7 years ago

i wasn't aware that dvtm requires an own terminfo database entry. do i conclude correctly that dvm compiles a terminfo description with tic and installs that into a systemwide directory, assuming it will be automatically picked up ?

ghost commented 7 years ago

@rofl0r Yes, it does install its own terminfo with tic, if this is what you meant.

From the Makefile:

tic -s dvtm.info
rofl0r commented 7 years ago

i had time to look at this issue in-depth and documented my findings here: https://github.com/sabotage-linux/netbsd-curses/issues/19 . as a temporary workaround or just to test that dvtm works theoretically as expected, @githububub could rename the generated dvtm.info.cdb to $HOME/.terminfo.cdb, and then we can find a satisfactory permanent solution.

githububub commented 7 years ago

dvtm.info.cdb to $HOME/.terminfo.cdb and dvtm.info.cdb to $(PREFIX)/share/terminfo.cdb both do not resolve the no-op terminal window issue.

rofl0r commented 7 years ago

i've tried it in xterm and there it worked. i started dvtm like this to find out where/if it picks up the terminfo files:

strace -f dvtm 2>&1 | grep open

(failure to find the file has an ENOENT return value) once it could find the .cdb with the dvtm entries in it, it worked correctly.

btw you can exit the no-op dvtm with CTRL-D

rofl0r commented 7 years ago

i've now added dvtm terminfos to netbsd-curses' terminfo db, so this should be a non-issue in the future (unless there will be major changes to the terminfo of dvtm). https://github.com/sabotage-linux/netbsd-curses/commit/396a9d047c6c8b9ae2aefa7ad3aa1641f511234d