You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2020/09/19 02:26:52 UTC

[Bug 64753] New: Can not determine the proper size for pid_t

https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

            Bug ID: 64753
           Summary: Can not determine the proper size for pid_t
           Product: APR
           Version: 1.7.0
          Hardware: Macintosh
            Status: NEW
          Severity: normal
          Priority: P2
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: ajstewart426@gmail.com
  Target Milestone: ---

I recently updated to XCode 12 on macOS 10.15.6, which comes with Apple Clang
12.0.0 (LLVM Clang 10.0.0). I am no longer able to compile APR from source. I
see the following error message:


In file included from encoding/apr_encode.c:28:
In file included from ./include/apr_encode.h:24:
./include/apr.h:561:2: error: Can not determine the proper size for pid_t
#error Can not determine the proper size for pid_t
 ^
In file included from encoding/apr_encode.c:30:
In file included from ./include/apr_strings.h:52:
./include/apr_want.h:94:8: error: redefinition of 'iovec'
struct iovec
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_iovec_t.h:31:8:
note: previous definition is here
struct iovec {
       ^
2 errors generated.
make[1]: *** [encoding/apr_encode.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
In file included from strings/apr_cpystrn.c:17:
./include/apr.h:561:2: error: Can not determine the proper size for pid_t
#error Can not determine the proper size for pid_t
 ^
In file included from passwd/apr_getpass.c:22:
In file included from
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-apr-1.7.0-pw3odg3co73bcqzmq4nptwwyhbkdxab7/spack-src/include/arch/unix/apr_private.h:1074:
In file included from
/var/folders/21/hwq39zyj4g36x6zjfyl5l8080000gn/T/Adam/spack-stage/spack-stage-apr-1.7.0-pw3odg3co73bcqzmq4nptwwyhbkdxab7/spack-src/include/arch/unix/../apr_private_common.h:24:
In file included from ./include/apr_pools.h:43:
./include/apr.h:561:2: error: Can not determine the proper size for pid_t
#error Can not determine the proper size for pid_t
 ^
In file included from strings/apr_cpystrn.c:18:
In file included from ./include/apr_strings.h:52:
./include/apr_want.h:94:8: error: redefinition of 'iovec'
struct iovec
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_iovec_t.h:31:8:
note: previous definition is here
struct iovec {
       ^
In file included from passwd/apr_getpass.c:23:
In file included from ./include/apr_strings.h:52:
./include/apr_want.h:94:8: error: redefinition of 'iovec'
struct iovec
       ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_iovec_t.h:31:8:
note: previous definition is here
struct iovec {
       ^
2 errors generated.
make[1]: *** [strings/apr_cpystrn.lo] Error 1
2 errors generated.
make[1]: *** [passwd/apr_getpass.lo] Error 1
make: *** [all-recursive] Error 1


Compilation worked fine on macOS 10.15.6 with XCode 11, which comes with Apple
Clang 11.0.3 (LLVM Clang 9.0.0), so I believe this is a consequence of a
stricter compiler.

If anyone can come up with a patch to fix this, I'll add it to the Spack
package manager.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #7 from Taw <ta...@gmail.com> ---
@Ruediger Pluem
Unfortunately your patch does not work for 2 reasons:
1. That code is at line ~533, not 495
2. Even if I put that patch at correct lines, I get the same error.

So I unzip the archive, modify this and then run ./configure and I get the same
"can not determine the proper size for pid_t" error

Am I doing something wrong?
Thanks

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

don <do...@isle.plus> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |don@isle.plus

--- Comment #11 from don <do...@isle.plus> ---
Created attachment 37799
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37799&action=edit
Quickfix to build APR on macOS 11.2

Build process with attached patch:

```
tar xf apr-1.7.0.tar.gz
patch -s -p0 -i apr-1.7.0-macos11.2.patch
cd apr-1.7.0
rm configure
autoreconf
CFLAGS=-DAPR_IOVEC_DEFINED ./configure
make
```

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #8 from Michael Driscoll <md...@tenable.com> ---
See my comment on bug #50146, but there are two issues here (which my org is
also seeing).  Note that my org is likely on an older version of APR, so my
crude patch attached to bug #50146 is not likely to apply cleanly and could
take some tweaking.

To summarize, I think Adam is seeing two issues in this bug report:

- "struct iovec" problem due to use of `fprintf("%d", sizeof(struct iovec))`
(fatal warning due to %d being invalid for a size_t).  This causes configure to
mis-detect that the system headers do not contain a definition for iovec.
- "Can not determine the proper size for pid_t" is caused by `configure`
generating programs that call `exit()` without including <stdlib.h>, which
seems to be well-covered in the comments above.

I don't know the magic to fix autoconf / autotools "correctly" for this, but I
hope the comment in bug #50146 gives the needed hints to those that do.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #13 from don <do...@isle.plus> ---
DONT use the `-DAPR_IOVEC_DEFINE` define of my previous post when building APR,
because this will break the httpd build. But do keep the pid_t patch. Or use
the below one-liner if you don't want to patch:

```
sed -i -e 's/#error .* pid_t/#define APR_PID_T_FMT "d"/' configure.in
```

The culprit is APR_CHECK_SIZEOF_EXTENDED. Tests fail because of undeclared
`exit()` function. Quick workaround: include `sodlib.h` in all occurrences of
`configure.in`.

Lastly, don't use `autoreconf -fvi`, but rather:

```
rm configure
./buildconf
```
This allows syccessful builds of apr, apr-util.



Cheers
JM Marcastel

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #3 from Mario Klebsch <Ma...@ime-actia.de> ---
There are other conftest.c snippets calling exit() and failing to compile
because of #include <stdlib.h> is missing.

Some conftest.c snippets do #include <stdlib.h> unconditionally, other #include
<stdlib.h> conditionally, either #ifdef STDC_HEADERS or # ifdef HAVE_STDLIB_H

I added #include <stdlib.h> to all conftest.c snippets calling exit(). apr
compiles for me on macOS, but I have not tested it, yet. Here is my diff:

*** configure.orig      2020-09-25 09:58:14.000000000 +0200
--- configure   2020-09-25 10:01:12.000000000 +0200
***************
*** 22913,22918 ****
--- 22913,22919 ----
  #include <errno.h>
  #include <string.h>
  #include <stdio.h>
+ #include <stdlib.h>
  main()
  {
    char buf[1024];
***************
*** 24475,24480 ****
--- 24476,24482 ----
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdio.h>
+ #include <stdlib.h>
  #include <sys/types.h>
  #ifdef WIN32
  #define binmode "b"
***************
*** 24800,24805 ****
--- 24802,24808 ----
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdio.h>
+ #include <stdlib.h>
  #include <sys/types.h>
  #ifdef WIN32
  #define binmode "b"
***************
*** 24864,24869 ****
--- 24867,24873 ----
  /* end confdefs.h.  */
  #include <stdio.h>
  #include <stddef.h>
+ #include <stdlib.h>
  #ifdef WIN32
  #define binmode "b"
  #else
***************
*** 24928,24933 ****
--- 24932,24938 ----
  /* end confdefs.h.  */
  #include <stdio.h>
  #include <sys/types.h>
+ #include <stdlib.h>
  #ifdef WIN32
  #define binmode "b"
  #else
***************
*** 25298,25303 ****
--- 25303,25309 ----
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdio.h>
+ #include <stdlib.h>
  $ac_includes_default
  #ifdef WIN32
  #define binmode "b"
***************
*** 25584,25589 ****
--- 25590,25596 ----
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  #include <stdio.h>
+ #include <stdlib.h>
  #include <sys/types.h>
  #include <sys/uio.h>
  #ifdef WIN32
***************
*** 26211,26216 ****
--- 26218,26224 ----
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/resource.h>
+ #include <stdlib.h>
  main()
  {
      struct rlimit limit;
***************
*** 26809,26814 ****
--- 26817,26823 ----
  /* end confdefs.h.  */

  #include <sys/types.h>
+ #include <stdlib.h>
  #include <pthread.h>
          int main()
          {
***************
*** 27454,27459 ****
--- 27463,27469 ----
  #endif
  #include <fcntl.h>
  #include <errno.h>
+ #include <stdlib.h>

  int fd;
  struct flock proc_mutex_lock_it = {0};
***************
*** 28763,28768 ****
--- 28773,28779 ----
  #ifndef HAVE_SOCKLEN_T
  typedef int socklen_t;
  #endif
+ #include <stdlib.h>
  int main(void) {
      int listen_s, connected_s, client_s;
      int listen_port, rc;
***************
*** 28913,28918 ****
--- 28924,28930 ----
  #ifdef HAVE_FCNTL_H
  #include <fcntl.h>
  #endif
+ #include <stdlib.h>
  int main(void) {
      int listen_s, connected_s, client_s;
      int listen_port, rc;
***************
*** 29598,29603 ****
--- 29610,29616 ----
  #ifdef HAVE_SYS_SOCKET_H
  #include <sys/socket.h>
  #endif
+ #include <stdlib.h>

  int main(void) {
      struct addrinfo hints, *ai;
***************
*** 29661,29666 ****
--- 29674,29680 ----
  #ifdef HAVE_NETDB_H
  #include <netdb.h>
  #endif
+ #include <stdlib.h>

  int main(void) {
      if (EAI_ADDRFAMILY < 0) {
***************
*** 29722,29727 ****
--- 29736,29742 ----
  #ifdef HAVE_NETINET_IN_H
  #include <netinet/in.h>
  #endif
+ #include <stdlib.h>

  int main(void) {
      struct sockaddr_in sa;

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #12 from don <do...@isle.plus> ---
@Zlich thanks it did help. Attached a minimal patch based on you analysis.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #6 from Ruediger Pluem <rp...@apache.org> ---
(In reply to Adam Stewart from comment #5)
> Thanks Mario, your patch worked perfectly! I'll add this to the Spack
> package manager. I assume this will be included in the next release of APR?

Unfortunately the patch is wrong and cannot be included:

1. It needs to be against trunk.
2. Patching configure is wrong as this file is generated from various other
files e.g. configure.in via autoconf during building the source tar ball. The
source of the first patch location

*** configure.orig      2020-09-25 09:58:14.000000000 +0200
--- configure   2020-09-25 10:01:12.000000000 +0200
***************
*** 22913,22918 ****
--- 22913,22919 ----
  #include <errno.h>
  #include <string.h>
  #include <stdio.h>
+ #include <stdlib.h>
  main()
  {
    char buf[1024];

seem to be here:

Index: build/apr_common.m4
===================================================================
--- build/apr_common.m4 (revision 1881726)
+++ build/apr_common.m4 (working copy)
@@ -495,6 +495,9 @@
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 main()
 {
   char buf[1024];


It might be also needed to ifdef the include, but this is not done consistently
over the various calls to AC_TRY_RUN. I leave it to others to comment whether
this is mandatory or not.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #5 from Adam Stewart <aj...@gmail.com> ---
Thanks Mario, your patch worked perfectly! I'll add this to the Spack package
manager. I assume this will be included in the next release of APR?

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #14 from Alexander <al...@syntevo.com> ---
This problem occurs with sources from 1.7.0 tag.

I was able to solve it by cherry-picking r1871980 + r1882979 and then running
`./buildconf` to generate 'configure'.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #4 from Mario Klebsch <Ma...@ime-actia.de> ---
P.S.
apr-1.7.0 % gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #10 from Penghui Li <li...@gmail.com> ---
Yes, the bug does exist till now. I finally install apr via Homebrew, and then
pass the APR path to ./configure option to install Apache.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

Nick Kew <ni...@webthing.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Nick Kew <ni...@webthing.com> ---
Thanks for the report.  I haven't seen this, and have no idea if anyone else on
the APR team has.

If you are involved in, or have access to, any Apple/Mac-oriented developer
fora, it would be great if you could raise the matter there to try and tap
their expertise.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #2 from Mario Klebsch <Ma...@ime-actia.de> ---
The cause is a missing #include <stdlib.h> in a contest.c program. Here is a
snippet from config.log:

configure:24467: checking size of pid_t
configure:24492: gcc -o conftest -g -O2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-DDARWIN_10  conftest.c -lpthread >&5
conftest.c:155:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
main()
^
conftest.c:158:11: error: implicitly declaring library function 'exit' with
type 'void (int) __attribute__((noreturn))'
[-Werror,-Wimplicit-function-declaration]
  if (!f) exit(1);
          ^
conftest.c:158:11: note: include the header <stdlib.h> or explicitly provide a
declaration for 'exit'
conftest.c:159:22: warning: format specifies type 'int' but the argument has
type 'unsigned long' [-Wformat]
  fprintf(f, "%d\n", sizeof(pid_t));
              ~~     ^~~~~~~~~~~~~
              %lu
2 warnings and 1 error generated.
configure:24492: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define __EXTENSIONS__ 1
| #define _ALL_SOURCE 1
| #define _GNU_SOURCE 1
| #define _POSIX_PTHREAD_SEMANTICS 1
| #define _TANDEM_SOURCE 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_ATOMIC_BUILTINS 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_PTHREAD_H 1
| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1
| #define HAVE_PTHREAD_KEY_DELETE 1
| #define HAVE_PTHREAD_RWLOCK_INIT 1
| #define HAVE_PTHREAD_ATTR_SETGUARDSIZE 1
| #define HAVE_PTHREAD_RWLOCKS 1
| #define HAVE_SCHED_H 1
| #define HAVE_SCHED_YIELD 1
| #define READDIR_IS_THREAD_SAFE 1
| #define HAVE_SIGSUSPEND 1
| #define HAVE_SIGWAIT 1
| #define HAVE_POLL 1
| #define HAVE_KQUEUE 1
| #define HAVE_GETPWNAM_R 1
| #define HAVE_GETPWUID_R 1
| #define HAVE_GETGRNAM_R 1
| #define HAVE_GETGRGID_R 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_IPC_H 1
| #define HAVE_SYS_SHM_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_NET_IF_H 1
| #define HAVE_MMAP 1
| #define HAVE_MUNMAP 1
| #define HAVE_SHM_OPEN 1
| #define HAVE_SHM_UNLINK 1
| #define HAVE_SHMGET 1
| #define HAVE_SHMAT 1
| #define HAVE_SHMDT 1
| #define HAVE_SHMCTL 1
| #define HAVE_MPROTECT 1
| #define HAVE_MAP_ANON 1
| #define anonymous shared memory allocation method 1
| #define USE_SHMEM_MMAP_ANON 1
| #define namebased memory allocation method 1
| #define USE_SHMEM_SHMGET 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_ALLOCA 1
| #define HAVE_CALLOC 1
| #define HAVE_SETSID 1
| #define HAVE_ISINF 1
| #define HAVE_ISNAN 1
| #define HAVE_GETENV 1
| #define HAVE_PUTENV 1
| #define HAVE_SETENV 1
| #define HAVE_UNSETENV 1
| #define HAVE_WRITEV 1
| #define HAVE_GETIFADDRS 1
| #define HAVE_UTIME 1
| #define HAVE_UTIMES 1
| #define HAVE_SETRLIMIT 1
| #define HAVE_GETRLIMIT 1
| #define HAVE_SENDFILE 1
| #define HAVE_SIGACTION 1
| #define HAVE_DECL_SYS_SIGLIST 1
| #define HAVE_FORK 1
| #define HAVE_STRERROR_R 1
| #define HAVE_MMAP 1
| #define HAVE_MEMMOVE 1
| #define HAVE_GETPASS 1
| #define HAVE_GMTIME_R 1
| #define HAVE_LOCALTIME_R 1
| #define HAVE_MKSTEMP 1
| #define STDC_HEADERS 1
| #define HAVE_CTYPE_H 1
| #define HAVE_DIRENT_H 1
| #define HAVE_DLFCN_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_GRP_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_MACH_O_DYLD_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_NETDB_H 1
| #define HAVE_POLL_H 1
| #define HAVE_PWD_H 1
| #define HAVE_SEMAPHORE_H 1
| #define HAVE_SIGNAL_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDIO_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_TERMIOS_H 1
| #define HAVE_TIME_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_ARPA_INET_H 1
| #define HAVE_NETINET_IN_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_SYS_IOCTL_H 1
| #define HAVE_SYS_MMAN_H 1
| #define HAVE_SYS_PARAM_H 1
| #define HAVE_SYS_POLL_H 1
| #define HAVE_SYS_RESOURCE_H 1
| #define HAVE_SYS_SELECT_H 1
| #define HAVE_SYS_SEM_H 1
| #define HAVE_SYS_SIGNAL_H 1
| #define HAVE_SYS_SOCKET_H 1
| #define HAVE_SYS_SOCKIO_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_SYS_SYSCTL_H 1
| #define HAVE_SYS_SYSLIMITS_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_UIO_H 1
| #define HAVE_SYS_UN_H 1
| #define HAVE_SYS_WAIT_H 1
| #define HAVE_NETINET_TCP_H 1
| #define SETPGRP_VOID 1
| #define HAVE_SOCKLEN_T 1
| #define SIZEOF_VOIDP 8
| #define SIZEOF_CHAR 1
| #define SIZEOF_SHORT 2
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 8
| #define SIZEOF_LONG_LONG 8
| /* end confdefs.h.  */
| #include <stdio.h>
| #include <sys/types.h>
| #ifdef WIN32
| #define binmode "b"
| #else
| #define binmode
| #endif
| main()
| {
|   FILE *f=fopen("conftestval", "w" binmode);
|   if (!f) exit(1);
|   fprintf(f, "%d\n", sizeof(pid_t));
|   exit(0);
| }
configure:24502: result: 0

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


[Bug 64753] Can not determine the proper size for pid_t

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=64753

--- Comment #9 from Zina Lu <u7...@anu.edu.au> ---
I finally finished installing Apache on my MacOS11.1 and I came with the
similar error messages - 'Redefinition of 'iovec'' and 'Can not determine the
proper size for pid_t' when running the make command after ./configure. 

I found these codes in
/Users/$(whoami)/httpd-2.4.46/srclib/apr/include/apr_want.h:


#ifndef APR_IOVEC_DEFINED
#define APR_IOVEC_DEFINED
struct iovec
{
        void *iov_base;
        size_t iov_len;
};
#endif /* !APR_IOVEC_DEFINED */


Commenting the 'struct iovec{...}' definition in apr_want.h solved the
redefinition error for me.


For the pid_t error, in /Users/$(whoami)/httpd-2.4.46/srclib/apr/include/apr.h

I found the following lines:


/* And APR_PID_T_FMT */
#define APR_PID_T_FMT "d"
#error Can not determine the proper size for pid_t


probably where the error message 'Can not determine the proper size for pid_t'
came.

Replacing '#error Can not determine the proper size for pid_t' with:


 #define APR_PID_T_FMT "d"


according to line 542 in http://apr.apache.org/docs/apr/1.5/apr_8h_source.html
worked for me.

Hope this would be helpful.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org