Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Howto compile mono 2.8

  1. #1
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Howto compile mono 2.8

    mono 2.8 2.10.6 stable is out.
    Unfortunately, Ubuntu 10.04 still uses 2.4, while Maverick Meerkat will have 2.6.7.

    So you'll have to compile it yourselfs.
    This tutorial explains how to do this.
    Sudo is omitted, you should add it if you don't work as root.

    Step 1: Get the build dependencies
    Code:
    apt-get update
    user@system$> apt-get install build-essential autoconf automake \
    bison flex gtk-sharp2-gapi boo gdb valac libfontconfig1-dev \
    libcairo2-dev libpango1.0-dev libfreetype6-dev libexif-dev \
    libjpeg62-dev libtiff4-dev libgif-dev zlib1g-dev libatk1.0-dev \
    libglib2.0-dev libgtk2.0-dev libglade2-dev libart-2.0-dev \
    libgnomevfs2-dev libgnome-desktop-dev libgnome2-dev libgnomecanvas2-dev \
    libgnomeui-dev libgnomeprint2.2-dev libgnomeprintui2.2-dev \
    libpanel-applet2-dev libnautilus-burn-dev librsvg2-dev \
    libgtkhtml3.14-dev libgtksourceview2.0-dev libgtksourceview-dev \
    libvte-dev libwnck-dev libnspr4-dev libnss3-dev libxul-dev \
    libwebkit-dev libvala-dev


    Step 2: Download the source and setup the environment
    Download the stable tarballs from:
    http://ftp.novell.com/pub/mono/sources-stable/
    http://download.mono-project.com/sources/

    Then, create a bash script in /usr/local/bin, called mono-2.8
    with this content
    Code:
    #!/bin/bash
    MONO_PREFIX=/opt/mono-2.8
    GNOME_PREFIX=/opt/gnome-2.8
    export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH
    export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
    export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
    export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
    export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
    PATH=$MONO_PREFIX/bin:$PATH
    
    exec "$@"
    And give it execute permissions
    Code:
    chmod +x /usr/local/bin/mono-2.8

    Then open a console and go to the directory where you extracted the mono source tarballs.


    Step 3:
    execute this script
    Code:
    #!/bin/bash
    MONO_PREFIX=/opt/mono-2.8
    GNOME_PREFIX=/opt/gnome-2.8
    export DYLD_LIBRARY_FALLBACK_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_FALLBACK_PATH
    export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH
    export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include
    export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal
    export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig
    export PATH=$MONO_PREFIX/bin:$PATH
    PS1="[mono 2.8] \w @ "
    Now create the directory where you'll install mono 2.8 to:
    Code:
    mkdir -p /opt/mono-2.8

    Step 4: libgdiplus
    Code:
    user@system$> cd libgdiplus-2.8
    user@system$> ./configure --prefix=/opt/mono-2.8 --with-pango
    user@system$> make
    user@system$> sudo make install

    Step 5: mono-2.8
    Code:
    user@system$> cd ../mono-2.8
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    Verify that the mono compilers have been installed:
    Code:
    user@system$> which gmcs

    Step 6: gtk+ and gnome
    Code:
    user@system$> cd ../gtk-sharp-2.12.10
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../gnome-sharp-2.24.1
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../gnome-desktop-sharp-2.24.0
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install

    Step 7: gluezilla, gecko-sharp, webkit-sharp

    Now compile the libraries for embedding the gecko and webkit html rendering engines.

    Code:
    user@system$> cd ../gluezilla-2.6
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../gecko-sharp-2.0-0.13
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../webkit-sharp-0.3
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    Step 8: build Mono.Addins
    Code:
    user@system$> cd ../mono-addins-0.5
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install

    Step 9: build Mono tools
    Code:
    user@system$> cd ../mono-tools-2.8
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install


    Step 10: Build Mono XSP, the webserver for ASP.NET
    Code:
    user@system$> cd ../xsp-2.8
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install


    Step 11: build the Mono Debugger
    Code:
    user@system$> cd ../mono-debugger-2.8
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install


    Step 12: build MonoDevelop 2.0
    Code:
    user@system$> cd ../monodevelop-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../monodevelop-debugger-mdb-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../monodevelop-debugger-gdb-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../monodevelop-database-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../monodevelop-java-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    user@system$> cd ../monodevelop-vala-2.4
    user@system$> ./configure --prefix=/opt/mono-2.8
    user@system$> make
    user@system$> sudo make install
    Last edited by WitchCraft; November 29th, 2011 at 03:53 AM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  2. #2
    Join Date
    Oct 2007
    Beans
    3

    Re: Howto compile mono 2.8

    Note: On Meerkat

    build gluezilla-2.6 required xulrunner-dev package install

    build mono-tools --> error
    ./PrintManager.cs(28,31): error CS0234: The type or namespace name `PrintJob' does not exist in the namespace `Gnome'. Are you missing an assembly reference?
    ./PrintManager.cs(29,25): error CS0246: The type or namespace name `PrintDialog' could not be found. Are you missing a using directive or an assembly reference?
    ./PrintManager.cs(31,29): error CS0234: The type or namespace name `HTML' does not exist in the namespace `Gtk'. Are you missing an assembly reference?
    ./PrintManager.cs(34,31): error CS0234: The type or namespace name `PrintContext' does not exist in the namespace `Gnome'. Are you missing an assembly reference?
    ------------------------ look like we need to install libgtkhtml3.14-cil-dev to get pass this problem.
    Last edited by kids_pro; November 10th, 2010 at 03:27 PM. Reason: found cause

  3. #3
    Join Date
    Mar 2010
    Beans
    3

    Re: Howto compile mono 2.8

    So How do I compile mono 2.8

    Is ....

    apt-get update
    user@system$> apt-get install build-essential autoconf automake \
    bison flex gtk-sharp2-gapi boo gdb valac libfontconfig1-dev \
    libcairo2-dev libpango1.0-dev libfreetype6-dev libexif-dev \
    libjpeg62-dev libtiff4-dev libgif-dev zlib1g-dev libatk1.0-dev \
    libglib2.0-dev libgtk2.0-dev libglade2-dev libart-2.0-dev \
    libgnomevfs2-dev libgnome-desktop-dev libgnome2-dev libgnomecanvas2-dev \
    libgnomeui-dev libgnomeprint2.2-dev libgnomeprintui2.2-dev \
    libpanel-applet2-dev libnautilus-burn-dev librsvg2-dev \
    libgtkhtml3.14-dev libgtksourceview2.0-dev libgtksourceview-dev \
    libvte-dev libwnck-dev libnspr4-dev libnss3-dev libxul-dev \
    libwebkit-dev libvala-dev


    A script?

    where do I put Sudo?

    Do I run each line individually?

    Very fustrated!!!

  4. #4
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Howto compile mono 2.8

    Quote Originally Posted by Mrbronz View Post
    So How do I compile mono 2.8

    Is ....

    apt-get update
    user@system$> apt-get install build-essential autoconf automake \
    bison flex gtk-sharp2-gapi boo gdb valac libfontconfig1-dev \
    libcairo2-dev libpango1.0-dev libfreetype6-dev libexif-dev \
    libjpeg62-dev libtiff4-dev libgif-dev zlib1g-dev libatk1.0-dev \
    libglib2.0-dev libgtk2.0-dev libglade2-dev libart-2.0-dev \
    libgnomevfs2-dev libgnome-desktop-dev libgnome2-dev libgnomecanvas2-dev \
    libgnomeui-dev libgnomeprint2.2-dev libgnomeprintui2.2-dev \
    libpanel-applet2-dev libnautilus-burn-dev librsvg2-dev \
    libgtkhtml3.14-dev libgtksourceview2.0-dev libgtksourceview-dev \
    libvte-dev libwnck-dev libnspr4-dev libnss3-dev libxul-dev \
    libwebkit-dev libvala-dev


    A script?

    where do I put Sudo?

    Do I run each line individually?

    Very fustrated!!!
    apt-get is the package manager for Debian/Ubuntu-based Linux systems. It is used to install programs from the repository (via internet). It's something like windows installer, just an awsome lot more powerful.

    sudo is an abbrevation for switch user & do / super-user do.
    Which in this context means run the installation as administrator.

    You put sudo right before apt-get:
    Code:
    sudo apt-get install <packagename>
    for example:
    Code:
    sudo apt-get install lsb-release
    If you run your system as root (=with administrator account), you can omit all the sudo stuff. But the latter is a dangerous practise, especially for a novice, because you can really screw up your system, if you don't know what you're doing.


    If your system doesn't recognize apt-get, then most likely you don't have a Debian/Ubuntu system. For example, Red Hat/Fedora uses yum, while OpenSuse uses Zypper, Arch Linux uses pacman, and Gentoo (the fastest of all Penguins) uses emerge.

    In that case, the Pacman Rosetta-Stone might be useful:
    https://wiki.archlinux.org/index.php/Pacman_Rosetta

    You can check what version of Linux you have by doing:
    Code:
    lsb_release -a

    Which on Ubuntu should answer
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 10.10
    Release: 10.10
    Codename: maverick
    or
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 10.04.1 LTS
    Release: 10.04
    Codename: lucid


    You can either install one program/library/sdk after another like this:
    Code:
    sudo apt-get install package1
    sudo apt-get install package2
    sudo apt-get install package3
    sudo apt-get install package4
    ....
    sudo apt-get install packageN

    or you can just put the packages one after another, and install them all in one
    Code:
    sudo apt-get install package1 package2 package3 package4 ... packageN
    Last edited by WitchCraft; November 30th, 2010 at 09:21 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  5. #5
    Join Date
    Feb 2006
    Beans
    1

    Re: Howto compile mono 2.8

    I got a build error with 'gnome-sharp-2.24.1'
    This occur because Mono.GetOptions.dll is not shipped anymore.

    According to this article, an error occur in building sample.
    So you should remove it from Makefile..

    http://go-mono.com/forums/#nabble-td2969455


    Thank you for your nice article.

  6. #6
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Howto compile mono 2.8

    Quote Originally Posted by irondog View Post
    I got a build error with 'gnome-sharp-2.24.1'
    This occur because Mono.GetOptions.dll is not shipped anymore.

    According to this article, an error occur in building sample.
    So you should remove it from Makefile..

    http://go-mono.com/forums/#nabble-td2969455


    Thank you for your nice article.
    I know, I'm the one who wrote that message to the mailinglist (published on Nabble) in the first place.
    in gnome-sharp-<version>/sample/gnomevfs/Makefile
    Line 449 + 450 of the generated makefile in that folder
    Comment out these two lines (by adding # in front)
    #TestXfer.exe: $(srcdir)/TestXfer.cs $(assemblies)
    # $(CSC) /out:TestXfer.exe $(references) -r:Mono.GetOptions.dll $(srcdir)/TestXfer.cs
    AND
    #EXTRA_TARGETS = TestXfer.exe
    on line 221.

    (Note: as of now, this still applies to mono 2.10.2, too.)

    I thought, since I told them - and since it's the stable sources, they would have fixed it by now, but obviously...
    Well, I guess, in the meantime, I wouldn't call 2.8 "stable" anyway, but they probably wait for the first mayor fix for it until they publish 2.8.1 ...
    Last edited by WitchCraft; June 3rd, 2011 at 03:45 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  7. #7
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Howto compile mono 2.8

    If on compiling Gluezilla-2.6 you get:
    checking Mozilla XPCOM > 1.8... not found
    checking Mozilla XPCOM 1.8... You need to install the Mozilla XPCOM development package.
    You need to do:
    Code:
    apt-get install xulrunner-dev
    As kids_pro already said.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  8. #8
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Howto compile mono 2.8

    For mono 2.10.1, you'll have difficulties, because MonoDevelop doesn't find gtksharpglue-2
    ---> System.DllNotFoundException: gtksharpglue-2
    If you do
    Code:
    updatedb
    locate gtksharpglue-2
    /usr/lib/cli/gtk-sharp-2.0/libgtksharpglue-2.so
    you'll see that it is installed, but that its path is not in the library include directories, so you need to add it.

    Create a new file called glib.conf in /etc/ld.so.conf.d/
    Code:
    gedit /etc/ld.so.conf.d/glib.conf
    And fill it with the following content:
    Code:
    # Mono needs you
    /usr/lib/cli/glib-sharp-2.0
    Afterwards, you have to update the ld library paths:
    Code:
    /sbin/ldconfig
    Last edited by WitchCraft; March 28th, 2011 at 12:43 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  9. #9
    Join Date
    Feb 2008
    Location
    readlink("/proc/self/exe"
    Beans
    1,120
    Distro
    Ubuntu Development Release

    Wink Re: Howto compile mono 2.8

    To get the latest MonoDevelop, do the following:

    Go to:
    http://monodevelop.com/Download

    Switch to beta, and download the source tarball.
    http://ftp.novell.com/pub/mono/sourc...2.5.90.tar.bz2


    Now you still need the latest version of mono-addins (configure will complain when < 0.6)
    http://ftp.novell.com/pub/mono/sourc...ns-0.6.tar.bz2


    Then configure and make and make install mono-addins, then the same for MonoDevelop & Co.


    Last edited by WitchCraft; March 25th, 2011 at 09:46 PM.
    In a world without walls and fences, who needs Windows and Gates?
    Linux is like a wigwam.... no Gates, no Windows but Apache inside!
    http://www.debianadmin.com
    apt-get install libstdc++6-4.3-doc

  10. #10
    Join Date
    Apr 2011
    Beans
    2

    Re: Howto compile mono 2.8

    Quote Originally Posted by WitchCraft View Post
    If on compiling Gluezilla-2.6 you get:


    You need to do:
    Code:
    apt-get install xulrunner-dev
    As kids_pro already said.
    your tip is wrong. because monodevelop-database configure scripy looking for xulrunner 1.8 but ubuntu natty now xulrunner 2.0.
    so build failed. have to fix configure script

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •