error during install agent

Started by tianhao, November 07, 2013, 11:17:22 AM

Previous topic - Next topic

tianhao

hi,
i met an error while running make. here is what i got

Making all in core
make[4]: Entering directory `/tmp/netxms-1.2.9/src/agent/core'
../../../tools/create_ssa_list.sh "" > static_subagents.cpp
  CXX    static_subagents.o
  CXXLD  nxagentd
session.o: In function `InterlockedDecrement':
/tmp/netxms-1.2.9/src/agent/core/../../../include/nms_threads.h:1032: undefined reference to `__sync_sub_and_fetch_4'
/tmp/netxms-1.2.9/src/agent/core/../../../include/nms_threads.h:1032: undefined reference to `__sync_sub_and_fetch_4'
/tmp/netxms-1.2.9/src/agent/core/../../../include/nms_threads.h:1032: undefined reference to `__sync_sub_and_fetch_4'
collect2: ld returned 1 exit status
make[4]: *** [nxagentd] Error 1
make[4]: Leaving directory `/tmp/netxms-1.2.9/src/agent/core'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/netxms-1.2.9/src/agent'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/netxms-1.2.9/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/netxms-1.2.9'
make: *** [all] Error 2

BTW, i've update g++ to latest version. Thanks!

Alex Kirhenshtein


tianhao

it's xenserver release 6.0.2-53456p

Victor Kirhenshtein

Seems that atomic functions are missing on XEN server for some reason. What is output of your gcc -v?

Also, you can try to run pre-compiled static agent: https://www.netxms.org/download/agent_packages/nxagent-1.2.9-linux-x86-static.tar.gz - there are good chances that it will work.

Best regards,
Victor

tianhao

hi, victor

the output of gcc -v is

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=i386-redhat-linux
Thread model: posix
gcc version 4.1.2 20080704 (Red Hat 4.1.2-54)

I tried the pre-compiled agent, seems that libssl.so.0.9.8 is missing.
./nxagentd: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory

Since i'm a rookie, any help would be appreciated, thanks!

Victor Kirhenshtein

Hi!

Looks like gcc on your system configured to use i386 instruction set by default (see line "Target: i386-redhat-linux" in gcc version output). Atomic functions required at least i486. Try to use compilation flag -march=i486 when building agent, like this:

CPPFLAGS="-march=i486" ./configure other configure options as usual

Best regards,
Victor