Bug 211696

Summary: lang/mono: version does not compile under FreeBSD 9
Product: Ports & Packages Reporter: Yani Karydis <yani>
Component: Individual Port(s)Assignee: freebsd-mono (Nobody) <mono>
Status: Closed FIXED    
Severity: Affects Many People CC: joshruehlig, romain
Priority: --- Flags: bugzilla: maintainer-feedback? (mono)
Version: Latest   
Hardware: amd64   
OS: Any   
Description Flags
Diff to fix the build problem on FreeBSD 9. none

Description Yani Karydis 2016-08-09 14:20:09 UTC

Compilation fails under FreeBSD 9.3 (however, under 10.3 build completes without problems).

gmake[4]: Entering directory '/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib/test'
  CC       test_eglib-test.o
  CC       test_eglib-driver.o
  CC       test_eglib-hashtable.o
  CC       test_eglib-string-util.o
  CC       test_eglib-string.o
  CC       test_eglib-slist.o
  CC       test_eglib-sizes.o
  CC       test_eglib-ptrarray.o
  CC       test_eglib-list.o
  CC       test_eglib-array.o
  CC       test_eglib-fake.o
  CC       test_eglib-path.o
  CC       test_eglib-queue.o
  CC       test_eglib-shell.o
  CC       test_eglib-spawn.o
  CC       test_eglib-timer.o
  CC       test_eglib-file.o
  CC       test_eglib-pattern.o
  CC       test_eglib-dir.o
  CC       test_eglib-markup.o
  CC       test_eglib-unicode.o
  CC       test_eglib-utf8.o
  CC       test_eglib-endian.o
  CC       test_eglib-module.o
  CC       test_eglib-memory.o
  CCLD     test-eglib
../src/.libs/libeglib.a(libeglib_la-gunicode.o): In function `monoeg_g_get_charset':
/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib/src/gunicode.c:220: undefined reference to `locale_charset'
/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib/src/gunicode.c:220: undefined reference to `locale_charset'
/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib/src/gunicode.c:220: undefined reference to `locale_charset'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[4]: *** [Makefile:407: test-eglib] Error 1
gmake[4]: Leaving directory '/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib/test'
gmake[3]: *** [Makefile:428: all-recursive] Error 1
gmake[3]: Leaving directory '/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib'
gmake[2]: *** [Makefile:359: all] Error 2
gmake[2]: Leaving directory '/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2/eglib'
gmake[1]: *** [Makefile:513: all-recursive] Error 1
gmake[1]: Leaving directory '/mnt/tdata/miniserver/ports/usr/ports/lang/mono/work/mono-4.4.2'
gmake: *** [Makefile:442: all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/lang/mono.
Comment 1 joshruehlig 2016-08-10 05:19:29 UTC
This affects more than just you. I need this to work to include mono 4.4 in the Emby plugin for FreeNAS 9.10
Comment 2 Yani Karydis 2016-08-14 22:23:00 UTC
The fix listed in the following stackexchange page seems to work:


Changing the "#define HAVE_LOCALCHARSET_H 1" line under eglib/config.h after configure to "#undef HAVE_LOCALCHARSET_H" and resuming the build completes successfully under FreeBSD 9.
Comment 3 joshruehlig 2016-08-16 06:55:01 UTC
(In reply to yani from comment #2)
The fix you linked worked for me. As a workaround I added..
"@${REINPLACE_CMD} 's/^#define HAVE_LOCALCHARSET_H 1/#undef HAVE_LOCALCHARSET_H/' ${WRKSRC}/eglib/config.h"
to the 'post-configure' task
Comment 4 Yani Karydis 2016-08-16 15:39:31 UTC
Created attachment 173743 [details]
Diff to fix the build problem on FreeBSD 9.
Comment 5 joshruehlig 2016-08-16 15:42:20 UTC
just a suggestion, maybe you can check the OS version and only do this on freebsd 9.X
Comment 6 Romain Tartière freebsd_committer 2016-08-17 07:06:37 UTC
Problem reproduced, working on it.
Comment 7 commit-hook freebsd_committer 2016-08-17 08:24:20 UTC
A commit references this bug:

Author: romain
Date: Wed Aug 17 08:23:38 UTC 2016
New revision: 420322
URL: https://svnweb.freebsd.org/changeset/ports/420322

  Fix build on FreeBSD 9.3

  PR:		211696
  Submitted by:	yani@pi-greece.eu
  Reported by:	pkg-fallout

Comment 8 Romain Tartière freebsd_committer 2016-08-17 08:24:44 UTC
Committed, with version check.