Ad Widget

Collapse

Zabbix Compile Problem LDFLAGS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • the.one
    Junior Member
    • Apr 2012
    • 2

    #1

    Zabbix Compile Problem LDFLAGS

    Hello,

    I'm stuck at compiling Zabbix 1.8.11 properly as non-root on a CentOS 6.2.

    Here is my way:

    Code:
    export LDFLAGS="-R/home/user/opt/url/lib/"
    Code:
    ./configure --enable-server --with-mysql --with-net-snmp=/home/user/opt/bin/net-snmp-config --with-libcurl --prefix=/home/user/opt
    The result:

    Configuration:

    Detected OS: linux-gnu
    Install path: /home/user/opt
    Compilation arch: linux

    Compiler: gcc
    Compiler flags: -g -O2 -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1 -I. -I/home/user/opt/include

    Enable server: yes
    Server details:
    With database: MySQL
    WEB Monitoring via: cURL
    Native Jabber: no
    SNMP: net-snmp
    IPMI: no
    SSH: no
    Linker flags: -rdynamic -R/home/user/opt/lib -L/usr/lib64 -L/home/user/opt/lib -L/home/user/opt/lib
    Libraries: -lm -lresolv -lmysqlclient -lcurl -lnetsnmp -lcrypto -lm -lcrypto -lnetsnmp -lcrypto -lm -lcrypto

    Enable proxy: no

    Enable agent: no

    LDAP support: no
    IPv6 support: no

    ************************************************** *********
    * Now run 'make install' *
    * *
    * Thank you for using Zabbix! *
    * <http://www.zabbix.com> *
    ************************************************** *********
    After 'make install', issuing:

    Code:
    ldd /home/user/opt/sbin/zabbix_server
    I get...

    ...
    libnetsnmp.so.20 => not found
    ...
    It's there!

    Code:
    ls /home/user/opt/lib/ | grep libnetsnmp.so.20
    libnetsnmp.so.20
    libnetsnmp.so.20.0.1
    Issuing:

    Code:
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/lib
    would solve the problem, but its not the solution.

    Thank you guys in advance!

    --
    The One
  • the.one
    Junior Member
    • Apr 2012
    • 2

    #2
    Solved

    Finally I found the solution!

    The proper way to pass the LDFLAGS is:

    Code:
     export LDFLAGS="-Wl,-R,/home/user/opt/lib"
    I hope it helps for others.

    Cheers!

    Comment

    Working...