Open kseistrup opened 10 months ago
PS: I tried a make edge
in the hope that it would skip the tests, and then I end up with what I believe is a working copy of edge
(I still have to use just #include <curses.h>
, but the second error described above doesn't occur).
I believe commit 8fdf7f7 should fix the test binaries.
That said, Edge depends on the ncursesw/curses.h header. I don't know how you'd get that in ArchLinux. I know that in Debian this file is provided by package libncurses-dev.
Can you search to see if directory ncursesw
exists at all in your system? https://man.archlinux.org/man/ncurses.3x.en#ncursesw has some details, explaining that there's two configurations: ncurses and ncursesw. Edge needs ncursesw (which supports wide characters). I wonder if there's a way to get the ncursesw configuration in ArchLinux.
TL:DR: ArchLinux' ncurses
package provides the libncursesw
library with wide char support, and its header files resides in /usr/include/
(not in a separate subdirectory).
Can you search to see if directory
ncursesw
exists at all in your system?
It doesn't.
$ locate /ncursesw
/usr/bin/ncursesw6-config
/usr/lib/pkgconfig/ncursesw.pc
/usr/share/man/man1/ncursesw6-config.1.gz
The ncurses
package I mentioned earlier provides ncurses
and ncursesw
(and curses
) by employing the alternate configuration described at:
E.g., the /usr/lib/libncurses.so
file is an ASCII text file with the following content:
$ cat /usr/lib/libncurses.so
INPUT(-lncursesw)
The ncurses
package in ArchLinux provides everything ncurses as ArchLinux doesn't have separate development packages the way e.g. Debian does.
You can see the PKGBUILD
file that ArchLinux uses to configure and build the ncurses
package here (it's just a bash script):
It does include the --enable-widec
, but it does not include the --disable-overwrite
option, and the header files are not placed in a separate subdirectory.
I will try and compile the latest commit of edge
(editing the #include
line, if necessary) and see what the tests say.
Ahhh, that makes sense. Thanks for the update.
These days the majority of the tests can be executed through edge --tests=run
. Hopefully you'll be able to build the edge
binary, though I suspect you may need to adjust a few #include
lines.
The following is valid for commit 8fdf7f76ffa167497a7e9e9228b26b1f2dcf95e9
I didn't rerun the configure step since the changes between my original post and now didn't involve configuring, so what I did was: git pull && make clean && make
.
The src/screen_curses.cc
already had #include <curses.h>
, and no other changes were required to fully compile the edge
binary, the libglog
library and the tests.
Running edge --tests=run
mostly went well. I'm incompetent to get anything meaningful out of the error messages, so I have attached the full output (interleaved stdout + stderr) from running the tests.
Running edge
leaves behind lots of pipes (e.g., /tmp/edge-server-wBkY4t
), temporary files (e.g., /tmp/edge-initial-commands-Z0Tod2
) and log files (e.g., $TMPDIR/edge.$HOSTNAME.$USER.log.WARNING.20231109-114524.924184
), something I feel that edge
should clean up upon exit, but perhaps that is configurable, and it is something for potential other issue anyway, so I am just mentioning it here for the record.
Here $TMPDIR != /tmp
.
Oh, cool to hear that you managed to get it to run.
Thank you for attaching the output, that's very helpful. Looks like there's a failure in the test HelpCommand::GenerateContents
which is ... very strange. All the other tests pass (some tests print stack traces, but that's OK: these tests assert that if the code does something unexpected, the error is caught and, as desired, crashes the program (rather than silently ignore the problem)).
I'll have to look into that to figure out the failure for HelpCommand
. Very interesting. I guess that might mean that if you press ?
to get the help (while running Edge), Edge may crash? Would you mind filling a separate issue? You can attach the output of edge --tests=run --tests_filter=HelpCommand::GenerateContents.GenerateContents
(which will only run the test that is failing and skip all the other less relevant information, about the tests that pass).
You're absolutely right that Edge leaves behind lots and lots of uh garbage files (hopefully all in /tmp or $TMPDIR). It has never bothered me, but I can totally see that it's not very desirable. I guess I'll write some logic to start cleaning up the mess. :-) Maybe we should also file a separate issue to track this, or even separate issues for (1) edge-server-XXXXX pipes, (2) edge-initial-commands-XXXXX, and (3) log files. I think whether #3 should be fixed or is intended behavior is subjective (i.e., I think this is a decision in the Google Logging library, more than in Edge).
Thanks again.
I have a meeting so we'll have to wait with the details, but I can confirm that edge somefile.txt
crashes with a SIGABRT
when I press ?
in the editor.
I've attempted to build this on ArchLinux a couple of times, but although it goes well for a long time, it always fails with:
ArchLinux currently includes this curses library:
that has
curses.h
in/usr/include/
:When I edit the
src/screen_curses.cc
file to havethe compilation will fail later on instead:
I am not a dev. I don't know how to proceed from here. Any suggestions?