Ad Widget

Collapse

iconv.h error on configuring zabbix 1.8 agent on hp-ux 11.23

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • radon
    Junior Member
    • Dec 2009
    • 2

    #1

    iconv.h error on configuring zabbix 1.8 agent on hp-ux 11.23

    os hp-ux 11.23

    trying to configure agent using option below.

    ./configure --enable-agent --with-mysql --with-net-snmp --with-libcurl --prefix=/usr/local/zabbix

    Error:
    checking for ICONV support... configure: error: Unable to find iconv.h "no"

    # find / -name iconv.h
    /opt/gnome/include/iconv.h
    /opt/gtk2.6/include/iconv.h
    /usr/include/iconv.h
    /usr/local/include/iconv.h

    Anyone knows why? Thanks.
  • untergeek
    Senior Member
    Zabbix Certified Specialist
    • Jun 2009
    • 512

    #2
    If you're only compiling the agent you should not need the --with-mysql line.

    I've found that I can compile with Oracle and all of the libraries are found properly. If I try to compile for mysql almost ALL of my libraries fail to be found, from net-snmp to libcurl. If I "disable" those and try to compile --without them then I see the iconv.h problem. Again, I see no problems whatsoever when compiling for Oracle, only when I try to compile for mysql.

    Since you're compiling an agent, try without the mysql part and see what happens.

    Comment

    • radon
      Junior Member
      • Dec 2009
      • 2

      #3
      Originally posted by untergeek
      If you're only compiling the agent you should not need the --with-mysql line.

      I've found that I can compile with Oracle and all of the libraries are found properly. If I try to compile for mysql almost ALL of my libraries fail to be found, from net-snmp to libcurl. If I "disable" those and try to compile --without them then I see the iconv.h problem. Again, I see no problems whatsoever when compiling for Oracle, only when I try to compile for mysql.

      Since you're compiling an agent, try without the mysql part and see what happens.
      I have already tried just using --enable-agent before posting here. It is the same.

      On RHEL 5, I do not have any problem. Only on HP-UX, I am facing this issue.

      Comment

      • gustav
        Junior Member
        • Sep 2007
        • 10

        #4
        Originally posted by radon
        I have already tried just using --enable-agent before posting here. It is the same.

        On RHEL 5, I do not have any problem. Only on HP-UX, I am facing this issue.
        I have the same problem when doing "./configure --enable-agent --enable-static" on Solaris 9.

        Comment

        • mbrand5371
          Member
          • May 2009
          • 55

          #5
          I have the same problem on HPUX 11.23 IA64

          Code:
          > find / -name iconv.h
          /opt/gnome/include/iconv.h
          /opt/gtk2.6/include/iconv.h
          /usr/include/iconv.h
          /usr/local/include/iconv.h
          > cd /compile/source/zabbix-1.8.1
          > CFLAGS="-I/usr/local/include/" ./configure --enable-agent --with-mysql --with-net-snmp --with-libcurl --prefix=/usr/local/zabbix
          [...]
          checking for ICONV support... configure: error: Unable to find iconv.h "no"
          > ./configure --includedir=/usr/local/include --enable-agent --with-mysql --with-net-snmp --with-libcurl --prefix=/usr/local/zabbix
          [...]
          checking for ICONV support... configure: error: Unable to find iconv.h "no"
          >
          I have tried this with all of the iconv.h-path. But every time it comes the same error.
          Have someone a solution for me?

          Comment

          • DavidK
            Junior Member
            • Jul 2009
            • 3

            #6
            Hi,

            i have the same Problem on Solaris10, the Server compiles very well but if i only wanna compile the Agent with the --enable-static function i get an error that iconv.h wouldn't be found.
            The File exists in /usr/incluce /usr/local/include /usr/lib /usr/local/lib and it is the GNU Version from Sunfreeware and not the Solaris internal.

            Help would be nice

            Comment

            • hoper
              Junior Member
              • Mar 2010
              • 3

              #7
              Same here

              Solaris 10 (x86)

              I can't compile neither the server or the client. (I also tried with just --enable-client) :

              ./configure --enable-server --enable-client --with-net-snmp --with-libcurl --with-mysql

              [...]
              checking for net-snmp-config... /usr/sfw/bin/net-snmp-config
              checking for main in -lnetsnmp ... yes
              checking for localname in struct snmp_session... no
              checking for ICONV support... configure: error: Unable to find iconv.h "no"

              # find / -name iconv.h
              /usr/include/iconv.h
              /usr/local/include/iconv.h
              /usr/local/include/freetype2/iconv.h
              /opt/coolstack/include/iconv.h

              I tried to modify the script "configure" to bypass some tests about this lib but the makefiles made this way are not good either.

              I also tried with the previous 1.8.0 version and got the same result.

              Help please !

              Comment

              • craigwelsh
                Junior Member
                • Sep 2005
                • 12

                #8
                Solaris 10 SPARC

                -bash-3.00# find /usr -name iconv.h
                /usr/include/iconv.h
                /usr/local/include/iconv.h

                using the pre-zabbix-1.8.2.x-10833.tar file from nightly build the error still exists.
                ./configure --enable-agent --prefix=/usr/local/zabbix

                If you look at the following code though both tests succeed on this system but the second test changes the found_iconv to no when it should be yes having succeeded. This incorrect value causes the configure to end later on.

                I have tried manually changing this but it then failed for me at the make stage.

                Has a bug already been logged by the reporters above?

                found_iconv="no"

                { echo "$as_me:$LINENO: checking for ICONV support" >&5
                echo $ECHO_N "checking for ICONV support... $ECHO_C" >&6; }

                if test -f /usr/include/iconv.h; then
                found_iconv="yes"
                elif test -f /usr/local/include/iconv.h; then
                ICONV_CFLAGS="-I/usr/local/include"
                ICONV_LDFLAGS="-L/usr/local/lib"
                found_iconv="yes"
                else
                found_iconv="no"
                { echo "$as_me:$LINENO: result: no" >&5
                echo "${ECHO_T}no" >&6; }
                fi

                if test "x$found_iconv" = "xyes"; then
                am_save_CFLAGS="$CFLAGS"
                am_save_LDFLAGS="$LDFLAGS"

                CFLAGS="$CFLAGS $ICONV_CFLAGS"
                LDFLAGS="$LDFLAGS $ICONV_LDFLAGS"
                #### This line seems incorrect
                found_iconv="no"


                If I change this manually and run make install it fails at:
                zbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxjson/libzbxjson.a -lkvm -lm -lnsl -l kstat -lsocket -lresolv
                Undefined first referenced
                symbol in file
                libiconv_close ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
                libiconv_open ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
                libiconv ../../src/libs/zbxcommon/libzbxcommon.a(str.o)
                ld: fatal: Symbol referencing errors. No output written to zabbix_agent
                collect2: ld returned 1 exit status
                gmake[2]: *** [zabbix_agent] Error 1
                gmake[2]: Leaving directory `/tmp/zabbix-1.8.2/src/zabbix_agent'
                gmake[1]: *** [install-recursive] Error 1
                gmake[1]: Leaving directory `/tmp/zabbix-1.8.2/src'
                gmake: *** [install-recursive] Error 1
                Last edited by craigwelsh; 16-03-2010, 19:17.

                Comment

                • PeterBoros
                  Junior Member
                  • Apr 2010
                  • 1

                  #9
                  I could successfully complie zabbix 1.8.2 agent and server on Solaris 10 SPARC with gcc. I installed the CSKlibsbundle package from coolstack, and did everything with LD_LIBRARY_PATH="/opt/coolstack/lib". This way, I used the iconv from coolstack, it works. You will need an amp stack for zabbix anyway.

                  Comment

                  • phampson
                    Junior Member
                    • Jul 2010
                    • 12

                    #10
                    Hi Im trying to cross compile on ubuntu for openwrt and im getting the same message exactly.

                    iconv.h is in /usr/include where it looks first

                    I do also have an iconv.h in the toolchain for cross compiling. I dont understand the failure as it is in the place it looks for.

                    Any ideas

                    Comment

                    • phampson
                      Junior Member
                      • Jul 2010
                      • 12

                      #11
                      Hi Im trying to cross compile on ubuntu for openwrt and im getting the same message exactly.

                      iconv.h is in /usr/include where it looks first

                      I do also have an iconv.h in the toolchain for cross compiling. I dont understand the failure as it is in the place it looks for.

                      Any ideas

                      Comment

                      • kii
                        Junior Member
                        • Oct 2009
                        • 14

                        #12
                        i also have the issues on sorlaris ,any have idea?

                        Comment

                        • kii
                          Junior Member
                          • Oct 2009
                          • 14

                          #13
                          i make it

                          wget ftp://ftp.sunfreeware.com/pub/freewa...-1.13.1.tar.gz
                          ./configure
                          make
                          make install
                          ./configure --enable-agent --prefix /opt/zabbix
                          no problem

                          Comment

                          • zeds
                            Junior Member
                            Zabbix Certified Specialist
                            • Jan 2009
                            • 20

                            #14
                            I came across this problem compiling zabbix agent on Solaris 10 10/09 i386. Configure script is confused by two versions of iconv.h.
                            I just renamed /usr/include/iconv.h to /usr/include/_iconv.h.
                            Then configure script finds iconv.h in /usr/local/include (correct one) and finishes successfully.
                            After build I renamed it back. It is not elegant approach , but it it works, though..

                            Comment

                            • hpcre
                              Junior Member
                              • Oct 2011
                              • 4

                              #15
                              same problem on aix and hpux

                              I have the exact same problem when trying to compile on hpux 11iv2 and aix 5.3 with zabbix versions 1.8.5,6,7,8,9 and 1.9.8

                              I tried rename iconv.h but same problem.

                              seems there is an error in the configure script. I was able to bypass it by manually editing the configure script to stop checking for iconv and just assume its there.

                              Comment

                              Working...