bug-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: REGRESSION: cross compile 4.3 fail on mingw-w64 7.0/GCC 9.2


From: Nan .
Subject: Re: REGRESSION: cross compile 4.3 fail on mingw-w64 7.0/GCC 9.2
Date: Tue, 21 Jan 2020 15:44:48 +0000

Yes, you are correct. the first fail of 4.3 build is duplicated declaration of function fcntl
the fix is easy: just comment $/src/output.h LINE 92 (maybe not good fix, but it works on MinGW 7.0 GCC 9.2 on Windows).

after this fix, the second fail is what we were talking to

the GCC compile command line is :

make[1]: Entering directory '/home/build/obj/n-make'
depbase=`echo src/w32/compat/dirent.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
mingw64-gcc -DHAVE_CONFIG_H   -Isrc -I/home/build/src/make-4.3/src -Ilib -I/home/build/src/make-4.3/lib -DLIBDIR=\"/home/build/native/lib\" -DINCLUDEDIR=\"/home/build/native/include\" -DLOCALEDIR=\"/home/build/native/share/locale\" -I /home/build/src/make-4.3/src/w32/include -Os  -Os -MT src/w32/compat/dirent.o -MD -MP -MF $depbase.Tpo -c -o src/w32/compat/dirent.o /home/build/src/make-4.3/src/w32/compat/dirent.c &&\
mv -f $depbase.Tpo $depbase.Po
make[1]: Leaving directory '/home/build/obj/n-make'

and the error output is


/home/build/src/make-4.3/src/w32/compat/dirent.c: In function 'opendir':
/home/build/src/make-4.3/src/w32/compat/dirent.c:59:20: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_pDirectoryName'
   59 |         strcpy(pDir->dir_pDirectoryName, pDirName);
      |                    ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:62:28: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_pDirectoryName'
   62 |         pEndDirName = &pDir->dir_pDirectoryName[nBufferLen - 1];
      |                            ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:77:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_nNumFiles'
   77 |         pDir->dir_nNumFiles = 0;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:78:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
   78 |         pDir->dir_hDirHandle = INVALID_HANDLE_VALUE;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:79:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_ulCookie'
   79 |         pDir->dir_ulCookie = __DIRENT_COOKIE;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:79:30: error: '__DIRENT_COOKIE' undeclared (first use in this function); did you mean 'DLL_DIRECTORY_COOKIE'?
   79 |         pDir->dir_ulCookie = __DIRENT_COOKIE;
      |                              ^~~~~~~~~~~~~~~
      |                              DLL_DIRECTORY_COOKIE
/home/build/src/make-4.3/src/w32/compat/dirent.c:79:30: note: each undeclared identifier is reported only once for each function it appears in
/home/build/src/make-4.3/src/w32/compat/dirent.c: At top level:
/home/build/src/make-4.3/src/w32/compat/dirent.c:85:1: error: conflicting types for 'closedir'
   85 | closedir(DIR *pDir)
      | ^~~~~~~~
In file included from /home/build/src/make-4.3/src/w32/include/dirent.h:22,
                 from /home/build/src/make-4.3/src/w32/compat/dirent.c:24:
/home/build/cross/mingw64/include/dirent.h:65:29: note: previous declaration of 'closedir' was here
   65 | int __cdecl __MINGW_NOTHROW closedir (DIR*);
      |                             ^~~~~~~~
/home/build/src/make-4.3/src/w32/compat/dirent.c: In function 'closedir':
/home/build/src/make-4.3/src/w32/compat/dirent.c:94:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_ulCookie'
   94 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:94:35: error: '__DIRENT_COOKIE' undeclared (first use in this function); did you mean 'DLL_DIRECTORY_COOKIE'?
   94 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                                   ^~~~~~~~~~~~~~~
      |                                   DLL_DIRECTORY_COOKIE
/home/build/src/make-4.3/src/w32/compat/dirent.c:100:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  100 |         if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE)
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:101:31: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  101 |                 FindClose(pDir->dir_hDirHandle);
      |                               ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c: In function 'readdir':
/home/build/src/make-4.3/src/w32/compat/dirent.c:119:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_ulCookie'
  119 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:119:35: error: '__DIRENT_COOKIE' undeclared (first use in this function); did you mean 'DLL_DIRECTORY_COOKIE'?
  119 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                                   ^~~~~~~~~~~~~~~
      |                                   DLL_DIRECTORY_COOKIE
/home/build/src/make-4.3/src/w32/compat/dirent.c:124:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_nNumFiles'
  124 |         if (pDir->dir_nNumFiles == 0) {
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:125:21: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  125 |                 pDir->dir_hDirHandle = FindFirstFile(pDir->dir_pDirectoryName, &wfdFindData);
      |                     ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:125:58: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_pDirectoryName'
  125 |                 pDir->dir_hDirHandle = FindFirstFile(pDir->dir_pDirectoryName, &wfdFindData);
      |                                                          ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:126:25: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  126 |                 if (pDir->dir_hDirHandle == INVALID_HANDLE_VALUE)
      |                         ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:128:38: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  128 |         } else if (!FindNextFile(pDir->dir_hDirHandle, &wfdFindData))
      |                                      ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:132:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_nNumFiles'
  132 |         pDir->dir_nNumFiles++;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:135:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  135 |         pDir->dir_sdReturn.d_ino = (ino_t)-1;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:136:20: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  136 |         strcpy(pDir->dir_sdReturn.d_name, wfdFindData.cFileName);
      |                    ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:139:15: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  139 |           pDir->dir_sdReturn.d_type = DT_CHR;
      |               ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:139:39: error: 'DT_CHR' undeclared (first use in this function)
  139 |           pDir->dir_sdReturn.d_type = DT_CHR;
      |                                       ^~~~~~
/home/build/src/make-4.3/src/w32/compat/dirent.c:141:15: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  141 |           pDir->dir_sdReturn.d_type = DT_DIR;
      |               ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:141:39: error: 'DT_DIR' undeclared (first use in this function); did you mean 'DATADIR'?
  141 |           pDir->dir_sdReturn.d_type = DT_DIR;
      |                                       ^~~~~~
      |                                       DATADIR
/home/build/src/make-4.3/src/w32/compat/dirent.c:143:15: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  143 |           pDir->dir_sdReturn.d_type = DT_REG;
      |               ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:143:39: error: 'DT_REG' undeclared (first use in this function)
  143 |           pDir->dir_sdReturn.d_type = DT_REG;
      |                                       ^~~~~~
/home/build/src/make-4.3/src/w32/compat/dirent.c:145:21: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_sdReturn'
  145 |         return &pDir->dir_sdReturn;
      |                     ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c: In function 'rewinddir':
/home/build/src/make-4.3/src/w32/compat/dirent.c:157:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_ulCookie'
  157 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:157:35: error: '__DIRENT_COOKIE' undeclared (first use in this function); did you mean 'DLL_DIRECTORY_COOKIE'?
  157 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE) {
      |                                   ^~~~~~~~~~~~~~~
      |                                   DLL_DIRECTORY_COOKIE
/home/build/src/make-4.3/src/w32/compat/dirent.c:163:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  163 |         if (pDir->dir_hDirHandle != INVALID_HANDLE_VALUE)
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:164:36: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  164 |                 if (!FindClose(pDir->dir_hDirHandle))
      |                                    ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:168:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_hDirHandle'
  168 |         pDir->dir_hDirHandle = INVALID_HANDLE_VALUE;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:169:13: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_nNumFiles'
  169 |         pDir->dir_nNumFiles = 0;
      |             ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c: In function 'seekdir':
/home/build/src/make-4.3/src/w32/compat/dirent.c:181:17: error: 'DIR' {aka 'struct <anonymous>'} has no member named 'dir_ulCookie'
  181 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE)
      |                 ^~
/home/build/src/make-4.3/src/w32/compat/dirent.c:181:35: error: '__DIRENT_COOKIE' undeclared (first use in this function); did you mean 'DLL_DIRECTORY_COOKIE'?
  181 |         if (pDir->dir_ulCookie != __DIRENT_COOKIE)
      |                                   ^~~~~~~~~~~~~~~
      |                                   DLL_DIRECTORY_COOKIE
make[1]: *** [Makefile:1356: src/w32/compat/dirent.o] Error 1
make: *** [Makefile:1442: all-recursive] Error 1

hope this time is helpful, please let me know if you need additional information
thank you for your working on this.

Nan.

From: Paul Smith <address@hidden>
Sent: Monday, January 20, 2020 4:10 PM
To: Nan . <address@hidden>; address@hidden <address@hidden>
Subject: Re: REGRESSION: cross compile 4.3 fail on mingw-w64 7.0/GCC 9.2
 
On Mon, 2020-01-20 at 21:37 +0000, Nan . wrote:
> the actual command line is
>
> make[1]: Entering directory '/home/build/obj/n-make'
> depbase=`echo src/arscan.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
> mingw64-gcc -DHAVE_CONFIG_H   -Isrc -I/home/build/src/make-4.3/src -Ilib
> -I/home/build/src/make-4.3/lib -DLIBDIR=\"/home/build/native/lib\"
> -DINCLUDEDIR=\"/home/build/native/include\"
> -DLOCALEDIR=\"/home/build/native/share/locale\" -I /home/build/src/make-
> 4.3/src/w32/include -Os  -Os -MT src/arscan.o -MD -MP -MF $depbase.Tpo -c
> -o src/arscan.o /home/build/src/make-4.3/src/arscan.c &&\
> mv -f $depbase.Tpo $depbase.Po
> make[1]: Leaving directory '/home/build/obj/n-make'

Unfortunately that's the command line to compile src/arscan.c.

We need to see the compiler command line for the source file that was
failing, which is src/w32/compat/dirent.c.

Assuming that the dirent.c compile line also shows
/home/build/src/make-4.3/src/w32/include as an include directory, then I'm
not sure what the problem is.

Perhaps you can investigate by running the compile line from your shell
prompt and replacing the "-c -o src/w32/compat/dirent.o" options with
"-E -o dirent.i" options to see what the preprocessor says, and which
dirent.h is being included.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]