You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Winfried (JIRA)" <ji...@apache.org> on 2010/12/05 22:05:14 UTC

[jira] Updated: (AXIS2C-1510) compile error on OS X when building samples

     [ https://issues.apache.org/jira/browse/AXIS2C-1510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Winfried updated AXIS2C-1510:
-----------------------------

    Description: 
I was very pleased to find that Axis2/c 1.7.0RC2 builds correctly on OS X 10.6.

However when building the samples directory I got the following error:

Making all in echo
gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/axis2c/include/axis2-1.7.0    -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE  -MT echo.o -MD -MP -MF .deps/echo.Tpo -c -o echo.o echo.c
In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
                 from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
                 from echo.c:21:
/usr/include/unistd.h:495: error: conflicting types for 'swab'
/usr/include/string.h:137: error: previous declaration of 'swab' was here
In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
                 from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
                 from echo.c:21:
/usr/include/unistd.h:570: error: conflicting types for 'setkey'
/usr/include/stdlib.h:235: error: previous declaration of 'setkey' was here
/usr/include/unistd.h:590: error: conflicting types for 'getsubopt'
/usr/include/stdlib.h:206: error: previous declaration of 'getsubopt' was here
make[3]: *** [echo.o] Error 1

On OS X function 'swab' and 'setkey' are declared both in unistd.h and string.h .

I could easily avoid the error with the patch below:

--- ./util/include/platforms/unix/axutil_unix.h	2010-08-19 11:57:15.000000000 +0200
+++ /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h	2010-12-05 22:02:30.000000000 +0100
@@ -122,9 +122,9 @@
 #include "axutil_date_time_util_unix.h"
 
     /* for file access handling */
-#ifdef HAVE_UNISTD_H
+#if defined HAVE_UNISTD_H && !defined __APPLE__
 #include <unistd.h>
-#endif /*HAVE_UNISTD_H */
+#endif /*HAVE_UNISTD_H && !defined __APPLE__ */
 
     /* network handling */
 #include <sys/socket.h>


  was:
I was very pleased to find that Axis2/c 1.7.0RC2 builds correctly on OS X 10.6.

However when building the samples directory I got the following error:

Making all in echo
gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/axis2c/include/axis2-1.7.0    -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE  -MT echo.o -MD -MP -MF .deps/echo.Tpo -c -o echo.o echo.c
In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
                 from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
                 from echo.c:21:
/usr/include/unistd.h:495: error: conflicting types for 'swab'
/usr/include/string.h:137: error: previous declaration of 'swab' was here
In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
                 from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
                 from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
                 from echo.c:21:
/usr/include/unistd.h:570: error: conflicting types for 'setkey'
/usr/include/stdlib.h:235: error: previous declaration of 'setkey' was here
/usr/include/unistd.h:590: error: conflicting types for 'getsubopt'
/usr/include/stdlib.h:206: error: previous declaration of 'getsubopt' was here
make[3]: *** [echo.o] Error 1


> compile error on OS X when building samples
> -------------------------------------------
>
>                 Key: AXIS2C-1510
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1510
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: platforms/unix
>    Affects Versions: 1.7.0
>         Environment: OS X 10.6.2
>            Reporter: Winfried
>            Priority: Minor
>
> I was very pleased to find that Axis2/c 1.7.0RC2 builds correctly on OS X 10.6.
> However when building the samples directory I got the following error:
> Making all in echo
> gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/local/axis2c/include/axis2-1.7.0    -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Werror -Wno-implicit-function-declaration -g -D_GNU_SOURCE  -MT echo.o -MD -MP -MF .deps/echo.Tpo -c -o echo.o echo.c
> In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
>                  from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
>                  from echo.c:21:
> /usr/include/unistd.h:495: error: conflicting types for 'swab'
> /usr/include/string.h:137: error: previous declaration of 'swab' was here
> In file included from /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h:126,
>                  from /usr/local/axis2c/include/axis2-1.7.0/platforms/axutil_platform_auto_sense.h:53,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axutil_dll_desc.h:31,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axutil_class_loader.h:31,
>                  from /usr/local/axis2c/include/axis2-1.7.0/axis2_util.h:24,
>                  from echo.c:21:
> /usr/include/unistd.h:570: error: conflicting types for 'setkey'
> /usr/include/stdlib.h:235: error: previous declaration of 'setkey' was here
> /usr/include/unistd.h:590: error: conflicting types for 'getsubopt'
> /usr/include/stdlib.h:206: error: previous declaration of 'getsubopt' was here
> make[3]: *** [echo.o] Error 1
> On OS X function 'swab' and 'setkey' are declared both in unistd.h and string.h .
> I could easily avoid the error with the patch below:
> --- ./util/include/platforms/unix/axutil_unix.h	2010-08-19 11:57:15.000000000 +0200
> +++ /usr/local/axis2c/include/axis2-1.7.0/platforms/unix/axutil_unix.h	2010-12-05 22:02:30.000000000 +0100
> @@ -122,9 +122,9 @@
>  #include "axutil_date_time_util_unix.h"
>  
>      /* for file access handling */
> -#ifdef HAVE_UNISTD_H
> +#if defined HAVE_UNISTD_H && !defined __APPLE__
>  #include <unistd.h>
> -#endif /*HAVE_UNISTD_H */
> +#endif /*HAVE_UNISTD_H && !defined __APPLE__ */
>  
>      /* network handling */
>  #include <sys/socket.h>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: c-dev-help@axis.apache.org