Научиться использовать Configure && Make с MinGW - PullRequest
0 голосов
/ 06 февраля 2020

Я использую Руфус на работе quire регулярно, и я хотел бы передать код проекту в благодарность. Проблема в том, что это первый проект C ++ с открытым исходным кодом, над которым я работал. В разделе «Компиляция» в README.md pbatard упоминается, что можно использовать «Configure && Make». Я обнаружил, что могу использовать msys.bat в C: \ MinGW \ msys \ 1.0 для запуска этих команд (в windows). Хотя я получаю следующие ошибки:

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for ar... ar
checking for ranlib... ranlib
checking for a sed that does not truncate output... /bin/sed
checking for rm... /bin/rm
checking for strip... strip
checking for windres... windres
checking for inline... inline
enabling Large File Support (ISO support)
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/bled/Makefile
config.status: creating src/ext2fs/Makefile
config.status: creating src/libcdio/iso9660/Makefile
config.status: creating src/libcdio/udf/Makefile
config.status: creating src/libcdio/driver/Makefile
config.status: creating res/loc/Makefile
config.status: creating src/ms-sys/Makefile
config.status: creating src/syslinux/libfat/Makefile
config.status: creating src/syslinux/libinstaller/Makefile
config.status: creating src/syslinux/win/Makefile
Making all in src
make[1]: Entering directory `/c/Users/<username>/Documents/C++/rufus/src'
Making all in bled
make[2]: Entering directory `/c/Users/<username>/Documents/C++/rufus/src/bled'
  CC       libbled_a-bled.o
In file included from c:\mingw\include\stdio.h:95,
                 from ../msapi_utf8.h:23,
                 from libbb.h:24,
                 from bled.c:14:
c:\mingw\include\sys/types.h:98:22: error: conflicting types for 'off64_t'
   typedef __off64_t  off64_t;
                      ^~~~~~~
<command-line>: note: previous declaration of 'off64_t' was here
<command-line>: error: conflicting types for 'off64_t'
In file included from c:\mingw\include\stdio.h:95,
                 from ../msapi_utf8.h:23,
                 from libbb.h:24,
                 from bled.c:14:
c:\mingw\include\sys/types.h:98:22: note: previous declaration of 'off64_t' was here
   typedef __off64_t  off64_t;
                      ^~~~~~~
In file included from c:\mingw\include\io.h:56,
                 from c:\mingw\include\dos.h:64,
                 from c:\mingw\include\direct.h:53,
                 from ../msapi_utf8.h:30,
                 from libbb.h:24,
                 from bled.c:14:
c:\mingw\include\sys\types.h:98:22: error: conflicting types for 'off64_t'
   typedef __off64_t  off64_t;
                      ^~~~~~~
<command-line>: note: previous declaration of 'off64_t' was here
In file included from libbb.h:24,
                 from bled.c:14:
../msapi_utf8.h: In function 'fopenU':
../msapi_utf8.h:1005:2: error: implicit declaration of function '_wfopen_s'; did you mean '_wfopen'? [-Werror=implicit-function-declaration]
  _wfopen_s(&ret, wfilename, wmode);
  ^~~~~~~~~
  _wfopen
../msapi_utf8.h: In function '_openU':
../msapi_utf8.h:1021:2: error: implicit declaration of function '_wsopen_s'; did you mean '_wsopen'? [-Werror=implicit-function-declaration]
  _wsopen_s(&ret, wfilename, oflag, shflag, pmode);
  ^~~~~~~~~
  _wsopen
In file included from bled.c:14:
libbb.h: In function 'localtime_r':
libbb.h:198:6: error: implicit declaration of function 'localtime_s'; did you mean 'localtime_r'? [-Werror=implicit-function-declaration]
  if (localtime_s(result, timep) != 0)
      ^~~~~~~~~~~
      localtime_r
cc1.exe: some warnings being treated as errors
make[2]: *** [libbled_a-bled.o] Error 1
make[2]: Leaving directory `/c/Users/amnet_admin/Documents/C++/rufus/src/bled'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/Users/amnet_admin/Documents/C++/rufus/src'
make: *** [all-recursive] Error 1

Что-то не так с MinGW, или что-то не так с кодом? Я бы подумал, что это сработало бы, так как меня клонировали Релиз 3.8

Большое спасибо!

...