libxml2.so issue with mono 1.2.6

If you have an issue on ubuntu to build monodevelop 0.18 because of an error with the libxml2.so, I have found a solution.

The error talked about gzopen64 which is not found. So I looked for it in google and find this bug report:

In fact, the bug come from a bad link with libz to check it just do

whereis libxml2 //to get where it is install.

For me it is in /usr/lib, so I do

ldd /usr/lib/libxml2.so.2

This give me this result:

linux-gate.so.1 => (0xffffe000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7e2c000)
libz.so.1 => /home/myuser/mono/lib/libz.so.1 (0xb7e17000) // this is the install folder of mono 1.2.6
libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7df2000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7ca8000)
/lib/ld-linux.so.2 (0x80000000)

As you can see, the libz.so.1 is linked to my binary install of mono 1.2.6.

So when I check it, I see that this is a link file to libz.so.1.2.1 in the same folder.
So, I check my previous version of this lib
whereis libz

/usr/lib/libz.so.1

This file is a linked to libz.so.1.2.3.3.

Haha! Here we are, the version of ubuntu gutsy is 1.2.3.3 and the version of mono is 1.2.1.1. So I just change the link to point to the 1.2.3.3 lib. To do that you have a lot of solution.

You can copy/paste the file from /usr/lib to your mono/lib or and just change the link file libz.so.1 to link to the libz.so.1.2.3.3. (Or you can do the trick with ldconfig as said on the bug report.)

And now monodevelop build! You can enjoy all the new features😉

rem: The other big issue I face of is boo build because it use nant and I do not found how to install deploy it as “make install”(copy assembly in gac and make pc file). So I use gacutil to install all dll but I miss the pc file ( package config). So, I have copy the old boo.pc from /usr/lib/pkg-config/ and change version and path to get the good boo install from my new mono 1.2.6 installation folder.

I hope this can help other people who try to have monodevelop 0.18 on ubuntu!

Merry Christmas!

This entry was posted in .NET. Bookmark the permalink.

7 Responses to libxml2.so issue with mono 1.2.6

  1. Johannes says:

    I’ve installed the newest nant by hand yesterday. The instructions are in the README.txt, which could be only available in the source distribution.

    Hope this helps,
    Johannes

  2. duff says:

    to build you just have to do nant in console. But what I mean by install as make install is deploy the compiled assembly to gac and make the pkg config

  3. JuanCri says:

    Here you have, our own “DLL Hell”.

  4. Seth says:

    Have yourself a Merry little link-mess🙂

  5. Johnny says:

    Hi all, relatively new to Linux in general and I’ve been asked to set up a app into Linux. Love mono but have the gzopen64 problem. What is the actual link command you used?

  6. duff says:

    in your mono install path, you will find lib/libz.so.1.
    this a link file so just do:
    “whereis libz” to know where is your ubuntu version ( must be in /usr/lib/)
    and in you mono install path
    do
    cd lib
    mv libz.so.1 libz.so.1.bak
    ln -s /usr/lib/libz.so.1.2.3.3 libz.so.1
    but it depend of version of your libz.
    For me it is libz.so.1.2.3.3 it can be another version for you so take the result of your whereis

  7. Pingback: How do I stop MySQL from loading Mono libraries when it won’t start? Drija

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s