gale320 / staff

Automatically exported from code.google.com/p/staff
Apache License 2.0
0 stars 0 forks source link

Unable to compile staff (rev 710) on Mac OSX 10.8 Montain Lion (Xcode 4.4.1) #190

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to compile staff from svn (rev 710) on my mac (OS X 10.8 and XCode 
v4.4.1) I get two problems:

 - compilation error in staff/core/utils: 
src/tostring.h:69:14: error: assigning to 'bool *' from incompatible type 
'bool'; take the address with &
      pbIsOk = bIsOk;

This error can be easily solved.

 - linking error: 
make -C modules/axis2services make
/usr/sbin/apxs -S CFLAGS="" -c mod_axis2services.c
/usr/share/apr-1/build-1/libtool --silent --mode=compile 
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bi
n/cc  -I/usr/include/apache2  -I/usr/include/apr-1   -I/usr/include/apr-1   -c 
-o mod_axis2services.lo mod_axis2services.c && touch mod_axis2services.slo
env: 
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bi
n/cc: No such file or directory

The wrong path is used: OSX10.8.xctoolchain/usr/bin/cc must me replaced by : 
XcodeDefault.xctoolchain/usr/bin/cc

Original issue reported on code.google.com by david.lo...@gmail.com on 18 Sep 2012 at 10:15

GoogleCodeExporter commented 9 years ago
Thank you for that issue report.

Bug with tostring is now fixed in r711.

Can't fix linking error, because I don't invoke gcc directly. I just call: 

/usr/sbin/apxs -S CFLAGS="" -c mod_axis2services.c

Think you need to look into apr/apxs settings to fix path to gcc.

Original comment by loentar on 18 Sep 2012 at 6:51

GoogleCodeExporter commented 9 years ago
Concerning the second bug I thought it were coming from my axis install I 
compiled before upgrading my system but it seems that it's a problem coming 
from the binary provided by Apple with Montain Lion.
More info in the following thread : 
http://apple.stackexchange.com/questions/58186/how-to-compile-mod-wsgi-on-mounta
in-lion-by-fixing-apxserror-command-failed-w

So the best solution (which is the one presented in this thread) is to crate a 
symbolic link : sudo ln -s 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ 
/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain

But all this thing is related to the compilation of the apache module for axis 
and staff (If I fully understand what's all about). Perhaps this 
compilation/installation of the module should be optional?

Original comment by david.lo...@gmail.com on 19 Sep 2012 at 11:43

GoogleCodeExporter commented 9 years ago
in fact /usr/bin/apxs seems buggy and points to the wrong cc path.
Perhaps the symbolic link creation should better be specified in the page 
explaining the installation of staff on Mac OS X Mountain Lion.
By the way, to install axis, I didn't the procedure you are giving on the 
corresponding page. It's not working for me.
If you want I can provide you the list of commands I'm running to perform the 
compilation on my machine?

Regard.

David

Original comment by david.lo...@gmail.com on 19 Sep 2012 at 11:46

GoogleCodeExporter commented 9 years ago
Regarding symbolic link, think it is too specific situation.

If you don't need axis2services module just remove Makefile.dep from 
staff/modules/axis2services/ directory.

You have more recent version of Mac OS X and XCode. Axis2/C may compile without 
a patch for old XCode.

Please provide the list of commands, if you could.. I will add it into 
installation manual.

Original comment by loentar on 19 Sep 2012 at 12:10