Bug 64684

Summary: Apache make fails if (./configure --with-included-apr --with-apr-util)
Product: Apache httpd-2 Reporter: Sumonto Ghosh <sumonto.ghosh>
Component: BuildAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: UNCONFIRMED ---    
Severity: normal    
Priority: P2    
Version: 2.4.43   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X 10.1   

Description Sumonto Ghosh 2020-08-22 23:33:23 UTC
Mac OS X: 10.15.5

Download 
    httpd-2.4.46.tar.bz2
    apr-1.7.0.tar.gz
    apr-util-1.6.1.tar.gz

Steps
    cd httpd-2.4.46
    mv apr-util-1.6.1 httpd-2.4.38/srclib/apr-util
    mv apr-1.6.5 httpd-2.4.38/srclib/apr
    ./configure --with-included-apr --with-apr-util
    make

...

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
       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_iovec_t.h:31:8: note:
      previous definition is here
struct iovec {
       ^
2 errors generated.
Comment 1 Christophe JAILLET 2020-08-23 10:27:13 UTC
Hi,

do you have the same issue if you avoid the "--with-apr-util" parameter?
Comment 2 Sumonto Ghosh 2020-08-24 05:47:23 UTC
Yes same issue

./configure --with-included-apr
make
Comment 3 Sumonto Ghosh 2020-08-24 05:49:01 UTC
Same issue with

./configure --with-included-apr
make
Comment 4 Jim Jagielski 2020-08-25 12:47:01 UTC
What version of APR are you using? You say download apr-1.7.0 but in the Steps you refer to APR 1.6.5
Comment 5 Sumonto Ghosh 2020-08-25 17:59:10 UTC
Sorry for the confusion

wget https://archive.apache.org/dist/httpd/httpd-2.4.46.tar.bz2
wget https://downloads.apache.org//apr/apr-util-1.6.1.tar.gz
wget https://downloads.apache.org//apr/apr-1.7.0.tar.gz

These are the latest available on 
https://apr.apache.org/

Thanks
Sumonto
Comment 6 Christophe JAILLET 2020-08-25 19:57:20 UTC
Hi, as spotted by Jim, the APR version you download seems to

(In reply to Sumonto Ghosh from comment #0)
> Steps
>     cd httpd-2.4.46
2.4.46

>     mv apr-util-1.6.1 httpd-2.4.38/srclib/apr-util
>     mv apr-1.6.5 httpd-2.4.38/srclib/apr
2.4.38???

Just a typo in your report or you are copying in another directory and not building what you think you are?
Comment 7 Sumonto Ghosh 2020-08-25 20:32:13 UTC
wget https://downloads.apache.org//apr/apr-util-1.6.1.tar.gz
wget https://downloads.apache.org//apr/apr-1.7.0.tar.gz
wget https://archive.apache.org/dist/httpd/httpd-2.4.46.tar.bz2

tar -xf httpd-2.4.46.tar.bz2
tar -xf apr-util-1.6.1.tar.gz
tar -xf apr-1.7.0.tar.gz

mv apr-util-1.6.1 httpd-2.4.46/srclib/apr-util
mv apr-1.7.0 httpd-2.4.46/srclib/apr

cd httpd-2.4.46
./configure --with-included-apr --with-apr-util
--or-- ./configure --with-included-apr
make



Making all in srclib
Making all in apr
...
...
encoding/apr_encode.c && touch encoding/apr_encode.lo
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
       ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_iovec_t.h:31:8: note:
      previous definition is here
struct iovec {
Comment 8 Jim Jagielski 2020-08-26 13:51:34 UTC
What version of the Xcode command line tools are you using? I cannot recreate w/ the latest official (non-beta) release of Xcode 11.5 command-line tools.

Did you install the CLI via:

   xcode-select --install

Did you accept the Xcode license via:

   xcodebuild -license
Comment 9 Sumonto Ghosh 2020-08-26 19:17:41 UTC
Thanks Jim,
Beta XCode was the issue
Comment 10 Jim Jagielski 2020-08-26 21:28:01 UTC
Ahhh. Since the new beta Xcode is designed for Big Sur, it has that macOS10 or macOS11 weirdness, depending on a envvar, iirc. Sounds like it was compiling for macOS11 and, as such, was not setting the Darwin10 compilation variable and lots of stuff was getting mangled.
Comment 11 Sumonto Ghosh 2020-08-26 21:43:28 UTC
You are correct Jim, good work :)
Comment 12 Stephen Kalinin 2021-01-03 14:42:45 UTC
So.. how to fix this for Big Sur?
Comment 13 paulo 2021-07-01 06:01:28 UTC
Hi,

This was fixed?

We have a problem here:
https://github.com/conan-io/conan-center-index/issues/3008

Can anyone help me?