LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   mono build giving me fits... (http://www.linuxquestions.org/questions/slackware-14/mono-build-giving-me-fits-4175474953/)

irgunII 08-28-2013 12:36 AM

mono build giving me fits...
 
Hi gang,

Trying to build mono (for Slackware 14.0) and I keep getting this:

Code:

../src/.libs/libeglib.a(libeglib_la-gunicode.o): In function `monoeg_g_get_charset':
/tmp/SBo/mono-2.10.9/eglib/src/gunicode.c:312: undefined reference to `locale_charset'
collect2: error: ld returned 1 exit status
make[4]: *** [test-eglib] Error 1
make[4]: Leaving directory `/tmp/SBo/mono-2.10.9/eglib/test'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/SBo/mono-2.10.9/eglib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/SBo/mono-2.10.9/eglib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/SBo/mono-2.10.9'
make: *** [all] Error 2

On the slackbuilds.org site, it says libgdiplus is necessary and that built and installed just fine.

Any ideas what's happening here?

mancha 08-28-2013 09:15 AM

A few comments:
  1. Why are you choosing 2.10.9 over 2.11.4 (for the 2.x tree) or 3.2.1 (for the 3.x tree)?

  2. It seems to be detecting localcharset.h on your system. Can you post the result of:
    Code:

    $ grep localcharset.h /var/log/packages/*
  3. As a quick fix to your problem do this after configure but before make:
    Code:

    sed -i -e 's|#define HAVE_LOCALCHARSET_H 1|/* #undef HAVE_LOCALCHARSET_H */|' /path/to/mono-2.10.9/eglib/config.h

--mancha

irgunII 08-28-2013 03:17 PM

Quote:

Originally Posted by mancha (Post 5017555)
A few comments:
  1. Why are you choosing 2.10.9 over 2.11.4 (for the 2.x tree) or 3.2.1 (for the 3.x tree)?

  2. It seems to be detecting localcharset.h on your system. Can you post the result of:
    Code:

    $ grep localcharset.h /var/log/packages/*
  3. As a quick fix to your problem do this after configure but before make:
    Code:

    sed -i -e 's|#define HAVE_LOCALCHARSET_H 1|/* #undef HAVE_LOCALCHARSET_H */|' /path/to/mono-2.10.9/eglib/config.h

--mancha

2.11.4 did the exact same thing, so I was simnply trying an older version. The 3x tree I could only find stuff for Mac machines.

Code:

$ grep localcharset.h /var/log/packages/*
/var/log/packages/gettext-tools-0.18.1.1-i486-3:usr/share/gettext/intl/localcharset.h
/var/log/packages/libiconv-1.14-i486-2_SBo:usr/include/localcharset.h

Meh...my mistake...I should have said it was the build from slackbuilds.org. But, I'll try it on the source tarball for that slackbuild and see what happens.

mancha 08-28-2013 03:32 PM

Seems the libiconv package is interfering with mono to cause this. I took a quick look at the slackbuild and suggest you add
the following line (in green) right after the configure block and before the make command (just before line 64):

Code:

  --build=$ARCH-slackware-linux

sed -i -e 's|#define HAVE_LOCALCHARSET_H 1|/* #undef HAVE_LOCALCHARSET_H */|' eglib/config.h

make
make install DESTDIR=$PKG

--mancha

*Note: Alternatively, you could removepkg the libiconv package; build & install the mono package; and then re-install libiconv.

irgunII 08-28-2013 03:41 PM

Okay, I tried the your earlier version of the sed command, and consistently get

Code:

sed: no input files
I'm going to try now with your new(er) suggestion.

irgunII 08-28-2013 04:06 PM

That last suggestion did the trick. It built this time and on the 2.11.4 also.

I should mention maybe, that before your suggestion, during the 'config' it would always stop at an 'ltoptions.m4' part and wouild sit there for a minimum of 1 minute before finally carrying on and then eventually to the failure problem. This time though, it did not stop at that part and went right on through everything.

Thank you for the assistance!

PS

If you're wondering why I want/need mono on my linux system, it's to try out this little app here

http://realityripple.com/Software/Ap.../#.Uh5mLGa5SCg

bartgymnast 08-29-2013 06:14 AM

The slackbuild from slackbuilds.org has some problems.

these options should be added to the configure

configure --with-libgdiplus=/usr/lib$LIBSUFFIX \
--with-crosspkgdir=/usr/lib$LIBSUFFIX/pkgconfig \
--enable-static

Also, it might be good to reconf before configure.
libtoolize --copy --force
autoreconf -vif

than there should be no need for the sed command.

irgunII 08-29-2013 09:59 AM

I'm not a programmer, so that and even the sed command thing left me scratching my head...it just worked is all I saw, heh. Maybe you bartgymnast or you mancha, should get in touch with the maintainer of the mono build and discuss it with him, as I wouldn't know what to tell him or why I was saying it. Whatcha think?

mancha 08-29-2013 10:50 AM

Quote:

Originally Posted by bartgymnast
The slackbuild from slackbuilds.org has some problems.

these options should be added to the configure

configure --with-libgdiplus=/usr/lib$LIBSUFFIX \
--with-crosspkgdir=/usr/lib$LIBSUFFIX/pkgconfig \
--enable-static

  • mono defaults to building static libs; --enable-static is unnecessary.

  • mono defaults to the system installed libgdiplus and detection works fine here. Is there a particular setup on your machine that requires specifying a path?

    Note: you can test your installed mono by running /usr/bin/mono-test-install. If you get "Your have a working System.Drawing setup" then mono is using your system libgdiplus correctly (n.b. their typo, not mine).

  • mono defaults to using $(libdir)/pkgconfig for its pkgconfigdir and the SBo SlackBuild seemingly sets $(libdir) appropriately for Slack-64. If it indeed fails on your Slackware-64 system, I suggest you contact the SBo mono maintainer directly.

Quote:

Originally Posted by bartgymnast
Also, it might be good to reconf before configure.
libtoolize --copy --force
autoreconf -vif

than there should be no need for the sed command.

  • Re-libtoolizing and re-generating configuration files does not solve irgunII's problem. The sed command would still be needed.

--mancha

irgunII 08-29-2013 08:58 PM

@mancha - Yes, the sed command made it work. Thank you.

I guess I should mark this as 'SOLVED', yes? (except for the maintainer needs to look into the sed command thing maybe)

mancha 08-30-2013 03:19 PM

@irgunII:

The sed command solved your issue hackishly. Basically, mono believes (correctly) it can use locale_charset() on your system
because you have installed libiconv. Unfortunately, it was not linking properly.

Given how appreciative you've been on this thread and since I had already downloaded mono in order to assist you, I decided to
invest a little more time to develop a fix.

Rather than adding the sed line to mono.Slackbuild, you could do the following instead:
  1. Download my mono-2.11.4-libcharset.diff patch to the same directory that has mono.SlackBuild

  2. Edit mono.Slackbuild by adding the following two lines (in green) just before the configure block:
    Code:

    -exec chmod 644 {} \;

    patch -p1 --verbose < $CWD/mono-2.11.4-libcharset.diff || exit 1
    autoreconf


    CFLAGS="$SLKCFLAGS" \
    CXXFLAGS="$SLKCFLAGS" \
    ./configure \

  3. Build & install mono
--mancha

Note: the current solution you're using (with sed) is effectively running a version of mono as it would build if you didn't have the libiconv
package installed on your system.

irgunII 08-30-2013 03:37 PM

Hey great! Thanks for that, as I feel better knowing I've not taken/deleted something off my system just to install another something (mainly because I'd forget in 10 seconds that I'd deleted the first something and would scratch my head wondering why all of a sudden other apps and stuff weren't working correctly anymore, heh...ADD really sucks, especially at 51).

I also e-mailed the maintainer and asked him to take a look at this thread and see what he thinks he ought to do about it not building. Maybe he'll take up your 'patch' and simply use it. That'd be cool.

John


All times are GMT -5. The time now is 04:54 PM.