I'm trying cptv on Fedora Linux Asahi Remix 40 aarch64 on the Apple MacBook Air (13-inch, M2, 2022), linux kernel version is Linux 6.9.6-400.asahi.fc40.aarch64+16k.
Here is the installation process:
#
# Install dependencies for `libmagic` and `libcrypto`
#
sudo dnf install file-libs file-devel openssl-devel
cd ~/temp
git clone --depth=1 git@github.com:NikitaIvanovV/ctpv.git
cd ctpv
make
sudo make install
Compile and install without error:
I fion | /home/fion/temp/ctpv make
cc -o src/config.o src/config.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
make -C embed
make[1]: Entering directory '/home/fion/temp/ctpv/embed'
cc embed.c -o embed
make[1]: Leaving directory '/home/fion/temp/ctpv/embed'
embed/embed -p prev_scr_ sh/prev/any.sh sh/prev/atool.sh sh/prev/audio.sh sh/prev/bat.sh sh/prev/cat.sh sh/prev/colordiff.sh sh/prev/delta.sh sh/prev/diff_so_fancy.sh sh/prev/elinks.sh sh/prev/font.sh sh/prev/glow.sh sh/prev/gpg.sh sh/prev/highlight.sh sh/prev/image.sh sh/prev/jq.sh sh/prev/libreoffice.sh sh/prev/ls.sh sh/prev/lynx.sh sh/prev/mdcat.sh sh/prev/pdf.sh sh/prev/source_highlight.sh sh/prev/svg.sh sh/prev/symlink.sh sh/prev/torrent.sh sh/prev/video.sh sh/prev/w3m.sh > gen/previews.h
embed/embed help.txt > gen/help.h
cc -o src/ctpv.o src/ctpv.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
src/ctpv.c: In function ‘md5_string’:
src/ctpv.c:175:5: warning: ‘MD5’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
175 | MD5((const unsigned char *)s, strlen(s), out);
| ^~~
In file included from src/ctpv.c:9:
/usr/include/openssl/md5.h:52:38: note: declared here
52 | OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n,
| ^~~
cc -o src/error.o src/error.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
cc -o src/lexer.o src/lexer.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
src/lexer.c: In function ‘read_while’:
src/lexer.c:208:33: warning: comparison is always true due to limited range of data type [-Wtype-limits]
208 | while ((c = peek_char(ctx)) >= 0 && p(c)) {
| ^~
src/lexer.c: In function ‘read_punct’:
src/lexer.c:323:24: warning: comparison is always false due to limited range of data type [-Wtype-limits]
323 | if (peek_char(ctx) == EOF_CHAR)
| ^~
src/lexer.c: In function ‘lexer_get_token’:
src/lexer.c:393:15: warning: comparison is always false due to limited range of data type [-Wtype-limits]
393 | if (c == (ch)) { \
| ^~
src/lexer.c:413:5: note: in expansion of macro ‘ATTEMPT_READ_CHAR’
413 | ATTEMPT_READ_CHAR(ctx, tok, EOF_CHAR, TOK_EOF);
| ^~~~~~~~~~~~~~~~~
cc -o src/preview.o src/preview.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
embed/embed -p scr_ sh/clear.sh sh/end.sh > gen/server.h
cc -o src/server.o src/server.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
embed/embed -p scr_ sh/helpers.sh > gen/helpers.h
cc -o src/shell.o src/shell.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
cc -o src/ulist.o src/ulist.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
cc -o src/utils.o src/utils.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
cc -o src/vector.o src/vector.c -c -O2 -MMD -Wall -Wextra -Wno-unused-parameter
cc -o ctpv src/config.o src/ctpv.o src/error.o src/lexer.o src/preview.o src/server.o src/shell.o src/ulist.o src/utils.o src/vector.o -lmagic -lcrypto
I fion | /home/fion/temp/ctpv sudo make install
[sudo] password for fion:
make -C embed
make[1]: Entering directory '/home/fion/temp/ctpv/embed'
make[1]: 'embed' is up to date.
make[1]: Leaving directory '/home/fion/temp/ctpv/embed'
make -C quit
make[1]: Entering directory '/home/fion/temp/ctpv/quit'
cc ctpvquit.c -o ctpvquit
make[1]: Leaving directory '/home/fion/temp/ctpv/quit'
mkdir -p /usr/local/bin
install ctpv quit/ctpvquit ctpvclear /usr/local/bin
mkdir -p /usr/local/share/man/man1
install -m 0644 doc/ctpv.1 /usr/local/share/man/man1
But it can't preview any text file with this error: ctpv: config:1:2 cannot handle character: ?
I'm trying
cptv
onFedora Linux Asahi Remix 40 aarch64
on theApple MacBook Air (13-inch, M2, 2022)
, linux kernel version isLinux 6.9.6-400.asahi.fc40.aarch64+16k
.Here is the installation process:
Compile and install without error:
But it can't preview any text file with this error:
ctpv: config:1:2 cannot handle character: ?
bat
works fine.screenshot: