gansm / finalcut

A text-based widget toolkit
https://github.com/gansm/finalcut/wiki/First-steps#first-steps-with-the-final-cut-widget-toolkit
GNU Lesser General Public License v3.0
981 stars 52 forks source link

Failed to build on MSYS2 MinGW64 #121

Closed ghost closed 1 year ago

ghost commented 1 year ago

Note: on MSYS2 MinGW64, need to install these packages before running autoconf: mingw-w64-x86_64-autotools autoconf-archive

The error messages:

make  all-recursive
make[1]: Entering directory '/home/Administrator/finalcut'
Making all in final
make[2]: Entering directory '/home/Administrator/finalcut/final'
Making all in .
make[3]: Entering directory '/home/Administrator/finalcut/final'
depbase=`echo dialog/fdialog.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/sh ../libtool  --tag=CXX   --mode=compile g++ -std=c++14 -DHAVE_CONFIG_H -I. -I..  -I../final -Wall -Werror -DCOMPILE_FINAL_CUT -std=c++14   -O3 -MT dialog/fdialog.lo -MD -MP -MF $depbase.Tpo -c -o dialog/fdialog.lo dialog/fdialog.cpp &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -std=c++14 -DHAVE_CONFIG_H -I. -I.. -I../final -Wall -Werror -DCOMPILE_FINAL_CUT -std=c++14 -O3 -MT dialog/fdialog.lo -MD -MP -MF dialog/.deps/fdialog.Tpo -c dialog/fdialog.cpp  -DDLL_EXPORT -DPIC -o dialog/.libs/fdialog.o
In file included from ../final/util/fdata.h:45,
                 from ../final/fevent.h:88,
                 from ../final/menu/fmenu.h:59,
                 from ../final/dialog/fdialog.h:56,
                 from dialog/fdialog.cpp:25:
../final/util/fstring.h:38:10: fatal error: langinfo.h: No such file or directory
   38 | #include <langinfo.h>
      |          ^~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:1034: dialog/fdialog.lo] Error 1
make[3]: Leaving directory '/home/Administrator/finalcut/final'
make[2]: *** [Makefile:1251: all-recursive] Error 1
make[2]: Leaving directory '/home/Administrator/finalcut/final'
make[1]: *** [Makefile:498: all-recursive] Error 1
make[1]: Leaving directory '/home/Administrator/finalcut'
make: *** [Makefile:386: all] Error 2

langinfo.h is a posix header so it seems your library required posix compatibility? MSYS2 MinGW64 is unlike Cygwin, it targets native Windows so it doesn't have that header.

gansm commented 1 year ago

Hello tn1997tn, you are right, FINAL CUT needs a POSIX system. You should be able to install langinfo.h with the package msys2-runtime-devel.

ghost commented 1 year ago

You used the MSYS Shell. I'm talking about the MINGW64 Shell (also part of MSYS2). On MSYS2, each Shell is a separate environment. Installing msys2-runtime-devel will have no affect on the MINGW64 Shell as that package is specific to the MSYS Shell. But thank you anyway for the information, if FINAL CUT needs a POSIX system then it will not work on the MINGW64 Shell. It worked on the MSYS Shell because the MSYS Shell's environment is indeed a fork of Cygwin so it's a POSIX system.