Building Axis2/C on Mac OS X Mountain Lion 10.8.4

This should work on other Mountain Lion versions as well, but I have not tested it. First of all, let’s install a set of dependencies required for the building process.

The easiest way (at least for me) was to install them through macports.

Note: You need to install Xcode and the Xcode command lilne tools for macports to work. Xcode is a (very) large download. So, it will take some time to install. But, an advantage is many tools ask you to install Xcode since it brings in a lot of useful dependencies useful for dev. provided by Apple itself. So, you’ll need it anyway if you’re planning to do some C development šŸ™‚

After installing macports, you need to install automake, autoconf, libtool, libxml2 and pkgconfig. Type in the following command:


sudo port install automake autoconf libtool libxml2 pkgconfig

Now, we are set to build the source. Check it out using the following command:


svn co https://svn.apache.org/repos/asf/axis/axis2/c/core/trunk axis2-c-trunk

This will checkout the source code the a directory named axis2-c-trunk. Now, we need to apply this patch that fixes a constants issue. Download it and put it inside the directory axis2-c-trunk. Now execute the following commands to patch the source:


cd axis2-c-trunk

patch -p0 <Ā unavailable_constants_macosx_fix.patch

Now, you are ready to build the source. Just execute the build.sh with the following command:


./build.sh

That should create a successful build in the axis2-c-trunk/deploy directory. If it didn’t you probably would need this patch as well. Patch your source the same way as above, and try running the build script again:

patch -p0 <Ā mac_os_build_fix.patch
./build.sh

 

4 Comments

  1. Thanks for the precise and concise explanation ! I find it great that many developers are doing heavy programming on Macs. Most people see Macs as some fancy machines for no-command-line guys and fail to see that it got a *NIX core in the box and is thus one of the best programming platform !

    Reply

  2. Hi I am getting error in make command :

    make
    make all-recursive
    Making all in util
    make all-recursive
    Making all in src
    Making all in platforms
    Making all in unix
    /bin/sh ../../../libtool –tag=CC –mode=compile gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include -I../../../include/platforms -I../../../include/platforms/unix -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -D_GNU_SOURCE -g -O0 -Wno-long-double -Wno-unused-but-set-variable -MT uuid_gen_unix.lo -MD -MP -MF .deps/uuid_gen_unix.Tpo -c -o uuid_gen_unix.lo uuid_gen_unix.c
    libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../.. -I../../../include -I../../../include/platforms -I../../../include/platforms/unix -g -O2 -D_LARGEFILE64_SOURCE -ansi -Wall -Wno-implicit-function-declaration -D_GNU_SOURCE -g -O0 -Wno-long-double -Wno-unused-but-set-variable -MT uuid_gen_unix.lo -MD -MP -MF .deps/uuid_gen_unix.Tpo -c uuid_gen_unix.c -fno-common -DPIC -o .libs/uuid_gen_unix.o
    cc1: error: unrecognized command line option “-Wno-long-double”
    cc1: error: unrecognized command line option “-Wno-unused-but-set-variable”
    make[6]: *** [uuid_gen_unix.lo] Error 1
    make[5]: *** [all-recursive] Error 1
    make[4]: *** [all-recursive] Error 1
    make[3]: *** [all-recursive] Error 1
    make[2]: *** [all] Error 2
    make[1]: *** [all-recursive] Error 1
    make: *** [all] Error 2

    Reply

  3. I am facing issue as below:

    ./build.sh

    output:
    Running autogen.sh in Util
    -n Running libtoolize…
    failed.
    Running autogen.sh in Axiom
    -n Running libtoolize…
    failed.
    Running autogen.sh in Guththila
    -n Running libtoolize…
    failed.
    Running autogen.sh in Neethi
    -n Running libtoolize…
    failed.
    Running autogen.sh in Axis2/C
    -n Running libtoolize…
    failed.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s