Opened 12 years ago

Closed 5 years ago

#585 closed defect (fixed)

mingw64 trunk make check fail on badthreadtest

Reported by: robe Owned by: geos-devel@…
Priority: minor Milestone: 3.8.0
Component: Default Version: main
Severity: Unassigned Keywords:
Cc:

Description

strk,

Okay I've had enough of these false warnings. I think you and Mat decided this was not a mingw64 only issue, and that it shouldn't even be going into this loop and there is something wrong with your arm configure script. Error:

make  threadtest.exe badthreadtest.exe
make[4]: Entering directory `/c/jenkins/geos/branches/3.4/tests/thread'
x86_64-w64-mingw32-gcc -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos -I../../include -I../../tests/unit/tut -I../../capi   -pedantic -Wall -ansi -Wno-long-long  -ffloat-store -g -O2 -MT threadtest.o -MD -MP -MF .deps/threadtest.Tpo -c -o threadtest.o threadtest.c
In file included from c:\ming64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/include/unistd.h:10:0,
                 from threadtest.c:19:
../../include/geos/io.h:19:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'geos'
In file included from ../../include/geos/io.h:48:0,
                 from c:\ming64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/include/unistd.h:10,
                 from threadtest.c:19:
../../include/geos/io/ByteOrderDataInStream.h:30:61: fatal error: iosfwd: No such file or directory
compilation terminated.
make[4]: *** [threadtest.o] Error 1
make[4]: Leaving directory `/c/jenkins/geos/branches/3.4/tests/thread'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/c/jenkins/geos/branches/3.4/tests/thread'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/c/jenkins/geos/branches/3.4/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/c/jenkins/geos/branches/3.4'
make: *** [check] Error 2

Full gory details here:

http://winjen.postgis.net:1500/view/GEOS/job/GEOS_Trunk_ming/30/console

It should automatically rebuild after you commit a change. Well within 15 minutes, but you can manually build. You know the account.

Change History (18)

comment:1 by robe, 12 years ago

This is a bit more complicated than I thought. My windows 7 64-bit which is running the same version and gcc mingw64 as the windows bot. The windows bot is windows 2003 64-bit.

These errors are not showing up at all on my windows 7, however I'm getting a lot of xmltester failures which I think is a new issue. I'll post as separate ticket.

comment:2 by robe, 12 years ago

Resolution: invalid
Status: newclosed

Nevermind. The fundamental problem is that the platform.h.in is all wrong for 64-bit builds, but more or less right for 32-bit builds.

I discovered why my windows 7 box was exhibiting different failures.

In my jenkins install, I had hacked the platform.h.in to work for mingw64 bit using the hack:

http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw64_how_to.html#libgeos

, but it caused issues for 32-bit evidentally causing it to go thru this badthreadtest loop. So short answer your platform thingy doesn't work and I have to have a different one for 32 vs. 64 bit.

comment:3 by robe, 12 years ago

Resolution: invalid
Status: closedreopened

Can WE PLEASE GET RID OF THIS badthreadtest or explain whether it is supposed to be tested or not. It's stopping the xmltester from being tested it seems.

comment:4 by strk, 12 years ago

Could try try renaming badtreadtest.c to badtreadtest.cpp, update the Makefile.am accordingly and restart from ./autogen.sh step ?

comment:5 by robe, 12 years ago

That didn't work. I had to rename both badthreadtest and threadtest and change the .am file, but just got different error:

x86_64-w64-mingw32-g++ -DHAVE_CONFIG_H -I. -I../../include -I../../include/geos -I../../include -I../../tests/unit/tut -I../../capi   -DGEOS_INLINE  -pedantic -Wall -ansi -Wno-long-long  -ffloat-store -g -O2 -MT threadtest.o -MD -MP -MF .deps/threadtest.Tpo -c -o threadtest.o threadtest.cc
In file included from c:\ming64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/include/unistd.h:10:0,
                 from threadtest.cc:19:
../../include/geos/io.h:61:2: warning: #warning *** DEPRECATED: You are using deprecated header io.h. Please, update your sources according to new layout of GEOS headers and namespaces
threadtest.cc:23:21: fatal error: pthread.h: No such file or directory
compilation terminated.
make[4]: *** [threadtest.o] Error 1
make[4]: Leaving directory `/c/jenkins/geos/branches/3.4/tests/thread'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/c/jenkins/geos/branches/3.4/tests/thread'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/c/jenkins/geos/branches/3.4/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/c/jenkins/geos/branches/3.4'
make: *** [check] Error 2

comment:6 by strk, 12 years ago

Do you have a x86_64-w64-mingw32-g++ binary ?

comment:7 by robe, 12 years ago

Yes. Right in the bin folder where it should be.

comment:8 by robe, 12 years ago

BTW this is testing my 64-bit not my 32-bit.

comment:9 by strk, 12 years ago

I'm looking again at the original report and can't understand this message:

In file included from c:\ming64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/include/unistd.h:10:0,
                 from threadtest.c:19:
../../include/geos/io.h:19:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'geos'

Where is c:\ming64\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.5.4/../../../../x86_64-w64-mingw32/include/unistd.h ? And what is including io.h ?

comment:10 by robe, 12 years ago

I see an unistd.h in:

C:\ming64\mingw64\x86_64-w64-mingw32\include\unistd.h

and it does have a io.h include in the file. The file is fairly short -- looks like this:

/**
 * This file has no copyright assigned and is placed in the Public Domain.
 * This file is part of the w64 mingw-runtime package.
 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
 */
#ifndef _UNISTD_H
#define _UNISTD_H
#define __UNISTD_H_SOURCED__ 1

#include <io.h>
#include <process.h>
#include <getopt.h>

#ifdef __cplusplus
extern "C" {
#endif

#if !defined __NO_ISOCEXT
#include <sys/types.h> /* For useconds_t. */

int __cdecl __MINGW_NOTHROW usleep(useconds_t useconds);
#endif  /* Not __NO_ISOCEXT */

#ifndef FTRUNCATE_DEFINED
#define FTRUNCATE_DEFINED
/* This is defined as a real library function to allow autoconf
   to verify its existence. */
#if !defined(NO_OLDNAMES) || defined(_POSIX)
int ftruncate(int, off_t);
#ifndef __CRT__NO_INLINE
__CRT_INLINE int ftruncate(int __fd, off_t __length)
{
  return _chsize (__fd, __length);
}
#endif /* !__CRT__NO_INLINE */
#else
int ftruncate(int, _off_t);
#ifndef __CRT__NO_INLINE
__CRT_INLINE int ftruncate(int __fd, _off_t __length)
{
  return _chsize (__fd, __length);
}
#endif /* !__CRT__NO_INLINE */
#endif
#endif /* FTRUNCATE_DEFINED */

#ifndef _CRT_SWAB_DEFINED
#define _CRT_SWAB_DEFINED /* Also in stdlib.h */
  void __cdecl swab(char *_Buf1,char *_Buf2,int _SizeInBytes);
#endif

#ifdef __cplusplus
}
#endif

#undef __UNISTD_H_SOURCED__
#endif /* _UNISTD_H */

comment:11 by strk, 12 years ago

interesting, so geos headers are hiding system ones! I guess renaming io.h.

Try removing -I../../include/geos from the CFLAGS

comment:12 by strk, 12 years ago

I'm afraid include/geos gets into DEAULT_INCLUDE due to

AM_CONFIG_HEADER([include/geos/platform.h])

we might need another macro to generate that file without it being in the default -I

comment:13 by strk, 12 years ago

confirmed, it's all AM_CONFIG_HEADER's fault !

comment:14 by strk, 12 years ago

I think we could rename io.h to geosIO.h, btw. I dubt anyone is using that header, and if it does it's known that C++ API is prone to changes.

Anyway a more elegant solution only affecting DEFAULT_INCLUDE would be much better IMHO

comment:15 by robe, 11 years ago

Milestone: 3.4.0GEOS Future

don';t care since I'll be using Cmake from now on.

comment:16 by mloskot, 7 years ago

Has this been fixed? Does Robe's switch to CMake (finally! :-)) solve the problem?

comment:17 by robe, 6 years ago

Milestone: GEOS FutureGEOS Fund Me

Milestone renamed

comment:18 by robe, 5 years ago

Milestone: GEOS Fund Me3.8.0
Resolution: fixed
Status: reopenedclosed

I switched to CMake a while ago, but anyway autotools is working again as a result of recent changes in the past 10 days, soo we can close this one out as fixed in 3.8

Note: See TracTickets for help on using tickets.