Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #863322

Configure detection of _mkdir() fails, leading to build error in MinGW

Added by Marko Lindqvist over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Bootstrap
Sprint/Milestone:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

In S3_0 crosser based build (at least), configure fails to detect availability of _mkdir(). At compile that leads to an attempt to fall back to mkdir() which takes wrong number of parameters in Windows and thus results in compile error.

From config.log:

configure:28352: checking for _mkdir
configure:28352: x86_64-w64-mingw32-gcc -static-libgcc -static-libstdc++ -o conftest.exe -Wno-error -I/work/install/crosser/win64stack-full-1.8.51.01/include -D_WIN32_WINNT=0x0601 -DBINDIR="\"${exec_prefix}/bin\"" -Werror -Wno-tautological-compare -Wno-nonnull-compare -Wall -Wpointer-arith -Wcast-align -Werror -Wmissing-prototypes -Wmissing-declarations -Wformat -Wformat-security -Wnested-externs -Wshadow -Wold-style-declaration -Wold-style-definition -Wtype-limits conftest.c -lws2_32 /work/install/crosser/win64stack-full-1.8.51.01/lib/libiconv.dll.a -L/usr/crosser/win64stack-full-1.8.51.01/lib -L/work/install/crosser/win64stack-full-1.8.51.01/lib >&5
conftest.c: In function 'main':
conftest.c:174:1: error: old-style function definition [-Werror=old-style-definition]
main ()
^~~~


Related issues

Blocks Freeciv - Feature #853949: Crosser-1.9Closed

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

History

#1 Updated by Marko Lindqvist over 1 year ago

I think all function checks, that configure does with AC_CHECK_FUNCS after it has set debug compilation flags to use, are affected.
Debug flags need to be set before checking for _mkdir(), as configure.ac comment says:
"dnl Possible "-Wmissing-declarations" and "-Werror" will prune out
dnl cases where we should not use _mkdir() even if it's possible to link against it"
I'm not sure if that's absolutely needed in later branches where msys1 is no longer supported, but at least in S2_6 it is.

For S2_6, at least, I would resolve this by reverting addition of -Wold-style-definition debug compilation flag.

#2 Updated by Marko Lindqvist over 1 year ago

#3 Updated by Jacob Nevins over 1 year ago

For S2_6, at least, I would resolve this by reverting addition of -Wold-style-definition debug compilation flag

Sounds good to me (since I was the one that added it).

#4 Updated by Marko Lindqvist over 1 year ago

Patches to revert -Wold-style-definition from stable branches.
Another solution for master will be implemented at later time.

#5 Updated by Marko Lindqvist over 1 year ago

  • Status changed from Resolved to New

S2_6/S3_0 pushed, waiting for master implementation.

#6 Updated by Marko Lindqvist over 1 year ago

Patch that could work for master unless it breaks msys2 build (to be tested).

#7 Updated by Marko Lindqvist over 1 year ago

Marko Lindqvist wrote:

... unless it breaks msys2 build (to be tested).

Msys2 configure and compile of related parts go through, so I think this is not causing problems. Currently msys2 build of Qt-client fails for other reasons.

#8 Updated by Marko Lindqvist over 1 year ago

  • Status changed from Resolved to Closed
  • Assignee set to Marko Lindqvist

Also available in: Atom PDF