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

Asle Benoni asle.benoni at gmail.com
Fri Aug 14 13:45:21 EDT 2009


Hello,
I think I progressed much here. I was able to uninstall old packages  
so that I could be X64 packages. First of all I think the clue was to  
get uninstall and install libtool and glib2. What a mess it was, I  
don' even remember now all I did.


Anyway I downloaded mod_mono source and did the configure stuff but it  
fails on make  with this error. I am not sure how to fix it:

at the end of the ./configure ...........
..........
/libglib-2.0.dylib /opt/local/lib/libintl.dylib /opt/local/lib/ 
libiconv.dylib  -m64
ld: in /opt/local/lib/libz.1.dylib, file is not of required architecture
collect2: ld returned 1 exit status
make[1]: *** [mod_mono.la] Error 1
make: *** [all-recursive] Error 1


So it says that dylib should be X_64 I guess and not i386 ?? How do I  
fix that?


/asle


Den 14. aug.. 2009 kl. 15.33 skrev Asle Benoni:

> Hello,
> Thanks for a very clear installation instruction. I am trying to do  
> this in the correct order. I already had installed Macports and  
> tried to install glib and libtool.
> I first got this message when trying to uninstall:
>
> Error: Target org.macports.activate returned: Image error: Another  
> version of this port (glib2 @2.20.2_0) is already active.
> Error: Status 1 encountered during processing.
>
>
> So I uninstalled:
> sh-3.2# sudo port uninstall glib2 libtool
> --->  The following versions of glib2 are currently installed:
> --->  	glib2 @2.20.2_0 (active)
> --->  	glib2 @2.20.4_0
> Error: port uninstall failed: Registry error: Please specify the  
> full version as recorded in the port registry.
>
> sh-3.2# sudo port uninstall glib2 @2.20.4_0  libtool
> --->  Uninstalling glib2 @2.20.4_0
> --->  Deactivating libtool @2.2.6a_0
> --->  Uninstalling libtool @2.2.6a_0
>
> sh-3.2# port clean glib2
>
> But what am I doing wrong here since it fails now to install glib2  
> and libtool:
>
> sh-3.2# sudo port install glib2 libtool
> --->  Fetching glib2
> --->  Verifying checksum(s) for glib2
> --->  Extracting glib2
> --->  Applying patches to glib2
> --->  Configuring glib2
> --->  Configuring glib2 for architecture i386
> --->  Configuring glib2 for architecture x86_64
> Error: Target org.macports.configure returned: configure failure:  
> shell command " cd "/opt/local/var/macports/build/ 
> _opt_local_var_macports_sources_rsync 
> .macports.org_release_ports_devel_glib2/work/glib-2.20.4-x86_64"  
> && ./configure --prefix=/opt/local --enable-static --disable- 
> dependency-tracking  " returned error 1
> Command output: checking dependency style of /usr/bin/gcc-4.0...  
> (cached) none
> checking how to run the C preprocessor... /usr/bin/cpp-4.0
> checking for c++... /usr/bin/g++-4.0
> checking whether we are using the GNU C++ compiler... yes
> checking whether /usr/bin/g++-4.0 accepts -g... yes
> checking dependency style of /usr/bin/g++-4.0... none
> checking for gcc... (cached) /usr/bin/gcc-4.0
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether /usr/bin/gcc-4.0 accepts -g... (cached) yes
> checking for /usr/bin/gcc-4.0 option to accept ISO C89... (cached)  
> none needed
> checking dependency style of /usr/bin/gcc-4.0... (cached) none
> checking whether /usr/bin/gcc-4.0 and cc understand -c and -o  
> together... yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking for special C compiler options needed for large files... no
> checking for _FILE_OFFSET_BITS value needed for large files... no
> checking for pkg-config... /opt/local/bin/pkg-config
> checking for gawk... (cached) gawk
> checking for perl5... /opt/local/bin/perl
> checking for indent... indent
> checking for /opt/local/bin/perl... /opt/local/bin/perl
> checking for a Python interpreter with version >= 2.4... python
> checking for python... /opt/local/bin/python
> checking for python version... 2.6
> checking for python platform... darwin
> checking for python script directory... ${prefix}/lib/python2.6/site- 
> packages
> checking for python extension module directory... ${exec_prefix}/lib/ 
> python2.6/site-packages
> checking for iconv_open... no
> checking for libiconv_open in -liconv... no
> checking for iconv_open in -liconv... no
> configure: error: *** No iconv() implementation found in C library  
> or libiconv
>
> Error: Status 1 encountered during processing.
>
>
> Glad for any help!
>
> /asle
>
> Den 24. juli. 2009 kl. 17.02 skrev eto:
>
>>
>> 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)
>> 1) Install MacPorts
>> 2) 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.
>>
>> 3) Edit /opt/local/etc/macports/variants.conf and add:
>>
>> +universal
>>
>> 2) Install glib2 and libtool in MacPorts:
>>
>> sudo port install glib2 libtool
>>
>> 4) download (latest) mod_mono source or check out from svn
>> 5) modify src/mod_mono.c and comment out this line (if it exists)  
>> as it
>> borks on leopard:
>>
>> // sigaddset (&sigset, SIGPWR);
>>
>> 6) 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
>>
>> 7) 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
>>>
>>
>> -- 
>> View this message in context: http://www.nabble.com/Getting-Mono-to-work-with-Apache-in-Mac-OS-X-Leopard-tp24629121p24646201.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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20090814/07534e78/attachment-0001.html 


More information about the Mono-osx mailing list