[Mono-osx] Getting Mono to work with Apache in Mac OS X Leopard

md582 mono at matthias-donat.de
Fri Jul 24 11:51:32 EDT 2009


Hello,
do i need macports, or is it only for easy installing glib2 ? 
I tried to make mod_mono with "// sigaddset (&sigset, SIGPWR);", and
"--prefix=/Library/Frameworks/Mono.framework/Versions/Current", but Apache
does not start. And no error log.
I put my last mail at the end of this mail, with my detailed problem.....
Perhaps you could help me ? 
I dont understand why Apache makes no error log....
Do I have to recompile the Mono-Framework with "-m64" ?
Any Idea ?



eto wrote:
> 
> I've been using mod_mono sweetness on OSX using the built-in apache server
> for over a year now.  I really wish they'd just compile mod_mono with the
> osx binaries..  I've tried to get fastcgi working to no avail.. though I
> hear that fastcgi doesn't work well on apache even on linux.. *shrug*
> 
> There's many issues getting a mod_mono running with the built-in os x
> apache server in leopard.  First, leopard has 64-bit apache where the mono
> binaries are 32-bit.  Second, is that the latest mod_mono now requires
> glib, where it did not before (My working copy of mod_mono was woefully
> out of date but I was happy). 
> 
> Anyway, after much trials and tribulations, I've been able to build &
> install the latest mod_mono and use the packaged 2.4.2.2 mono .dmg's (for
> easy upgrades) using these steps:
> 
> 1) Ensure you have the standard mono os x binaries installed (I am
> currently using 2.4.2.2)
> 2) Install MacPorts
> 3) Edit /opt/local/etc/macports/macports.conf and add (or change) this
> line to:
> 
> universal_archs i386 x86_64
> 
> Note: If you already have macports installed without this, you'll have to
> re-install all related ports.
> 
> 4) Edit /opt/local/etc/macports/variants.conf and add:
> 
> +universal
> 
> 5) Install glib2 and libtool in MacPorts:
> 
> sudo port install glib2 libtool
> 
> 6) download (latest) mod_mono source or check out from svn
> 7) modify src/mod_mono.c and comment out this line (if it exists) as it
> borks on leopard:
> 
> // sigaddset (&sigset, SIGPWR);
> 
> 8) Then time to build & install mod_mono:
> 
> PKG_CONFIG_PATH="/opt/local/lib/pkgconfig" CFLAGS="-m64" ./configure
> --prefix=/Library/Frameworks/Mono.framework/Versions/Current
> make
> sudo make install
> 
> 9) add these lines to your /etc/apache2/httpd.conf:
> 
> Include /etc/apache2/mod_mono.conf
> MonoServerPath
> /Library/Frameworks/Mono.framework/Versions/Current/bin/mod-mono-server2
> 
> c'est voila!
> 
> 
> wharrell wrote:
>> 
>> Okay, I'm not sure if mono is even capable of doing this or not but I'm
>> going to ask.  I've work with PHP for awhile and I'm spoiled.  OS X comes
>> with PHP pre-installed all you have to do is turn it on.  I need to learn
>> ASP.NET so I have to get this running now.  I've tried working with these
>> instructions,
>> 
>> http://mono-project.com/Mod_mono
>> 
>> but after download packages and trying to configure each of them they
>> always say I'm missing a variety of different things and it seemingly is
>> just spinning in circles.  SO, HELP!!!!
>> 
>> If anyone can provide me with a step-by-step instructional to install and
>> run mono on my mac so that I can begin testing my .aspx pages I would
>> much appreciate it.
>> Thanks
>> 
> 
> 





Am 17.07.2009 um 20:35 schrieb md582:


Hello,
i'm trying to run mod_mono (2.4.2) on OS X 10.5.7, passed several "tests",
but now i am gonna crazy....
after telling mod_mono-.configure the right path´s (and hardly getting glib2
installed) I passed also the black-hole-symlock test: alias mod_mono.so with
missing mod_mono0.0.0.so !
I copied the mod_mono0.0.0.so into the modules directory....
So everything seems right now, but when i Include the mod_mono.so in apache
(httpd.conf -> LoadModule mono_module libexec/apache2/mod_mono.so), apache
doesnt start ! It also puts nothing into the logfile ! 

Perhaps one has an idea when i put some infos >>>

Computer: Mac Mini, Intel Core 2 Duo, OS X 10.5.7, Darwin 9.7.0
SW: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7l DAV/2 SVN/1.6.3
PHP/5.2.5
     glib-2.21.3

the mod_mono .configure says that:
---------------------------------------------------------------------------------------------------------------------
$  GLIB_DEPENDENCIES_CFLAGS=/usr/include/glib-2.0
GLIB_DEPENDENCIES_LIBS=/usr/include/glib-2.0 CFLAGS="-m64" ./configure
--prefix=/usr --enable-debug --with-aspxs=/usr/sbin/apxs
--with-apr-config=/usr/bin/apr-1-config
--with-apu-config=/usr/bin/apu-1-config 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... i386-apple-darwin9.7.0
checking host system type... i386-apple-darwin9.7.0
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ld used by gcc... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU
ld... no
checking for /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld option to reload
object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognize dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether  accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker
(/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries...
yes
checking dynamic linker characteristics... darwin9.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld
checking if the linker (/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) is GNU
ld... no
checking whether the g++ linker
(/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries...
yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker
(/usr/libexec/gcc/i686-apple-darwin9/4.0.1/ld) supports shared libraries...
yes
checking dynamic linker characteristics... darwin9.7.0 dyld
(cached) (cached) checking how to hardcode library paths into programs...
immediate
appending configuration tag "F77" to libtool
checking whether byte ordering is bigendian... no
checking for pkg-config... /usr/bin/pkg-config
checking for sys/wait.h that is POSIX.1 compatible... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for ANSI C header files... (cached) yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking for memset... yes
checking for mkdir... yes
checking for unsetenv... yes
checking for putenv... yes
checking for setenv... yes
checking for setrlimit... yes
checking for select... yes
checking for strcasecmp... yes
checking for strerror... yes
checking for strrchr... yes
checking for dup2... yes
checking pkg-config is at least version 0.9.0... yes
checking for GLIB_DEPENDENCIES... yes
checking if debug mode is requested... yes
checking whether mod_mono should remove the DISPLAY variable from
environment... no
checking if gcov compilation was requested... no
checking if gprof support was requested... no
/usr/bin/apr-1-config executable, good
checking for apxs2 in /usr/local/apache2/sbin... no
checking for apxs in /usr/local/apache2/sbin... no
checking for apxs2 in /usr/local/apache2/bin... no
checking for apxs in /usr/local/apache2/bin... no
checking for apxs2 in /usr/local/apache/sbin... no
checking for apxs in /usr/local/apache/sbin... no
checking for apxs2 in /usr/local/apache/bin... no
checking for apxs in /usr/local/apache/bin... no
checking for apxs2 in /usr/sbin... no
checking for apxs in /usr/sbin... /usr/sbin/apxs
/usr/bin/apu-1-config executable, good
checking Apache version... 2.2
checking for http_protocol.h... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mod_mono.conf
config.status: creating src/Makefile
config.status: creating man/mod_mono.8
config.status: creating man/Makefile
config.status: creating include/mod_mono_config.h
config.status: include/mod_mono_config.h is unchanged
config.status: executing depfiles commands
---
Configuration summary for mod_mono

  * Installation prefix = /usr
  * Apache version = 2.2
  * Apache modules directory = /usr/libexec/apache2
  * apxs = /usr/sbin/apxs
  * apr-config = /usr/bin/apr-1-config
  * apu-config = /usr/bin/apu-1-config
  * CFLAGS = -m64 -DDEBUG -I/usr/include/apache2    -I/usr/include/apr-1   
-I/usr/include/apr-1 
  * Verbose logging (debug) = yes
  * GCOV options used = no
  * Profiling enabled = no
  * mono prefix = /usr
  * Default MonoApplicationsConfigDir =
/private/etc/apache2/mod-mono-applications

---------------------------------------------------------------------------------------------------------------------

make puts out this:
---------------------------------------------------------------------------------------------------------------------
$ make
Making all in src
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../include   -m64 -DDEBUG -I/usr/include/apache2    -I/usr/include/apr-1   
-I/usr/include/apr-1  -m64 -DDEBUG -I/usr/include/apache2   
-I/usr/include/apr-1    -I/usr/include/apache2 -m64 -DDEBUG
-I/usr/include/apache2   -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2     -I/usr/include/apr-1  
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp 
-I/usr/include/apr-1  -Wall
-DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2   
-I/usr/include/apr-1    -I/usr/include/apr-1  -MT mod_mono_la-mod_mono.lo
-MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c -o mod_mono_la-mod_mono.lo
`test -f 'mod_mono.c' || echo './'`mod_mono.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I../include -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -m64 -DDEBUG
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apache2 -m64
-DDEBUG -I/usr/include/apache2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2 -I/usr/include/apr-1
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/usr/include/apr-1
-Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mod_mono.lo -MD
-MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c  -fno-common -DPIC -o
.libs/mod_mono_la-mod_mono.o
mod_mono.c:1523: warning: ‘set_null_stdout’ defined but not used
i686-apple-darwin9-gcc-4.0.1: /usr/include/glib-2.0: linker input file
unused because linking not done
gcc -DHAVE_CONFIG_H -I. -I../include -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -m64 -DDEBUG
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apache2 -m64
-DDEBUG -I/usr/include/apache2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2 -I/usr/include/apr-1
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/usr/include/apr-1
-Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -MT mod_mono_la-mod_mono.lo -MD
-MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c -o
mod_mono_la-mod_mono.o >/dev/null 2>&1
mv -f .deps/mod_mono_la-mod_mono.Tpo .deps/mod_mono_la-mod_mono.Plo
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../include   -m64 -DDEBUG -I/usr/include/apache2    -I/usr/include/apr-1   
-I/usr/include/apr-1  -m64 -DDEBUG -I/usr/include/apache2   
-I/usr/include/apr-1    -I/usr/include/apache2 -m64 -DDEBUG
-I/usr/include/apache2   -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2     -I/usr/include/apr-1  
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp 
-I/usr/include/apr-1  -Wall
-DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2   
-I/usr/include/apr-1    -I/usr/include/apr-1  -MT
mod_mono_la-mono-io-portability.lo -MD -MP -MF
.deps/mod_mono_la-mono-io-portability.Tpo -c -o
mod_mono_la-mono-io-portability.lo `test -f 'mono-io-portability.c' || echo
'./'`mono-io-portability.c
gcc -DHAVE_CONFIG_H -I. -I../include -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -m64 -DDEBUG
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apache2 -m64
-DDEBUG -I/usr/include/apache2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2 -I/usr/include/apr-1
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/usr/include/apr-1
-Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -MT
mod_mono_la-mono-io-portability.lo -MD -MP -MF
.deps/mod_mono_la-mono-io-portability.Tpo -c mono-io-portability.c 
-fno-common -DPIC -o .libs/mod_mono_la-mono-io-portability.o
mod_mono.h:228: warning: ‘cmdNames’ defined but not used
i686-apple-darwin9-gcc-4.0.1: /usr/include/glib-2.0: linker input file
unused because linking not done
gcc -DHAVE_CONFIG_H -I. -I../include -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -m64 -DDEBUG
-I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/include/apache2 -m64
-DDEBUG -I/usr/include/apache2 -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK
-no-cpp-precomp -m64 -DDEBUG -I/usr/include/apache2 -I/usr/include/apr-1
-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp -I/usr/include/apr-1
-Wall -DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2
-I/usr/include/apr-1 -I/usr/include/apr-1 -MT
mod_mono_la-mono-io-portability.lo -MD -MP -MF
.deps/mod_mono_la-mono-io-portability.Tpo -c mono-io-portability.c -o
mod_mono_la-mono-io-portability.o >/dev/null 2>&1
mv -f .deps/mod_mono_la-mono-io-portability.Tpo
.deps/mod_mono_la-mono-io-portability.Plo
/bin/sh ../libtool --tag=CC   --mode=link gcc -Wall
-DDFLT_MONO_CONFIG_DIR=\"/private/etc/apache2/mod-mono-applications\"
/usr/include/glib-2.0 -m64 -DDEBUG -I/usr/include/apache2   
-I/usr/include/apr-1    -I/usr/include/apr-1  -module /usr/include/glib-2.0 
-o mod_mono.la -rpath /usr/lib mod_mono_la-mod_mono.lo
mod_mono_la-mono-io-portability.lo  
gcc ${wl}-flat_namespace ${wl}-undefined ${wl}suppress -o
.libs/mod_mono.0.0.0.so -bundle  .libs/mod_mono_la-mod_mono.o
.libs/mod_mono_la-mono-io-portability.o   -m64
dsymutil .libs/mod_mono.0.0.0.so || :
warning: no debug symbols in executable (-arch x86_64)
(cd .libs && rm -f mod_mono.0.so && ln -s mod_mono.0.0.0.so mod_mono.0.so)
(cd .libs && rm -f mod_mono.so && ln -s mod_mono.0.0.0.so mod_mono.so)
ar cru .libs/mod_mono.a  mod_mono_la-mod_mono.o
mod_mono_la-mono-io-portability.o
ranlib .libs/mod_mono.a
creating mod_mono.la
(cd .libs && rm -f mod_mono.la && ln -s ../mod_mono.la mod_mono.la)
Making all in man
make[1]: Nothing to be done for `all'.
make[1]: Nothing to be done for `all-am'.
---------------------------------------------------------------------------------------------------------------------

Please help me ;)
-- 
View this message in context:
http://www.nabble.com/mod_mono%3A-apache-crashes-without-a-log-tp24538140p24538140.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

_______________________________________________
Mono-osx mailing list
Mono-osx at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx


-- 
View this message in context: http://www.nabble.com/Getting-Mono-to-work-with-Apache-in-Mac-OS-X-Leopard-tp24629121p24647032.html
Sent from the Mono - OSX mailing list archive at Nabble.com.



More information about the Mono-osx mailing list