NetXMS Support Forum

English Support => General Support => Topic started by: kaan on May 02, 2021, 11:00:28 AM

Title: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 02, 2021, 11:00:28 AM
1.Download archive
2.Unpack the archive:

tar zxvf netxms-VERSION.tar.gz

3.Change directory to netxms-VERSION and run configure script:

cd netxms-VERSION
./configure --with-agent  --disable-mqtt

---------------------------------------------------------------------
                         Configure results
---------------------------------------------------------------------

Version                 : 3.8.314
Prefix                  : /usr/local
Platform                : FreeBSD
Shared library suffix   : .so
Shared library version  : 38
IPv6 support            : YES
MQTT support            : NO
Build Server            : NO
Python support          : NO
Encryption enabled      : YES
SSH support enabled     : YES
Build DB-Drivers        : sqlite
Build Clients           : NO
Build Agent             : YES
Agent libs              :
Agent extra components  :
Subagents list          :freebsd netsvc ssh
Systemd support         : YES
SD-Bus support          : NO
Build Static Agent      : NO
UNICODE build           : YES
Use internal libexpat   : NO
Use internal libjansson : YES
Use internal sqlite     : NO
Use internal zlib       : NO
Force 32bit build       : NO
C compiler              : cc
C++ compiler            : c++
C++ compiler info       : FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
CPPFLAGS                :  -D_THREAD_SAFE -Wformat -Wno-unused-result -Werror=return-type -fvisibility=hidden -I/usr/local/include -DUNICODE -DPREFIX=L\"${prefix}\" -DDATADIR=L\"${pkgdatadir}\" -DBINDIR=L\"${bindir}\" -DLIBDIR=L\"${libdir}\" -DPKGLIBDIR=L\"${pkglibdir}\" -DSTATEDIR=L\"${localstatedir}/lib/netxms\" -DSYSCONFDIR=L\"${sysconfdir}\" -DNETXMS_PACKAGE_VERSION=L\"3.8.314\" -DNDEBUG
CXXFLAGS                : -g -O2 -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden
CFLAGS                  : -g -O2
LDFLAGS                 :   -L/usr/local/lib -Wc,-Qunused-arguments
LIBS                    : -lkvm -lexpat -lz -ldl -lxnet  -pthread -lssl -lcrypto -lcurl -liconv -lpcre -lpcre32
Executable LDFLAGS      :
Executable LIBS         :



4.Run build binaries and install them into /usr/local

netxms-3.8.314 # make
make  all-recursive
Making all in .
Making all in m4
Making all in build
./updatetag.pl
Cannot read git tag
make  all-am
./updatetag.pl
Cannot read git tag
Making all in src
Making all in jansson
  CC       libnxjansson_la-dump.lo
  CC       libnxjansson_la-error.lo
  CC       libnxjansson_la-hashtable.lo
  CC       libnxjansson_la-hashtable_seed.lo
  CC       libnxjansson_la-load.lo
  CC       libnxjansson_la-memory.lo
  CC       libnxjansson_la-pack_unpack.lo
  CC       libnxjansson_la-strbuffer.lo
  CC       libnxjansson_la-strconv.lo
  CC       libnxjansson_la-utf.lo
  CC       libnxjansson_la-value.lo
  CCLD     libnxjansson.la
Making all in libnetxms
  CXX      libnetxms_la-array.lo
In file included from array.cpp:24:
In file included from ./libnetxms.h:28:
../../include/nms_util.h:3859:27: error: functions that differ only in their return type cannot be overloaded
void LIBNETXMS_EXPORTABLE qsort_s(void *base, size_t nmemb, size_t size, int (*compare)(void *, const void *, const void *), void *context);
~~~~                      ^
/usr/include/stdlib.h:359:10: note: previous declaration is here
errno_t  qsort_s(void *, rsize_t, rsize_t,
~~~~~~~  ^
array.cpp:374:4: error: no matching function for call to 'qsort_s'
   qsort_s(m_data, m_size, m_elementSize, cb, context);
   ^~~~~~~
/usr/include/stdlib.h:359:10: note: candidate function not viable: no known conversion from 'int (*)(void *, const void *, const void *)' to 'int (*)(const void *, const void *, void *)' for 4th argument
errno_t  qsort_s(void *, rsize_t, rsize_t,
         ^
2 errors generated.
*** Error code 1

Stop.
make[3]: stopped in /usr/home/kaan/netxms-3.8.314/src/libnetxms
*** Error code 1

Stop.
make[2]: stopped in /usr/home/kaan/netxms-3.8.314/src
*** Error code 1
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on May 02, 2021, 08:09:42 PM
Just fixed it, commit 368c35ad0d in branch stable-3.8.

Best regards,
Victor

P.S. Download link to new source package for convenience: https://cloud.radensolutions.com/s/JCLQKsm3c8YSYSJ (https://cloud.radensolutions.com/s/JCLQKsm3c8YSYSJ)
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 02, 2021, 09:47:40 PM
Thank you Viktor!
How to build netxms from stable branch?
I download https://github.com/netxms/netxms/archive/refs/heads/stable-3.8.zip (https://github.com/netxms/netxms/archive/refs/heads/stable-3.8.zip)
unzip it, try to configure
./configure --with-agent  --disable-mqtt
but
./configure: Command not found.
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on May 02, 2021, 09:48:59 PM
You have to create it by running reconf script if you clone GIT repository. Or just use source package that I've provided in the post.

Best regards,
Victor
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 03, 2021, 11:45:59 PM
Thank you Viktor, everything works!
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 06, 2021, 03:32:44 PM
In this version (https://github.com/netxms/netxms/archive/refs/heads/stable-3.8.zip) I can not get statistics from network interfaces.
In raw value column values are present but in the value column they are always equal to zero.
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on May 10, 2021, 04:19:19 PM
It is delta value (average per second). As raw value does not change delta is always 0 - perhaps there is no traffic on interface?

Best regards,
Victor
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 11, 2021, 11:01:31 AM
yes, there is traffic on the interface, here are the statistics from the iftop utility:
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on May 11, 2021, 11:44:10 AM
Then it's likely bug in agent. Try to read multiple values directly from agent with nxget:

nxget -i 1 node_ip 'Net.Interface.BytesIn64(1)'
nxget -i 1 node_ip 'Net.Interface.BytesIn(1)'

and check if output looks valid or not (replace node_ip with actual IP address).

Best regards,
Victor
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 11, 2021, 11:56:54 AM
I do not have a nxget utility in the system.
That's all I have:

>nx [tab]
nxaevent     nxapush      nxencpasswd  nxhwid       nxsnmpget
nxagentd     nxcsum       nxethernetip nxlptest     nxsnmpset
nxappget     nxdevcfg     nxgenguid    nxmibc       nxsnmpwalk

Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on May 11, 2021, 12:50:27 PM
It should be on NetXMS server.

Best regards,
Victor
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on May 11, 2021, 03:00:58 PM
ок, this is the output from the netxms server:

netxms@????????:~$ sudo nxget -i 1 192.168.96.254 'Net.Interface.BytesIn64(1)'
[sudo] password for netxms:
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
9221120237041090560
netxms@???????:~$ sudo nxget -i 1 192.168.96.254 'Net.Interface.BytesIn(1)'
0
0
0
0
0
0
0
0
0

Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: Victor Kirhenshtein on June 07, 2021, 02:17:53 PM
Hi,

I just fixed it. Fix will be included into next release.

Best regards,
Victor
Title: Re: error when install netxms-3.8.314 from source on FreeBSD-13
Post by: kaan on June 15, 2021, 01:57:53 PM
All good, thank you!