Manual compilation fails (the latest 2.6.0 release)
AngryPhantom opened this issue · 2 comments
Hello, I'm using Artix Linux (Arch-based, but without systemd) and I cannot compile hstr manually with ./configure && make. Took the latest tarball from the Releases page.
Compiling from AUR is OK
Here is the output:
gcc -DPACKAGE_NAME=\"hstr\" -DPACKAGE_TARNAME=\"hstr\" -DPACKAGE_VERSION=\"2.6.0\" -DPACKAGE_STRING=\"hstr\ 2.6.0\" -DPACKAGE_BUGREPORT=\"martin.dvorak@mindforger.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hstr\" -DVERSION=\"2.6.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBNCURSESW=1 -DHAVE_LIBM=1 -DHAVE_LIBREADLINE=1 -DHAVE__BOOL=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DHAVE_MEMSET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -I. --pedantic -Wall -std=c99 -O2 -g -O2 -MT hstr_curses.o -MD -MP -MF .deps/hstr_curses.Tpo -c -o hstr_curses.o hstr_curses.c
In file included from hstr_curses.c:20:
include/hstr_curses.h:27:10: fatal error: ncursesw/curses.h: No such file or directory
27 | #include <ncursesw/curses.h>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:402: hstr_curses.o] Error 1
make[1]: Leaving directory '/home/satellite/hstr/src'
make: *** [Makefile:408: all-recursive] Error 1
Though ncurses is installed in the system:
pacman -F curses.h
system/ncurses 6.4-1 [installed]
usr/include/curses.h
I know, I know, why even bother if it's in AUR. But, anyway, just curious how is this even possible?
TIA
P.S. With makepkg from AUR everything is fine. Here's this very excerpt:
gcc -DPACKAGE_NAME=\"hstr\" -DPACKAGE_TARNAME=\"hstr\" -DPACKAGE_VERSION=\"2.6.0\" -DPACKAGE_STRING=\"hstr\ 2.6.0\" -DPACKAGE_BUGREPORT=\"martin.dvorak@mindforger.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"hstr\" -DVERSION=\"2.6.0\" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_LIBNCURSESW=1 -DHAVE_LIBM=1 -DHAVE_LIBREADLINE=1 -DHAVE__BOOL=1 -DHAVE_MALLOC=1 -DHAVE_MEMSET=1 -DHAVE_STRDUP=1 -DHAVE_STRSTR=1 -I. --pedantic -Wall -std=c99 -O2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -MT hstr_curses.o -MD -MP -MF .deps/hstr_curses.Tpo -c -o hstr_curses.o hstr_curses.c
mv -f .deps/hstr_curses.Tpo .deps/hstr_curses.Po
The reason it works for the makepg Version from AUR, is that in the build step a small patch is applied to the headers before running configure and make
build() {
cd "$pkgname-$pkgver/build/tarball"
./tarball-automake.sh
cd ../..
sed -i -e "s#<ncursesw/curses.h>#<curses.h>#g" src/include/hstr_curses.h
sed -i -e "s#<ncursesw/curses.h>#<curses.h>#g" src/include/hstr.h
./configure --prefix=/usr
make
}
@ChristianWieden Ah, I see now. Thanks, closing the issue then. Is this patch intended for this very reason in Arch?