NetXMS Support Forum

English Support => General Support => Topic started by: BigBlue on May 15, 2018, 05:17:52 PM

Title: Centos 7 undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
Post by: BigBlue on May 15, 2018, 05:17:52 PM
Hi,

I have an during make process in a centos 7:
"
make[5] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxdbmgr »
Making all in nxminfo
make[5] : on entre dans le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxminfo »
  CXX      nxminfo-nxminfo.o
  CXXLD    nxminfo
../../libnxsrv/.libs/libnxsrv.so: undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
collect2: error: ld returned 1 exit status
make[5]: *** [nxminfo] Erreur 1
make[5] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxminfo »
make[4]: *** [all-recursive] Erreur 1
make[4] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools »
make[3]: *** [all-recursive] Erreur 1
make[3] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server »
make[2]: *** [all-recursive] Erreur 1
make[2] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src »
make[1]: *** [all-recursive] Erreur 1
make[1] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5 »
make: *** [all] Erreur 2
"

with the following configuration options:
./configure --with-server --with-mysql --with-agent

I have no problems in version 2.2.4.

thanks for your help.
Title: Re: Centos 7 undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
Post by: Victor Kirhenshtein on May 15, 2018, 05:53:52 PM
Hi,

try to remove old NetXMS libraries from /usr/local/lib or run make install instead of make.

Best regards,
Victor
Title: Re: Centos 7 undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
Post by: BigBlue on May 16, 2018, 12:19:21 PM
By copying the 2.2.4 library into 2.2.5, the "make" works.
cp /usr/local/lib/libnxsrv.so.2.0.0 ./netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0

But it's probably not a good idea, because this library with the same version number, is bigger:
rwxr-xr-x 1 root root 728664 May 16 11:02 /root/NetXMS/netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0
rwxr-xr-x 1 root root 766072 May 16 10:54 /root/NetXMS/netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0.ori

The library has changed and no longer contains the variable SNMP_Variable::getValueAsMACAddr.
I think it's a bug.
Title: Re: Centos 7 undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
Post by: Victor Kirhenshtein on May 16, 2018, 12:30:20 PM
You should not copy old libraries into source tree - that way you will get new binaries mixed with old binaries. Just remove old libraries from /usr/local/lib and re-run make (I would suggest to do make clean first to cleanup source tree).

Best regards,
Victor
Title: Re: Centos 7 undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
Post by: BigBlue on May 17, 2018, 09:55:10 AM
Ok, it works.... But it doesn't seem very normal to me.

When will a centos repository !?

Anyway, thanks for the help !