Compile Mono from Source

mojoPortal is no longer supported on mono. This forum is here for archival purposes.

This thread is closed to new posts. You must sign in to post in the forums.
10/10/2008 10:19:18 PM
Gravatar
Total Posts 4

Compile Mono from Source

Hey,

I am hopipng that someone can provide me with some guidance.  This is not a MojoPortal related question, but rather a general Linux/Mono question.

Firstly, let me state that I am reasonably new to using Linux, but so far, I have been able to get everything installed and running on my server.  My server using ClarkConnect as it's OS, and I have got Mono 1.9.1 installed for hosting my ASP.Net website.  ClarkConnect, at it's base uses RHEL 4.  I was able to get Mono installed using the binaries that are available for RHEL.  However, as of version 2.0 of Mono, these binaries are no longer supported.  As I see it, the only option I have left is to compile from Source, but this is giving me lots of errors.

I have downloaded all the source, and I have installed the dependencies that I am aware of, including glib2 and pkgconfig.  I have extracted the core mono tarball, and then executed the following:

./configure --prefix=/usr/local; make; make install

From what I can see, this has worked correctly, however, is there a way to tell whether this has worked?

I then went to try and install libgdiplus, using the same as above, but then I get dependency errors regarding libpng12.  I have installed that, but then I get the following error:

"Failed to compile with X11/Xlib.h include.  You must fix your compiler paths"

Am I doing something blatantly wrong?  Is there a specific order that things should get installed in?  I also tried to install mod_mono and xsp, and I got similar errors with those, but I don't have them to hand.

Can anyone suggest anything?  Is there someone that I could get pre-made binaries.

Thanks in advance!

Gary

10/12/2008 6:36:09 AM
Gravatar
Total Posts 18439

Re: Compile Mono from Source

If you are new to Linux I recommend you to use OpenSuse, up to date packages are always available sooner for OpenSuse.

For compiling it, the correct order is libgdiplus, mono, xsp, mod_mono. Always use make clean first for mono.

Hope it helps,

Joe

10/12/2008 10:49:45 AM
Gravatar
Total Posts 4

Re: Compile Mono from Source

Hey,

Thanks for the reply.  When I was looking around for a LInux distro for my file server, I looked at all the different ones.  The reason that I decided to go for ClarkConnect is becuase out of the box it gives you a lot of features, file serving, web serving, mail server etc, and you didn't have to do much in order to get it workig.  It gives you are very good web interface for configuring everything, and on the whole I have really enjoyed using it.

The only draw back I guess is when it comes to doing things that it doesn't do out of the box, like this.

Before I make a move to OpenSuse, i.e. ditching ClarkConnect, I want to make sure I have tried everything first.  I will try again with the order that you have suggested, and see how I get on.

Thanks

Gary

10/13/2008 12:29:07 AM
Gravatar
Total Posts 4

Re: Compile Mono from Source

Hey Joe,

Sorry to bug you about this, but I have tried following the steps that I have found on this website, and this is what I am trying to execute:

wget ftp://ftp.gnu.org/gnu/bison/bison-2.3.tar.gz
tar -xzvf bison-2.3.tar.gz
cd bison-2.3
./configure
make
make install (must be root for that)

wget ftp://ftp.gnu.org/gnu/gettext/gettext-0.17.tar.gz
tar -xzvf gettext-0.17.tar.gz
cd gettext-0.17
./configure
make
make install (must be root for that)

wget http://ftp.gnome.org/pub/gnome/sources/glib/2.18/glib-2.18.1.tar.gz
tar -xzvf glib-2.18.1.tar.gz
cd glib-2.18.1
./configure

********
configure: error: *** pkg-config too old; version 0.16 or better required.
********

wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.23.tar.gz
tar -xzvf pkg-config-0.23.tar.gz
cd pkg-config-0.23
./configure
make
make install (must be root for that)

cd ..
cd glib-2.18.1
./configure
make
make install

wget http://ftp.novell.com/pub/mono/sources/libgdiplus/libgdiplus-2.0.tar.bz2
tar xvfj libgdiplus-2.0.tar.bz2
cd libgdiplus-2.0
./configure

********
configure: error: *** libpng12 not found. See http://www.libpng.org/pub/png/libpng.html.
********

wget http://prdownloads.sourceforge.net/libpng/libpng-1.2.32.tar.bz2?download
tar xvfj libpng-1.2.32.tar.bz2
cd libpng-1.2.32
./configure
make
make install (must be root for that)

cd ..
cd libgdiplus-2.0
./configure

********
configure: error: "Failed to compile with X11/Xlib.h include. You must fix your compiler paths"
********

The only thing I have changed really, is to attempt to install libgdiplus-2.0 before installing the mono package.  As you can see I have had to install a couple extra things along the way, but from what I can see they have installed successfully.

Can you suggest hacing that I can try to resolve this?

Thanks

Gary

10/13/2008 6:34:06 AM
Gravatar
Total Posts 18439

Re: Compile Mono from Source

Sorry I am not a super Linux expert myself, so not sure how to get past the error you have with X11. In openSuse I just have to add the devel packages for things like bison, libpng etc using the package manager to resolve dependencies after that its fairly straightforward.

Unless you're really attached to ClarkConnect I would still recommend openSuse, its very easy in open suse to do all those things you mentioned (file sharing, web server, mail etc) as benefits of  ClarkConnect. I think thats just an oddball distro and their marketing makes you think its easier, but openSuse is very friendly. That web interface you mention is probably WebMin, their site seems to be down at the moment but heres the wikipedia page for it. You can install WebMin on openSuse if you like it, but you might find the built in admin features even easier.

Hope it helps,

Joe

10/13/2008 11:13:04 AM
Gravatar
Total Posts 4

Re: Compile Mono from Source

Hey,

I know what you are saying, and I will give it some serious thought.  At the minute I am not in a position to change the linux version, as I am not in the same country as the server :), but I might do it once I get back home.

Thanks for your help!

Gary

You must sign in to post in the forums. This thread is closed to new posts.