dvtm icon indicating copy to clipboard operation
dvtm copied to clipboard

Building Against netbsd-curses?

Open githububub opened this issue 8 years ago • 6 comments

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?

githububub avatar Nov 12 '16 16:11 githububub

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 ?

rofl0r avatar Nov 13 '16 23:11 rofl0r

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

From the Makefile:

tic -s dvtm.info

ghost avatar Nov 13 '16 23:11 ghost

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.

rofl0r avatar Nov 19 '16 10:11 rofl0r

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.

githububub avatar Nov 24 '16 07:11 githububub

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 avatar Nov 24 '16 11:11 rofl0r

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

rofl0r avatar Dec 28 '16 13:12 rofl0r