dit icon indicating copy to clipboard operation
dit copied to clipboard

Building in Unbuntu fails

Open afl5c opened this issue 2 years ago • 2 comments

Trying to build in Ubuntu (within Docker) and I get this:

checking for ANSI C header files... yes
checking for keypad in -ltinfo... no
checking for refresh in -lncursesw6... no
checking for refresh in -lncursesw... no
checking for addnwstr in -lncurses... no
configure: error: You may want to use --disable-unicode or install libncursesw.
root@5a21ab58be53:~/dit-0.6# apt install libncursesw 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package libncursesw
root@5a21ab58be53:~/dit-0.6# apt install ncursesw   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ncursesw
root@5a21ab58be53:~/dit-0.6# apt install ncurses 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package ncurses
root@5a21ab58be53:~/dit-0.6# apt install libncurses5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libncurses5 is already the newest version (6.0+20160213-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Is it because only the latest ncurses is supported?

Would it be possible to provide binaries for dit? Or a Docker image? I just want to try it out but seems like a hassle to build/compile.

afl5c avatar Jul 07 '22 20:07 afl5c

You need the dev package for ncurses when compiling (I think it's called libncurses-dev on Ubuntu)

hishamhm avatar Jul 08 '22 16:07 hishamhm

Oh okay thanks, that is the correct package name. I installed it, and it fixed the "keypad in -ltinfo" check, but not the other ones:

checking for keypad in -ltinfo... yes
checking for refresh in -lncursesw6... no
checking for refresh in -lncursesw... no
checking for addnwstr in -lncurses... no
configure: error: You may want to use --disable-unicode or install libncursesw.

I tried "--disable-unicode" and ./configure was able to finish, and I was able to compile (with "make" and "make install"). However, I'm not sure how to run dit, haha. If I do

  • ./dit
  • dit
  • dit --help
  • dit hello.txt

...nothing seems to happen. The executable appears to start and block for input, but nothing appears on the screen. I am able to exit with ctlr-c:

root@dd1e4eaad0fb:/dit-0.6# dit
^C
root@dd1e4eaad0fb:/dit-0.6# ./dit
^C
...

I probably won't have time to look into this more, so I'll just close the thread. But just letting you know in case you want to investigate further.

afl5c avatar Jul 09 '22 22:07 afl5c