From: SF/projects/mingw n. l. <min...@li...> - 2011-10-12 19:58:28
|
Bugs item #3173142, was opened at 2011-02-04 22:12 Message generated for change (Comment added) made by cstrauss You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3173142&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Daniel Leidert (dleidert) Assigned to: Cesar Strauss (cstrauss) Summary: Build failure by pthread.h including config.h Initial Comment: I stumbled over a build failure (aspell), because pthread.h contains this statement: #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ If config.h is expected to be shipped with pthread, then it is missing. If config.h is expected to be a file of the project (IMHO this is a very stupid idea), -DHAVE_CONFIG_H does not mean there is a config.h. This macro is a result of AM_CONFIG_HEADER (or AC_...) which allows to choose every filename, not just config.h. So in a project using the AM_CONFIG_HEADER macro with a file != config.h the build will fail. ---------------------------------------------------------------------- >Comment By: Cesar Strauss (cstrauss) Date: 2011-10-12 16:58 Message: Since the last update, pthread,h has changed to: #if HAVE_PTW32_CONFIG_H #include "config.h" #endif /* HAVE_PTW32_CONFIG_H */ So, I think the issue can be closed. Thanks, Cesar ---------------------------------------------------------------------- Comment By: Steven R. Loomis (srloomis) Date: 2011-05-11 13:27 Message: I hit this in ICU as well, http://bugs.icu-project.org/trac/ticket/8535 - I looked at the upstream http://sourceware.org/pthreads-win32/ but didn't see any mention of this issue. Has it been raised? Autoconf sets HAVE_CONFIG_H in DEFS if config.h is being used, so it seems that to be able to include pthread.h we need to make sure HAVE_CONFIG_H isn't set. We actually have the file named something else besides config.h (that is configrable, but the #define is NOT), so including pthread.h results in a missing header. I think the line is just bogus in pthread.h as an exportable library. Trunk (as of this writing) pthreads-win32 has the following two lines, which would at least not break ICU: http://sourceware.org/cgi-bin/cvsweb.cgi/pthreads/?cvsroot=pthreads-win32 #if HAVE_PTW32_CONFIG_H #include "config.h" #endif /* HAVE_PTW32_CONFIG_H */ ---------------------------------------------------------------------- Comment By: Keith Marshall (keithmarshall) Date: 2011-02-05 17:41 Message: config.h is ALWAYS a project-private header, which is to be generated by running configure, so no, it is not expected to be distributed with pthread, (and it would be wrong if it were). However, I guess pthread.h is intended as a public header. Thus, it IS a bug in pthread.h for it to #include ANY project-private file such as config.h, irrespective of the HAVE_CONFIG_H guard. I guess you need to raise this issue upstream, with the pthread-win32 folks. Meanwhile, I'll leave it to Cesar to decide how to deal with the issue, in our redistributed copy. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=3173142&group_id=2435 |