Monitorix port install fails

I'm trying to install sysutils/monitorix on FreeBSD 10.0-STABLE but I am running into this problem:
Code:
gmake[11]: Entering directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
  CC       libglib_2_0_la-gconvert.lo
  CC       libglib_2_0_la-gregex.lo
  CC       libglib_2_0_la-gscanner.lo
  CC       libglib_2_0_la-gsequence.lo
  CC       libglib_2_0_la-gshell.lo
  CC       libglib_2_0_la-gslice.lo
  CC       libglib_2_0_la-gslist.lo
  CC       libglib_2_0_la-gstdio.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 *outbytesleft);
                                               ^
1 warning and 1 error generated.
gmake[11]: *** [libglib_2_0_la-gconvert.lo] Error 1
gmake[11]: *** Waiting for unfinished jobs....
gmake[11]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[10]: *** [all-recursive] Error 1
gmake[10]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[9]: *** [all] Error 2
gmake[9]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[8]: *** [all-recursive] Error 1
gmake[8]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
gmake[7]: *** [all] Error 2
gmake[7]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/databases/rrdtool
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/databases/rrdtool
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/monitorix

I tried installing devel/glib20 manually but this also failed.

Is there something I can do to get this port installed?
 
Re: Monitorx port install fails

xy16644 said:
Would installing converters/libiconv fix this install error?

No. converters/libiconv should not be installed in FreeBSD 10 as it is part of the base system. There are some problem ports being fixed currently that won't work correctly with the base system version but they are few. It looks like from the output above you either have the converters/libiconv port installed or at some point installed it directly or as a dependency, but did not completely remove it.

What is the output of
Code:
pkg info | grep iconv
and
Code:
ls /usr/local/include/iconv.h
 
Output of pkg info | grep iconv

Code:
libiconv-1.14_1                A character set conversion library
php55-iconv-5.5.8_1            The iconv shared extension for php

and ls /usr/local/include/iconv.h:

Code:
-r--r--r--  1 root  wheel   9.1K Feb  1 09:39 /usr/local/include/iconv.h
 
xy16644 said:
Output of pkg info | grep iconv

Code:
libiconv-1.14_1                A character set conversion library
php55-iconv-5.5.8_1            The iconv shared extension for php

and ls /usr/local/include/iconv.h:

Code:
-r--r--r--  1 root  wheel   9.1K Feb  1 09:39 /usr/local/include/iconv.h

Ok, so you have the converters/libiconv port installed. De-install the port
Code:
pkg delete libiconv
and try re-installing the sysutils/monitorix port.

BTW, the port configures and installs fine on my FreeBSD 10-Stable box, however not tested.
 
Ok, I assume this port got installed via ports. Is it still ok to uninstall the way you mentioned? Will I need to recompile any dependent ports?
 
Ok, I looked into this a little more. When is the last time you updated your ports tree?

Looking through /usr/ports/UPDATING, it mentions this:
2013-09-04
Affects: 10-CURRENT users with any port depending on converters/libiconv
Author: madpilot@FreeBSD.org
Reason:
10-CURRENT after r254273 (committed on August 13, 2013) has an
implementation of iconv enabled by default in libc.

Due to this change some major overhauling of the ports tree has
been necessary to move the ports to using that implementation.

People using pkgng binary packages should have little problems,
"pkg upgrade" will update all software to not depend on libiconv
anymore, once updated packages are available. Please make sure to
perform a "pkg autoremove" after that and check that libiconv is
correctly removed by it.

If you are using ports the update requires some manual intervention.
The following procedure should be followed:

# pkg query %ro libiconv >ports_to_update
# pkg delete -f libiconv
# cat ports_to_update | xargs portmaster

or:

# pkg query %ro libiconv >ports_to_update
# pkg delete -f libiconv
# cat ports_to_update | xargs portupgrade -f

Following these instructions would find all ports dependent on the converters/libiconv port, delete converters/libiconv, and then re-install all dependent ports which should now use the base iconv. Since this is from 4 months ago, you may have some other show stoppers unrelated to this when following these instructions if you haven't been updating your ports tree and installed ports. If you have been keeping up to date, I think this should fix your problem without error and allow you to install sysutils/monitorix without further problems. I'm not 100% sure of this however, so you can always wait for a better reply from someone that knows more about this than I do.
 
My ports tree updates every morning so I am never more than a day behind.

I will try the instructions above and see how I get on. I use ports to install ALL my software. I assume using pkg delete will be ok?
 
So I ran the following:

# pkg query %ro libiconv >ports_to_update
# pkg delete -f libiconv
# cat ports_to_update | xargs portmaster


and it ran fine. The end result was:

Code:
===>>> The following actions were performed:
        Installation of converters/libiconv (libiconv-1.14_1)
        Re-installation of php55-iconv-5.5.8_1

I then tried to install monitorix again but it failed:

Code:
#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 *outbytesleft);
                                               ^
1 warning and 1 error generated.
gmake[11]: *** [libglib_2_0_la-gconvert.lo] Error 1
gmake[11]: *** Waiting for unfinished jobs....
2 warnings generated.
gmake[11]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[10]: *** [all-recursive] Error 1
gmake[10]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[9]: *** [all] Error 2
gmake[9]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3/glib'
gmake[8]: *** [all-recursive] Error 1
gmake[8]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
gmake[7]: *** [all] Error 2
gmake[7]: Leaving directory `/usr/ports/devel/glib20/work/glib-2.36.3'
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[6]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make[5]: stopped in /usr/ports/devel/glib20
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/graphics/cairo
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/databases/rrdtool
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/databases/rrdtool
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/monitorix

What now?
 
Aaah, I see. Thanks for the tip!

After installing the patch I have installed monitorx...thanks so much!
 
Back
Top