Bug 186295 - devel/glib20 fails to build
devel/glib20 fails to build
Status: Closed FIXED
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s)
Latest
Any Any
: Normal Affects Only Me
Assigned To: gnome
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-31 09:30 UTC by oz42
Modified: 2014-02-08 09:30 UTC (History)
0 users

See Also:


Attachments
patch-glib_gconvert.c (487 bytes, text/x-patch)
2014-02-01 12:57 UTC, tijl
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description oz42 2014-01-31 09:30:00 UTC
/usr/ports/devel/glib20 fails to compile:

gmake[6]: Entering directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
  CC       libglib_2_0_la-gconvert.lo
  CC       libglib_2_0_la-genviron.lo
  CC       libglib_2_0_la-gerror.lo
  CC       libglib_2_0_la-gfileutils.lo
gconvert.c:66:2: error: GNU libiconv not in use but included iconv.h is from libiconv
#error GNU libiconv not in use but included iconv.h is from libiconv
 ^
gconvert.c:310:21: warning: passing 'gchar **' (aka 'char **') to parameter of type 'const char **' discards
      qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
  return iconv (cd, inbuf, inbytes_left, outbuf, outbytes_left);
                    ^~~~~
/usr/local/include/iconv.h:83:48: note: passing argument to parameter 'inbuf' here
extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *out...
                                               ^
1 warning and 1 error generated.
gmake[6]: *** [libglib_2_0_la-gconvert.lo] Error 1
gmake[6]: *** Waiting for unfinished jobs....
gmake[6]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[5]: *** [all-recursive] Error 1
gmake[5]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[4]: *** [all] Error 2
gmake[4]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
===> Compilation failed unexpectedly.
Comment 1 Edwin Groothuis freebsd_committer 2014-01-31 23:35:49 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 tijl 2014-02-01 12:57:36 UTC
Here's a patch you can drop in /usr/ports/devel/glib20/files/
Comment 3 ohartman 2014-02-02 15:14:45 UTC
This patch works for me.
Comment 4 kwm 2014-02-02 21:20:36 UTC
Olaf, do you have libiconv currently installed? I'm just trying to 
understand what causes this problem before I try to patch it.
Comment 5 oz42 2014-02-03 08:05:13 UTC
Am 2014-02-02 22:20, schrieb Koop Mast:
> Olaf, do you have libiconv currently installed? I'm just trying to
> understand what causes this problem before I try to patch it.

Yes, I have: libiconv-1.14_1
Comment 6 oz42 2014-02-03 08:13:53 UTC
Am 2014-02-01 13:57, schrieb Tijl Coosemans:
> Here's a patch you can drop in /usr/ports/devel/glib20/files/

That helped, thanks!
Comment 7 dfilter freebsd_committer 2014-02-08 09:26:51 UTC
Author: kwm
Date: Sat Feb  8 09:26:43 2014
New Revision: 343312
URL: http://svnweb.freebsd.org/changeset/ports/343312
QAT: https://qat.redports.org/buildarchive/r343312/

Log:
  Fix build if libiconv is installed.
  
  PR:		ports/186295
  Submitted by:	Olaf Zaplinski <oz42@oz42.eu> (PR submitter)
  		Tijl Coosemans <tijl@coosemans.org> (patch submitter)

Added:
  head/devel/glib20/files/patch-glib_gconvert.c   (contents, props changed)

Added: head/devel/glib20/files/patch-glib_gconvert.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/glib20/files/patch-glib_gconvert.c	Sat Feb  8 09:26:43 2014	(r343312)
@@ -0,0 +1,14 @@
+Work around our situation of having both libiconv in libc and libiconv from
+ports installed.
+
+--- glib/gconvert.c.orig	2014-02-08 10:15:50.000000000 +0100
++++ glib/gconvert.c	2014-02-08 10:16:52.000000000 +0100
+@@ -62,7 +62,7 @@
+ #error GNU libiconv in use but included iconv.h not from libiconv
+ #endif
+ #if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H) \
+-     && !defined (__APPLE_CC__) && !defined (__LP_64__)
++  && !defined (LIBICONV_PLUG) && !defined (__APPLE_CC__) && !defined (__LP_64__)
+ #error GNU libiconv not in use but included iconv.h is from libiconv
+ #endif
+ 
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Koop Mast freebsd_committer 2014-02-08 09:27:07 UTC
State Changed
From-To: open->closed

Fix committed, thanks.