Problems building 1143 in Solaris 8

cmsmith

27-03-2005 00:17:42

Running Solaris 8 with GCC, attempting to build NetMRG from SVN - build 1143.

1) When running configure, I'm getting this

checking if Net-SNMP needs crypto support... yes
checking if UCD-SNMP needs crypto support... no
checking for CRYPTO_free in -lcrypto... yes
checking for snmp_timeout in -lnetsnmp... yes
./configure line 6783 syntax error near unexpected token `external'
./configure line 6783 `AM_GNU_GETTEXT(external)'
make *** [config.status] Error 2

Commented line 6783 as well as the corresponding line in configure.ac, and I get passed this.

2) What are setenv and unsetenv supposed to do in monitors.cpp? Where should they be defined?

CXX monitors.o
monitors.cpp In function `void export_params_to_env(DeviceInfo&)'
monitors.cpp464 error `setenv' undeclared (first use this function)
monitors.cpp464 error (Each undeclared identifier is reported only once for each function it appears in.)
monitors.cpp In function `void remove_params_from_env(DeviceInfo&)'
monitors.cpp473 error `unsetenv' undeclared (first use this function)
make[2] *** [monitors.o] Error 1
make[1] *** [all-recursive] Error 1
make *** [all-recursive] Error 1

3) Need -lrt added to LIBS for solaris. Without it, I get undefined symbol for nanosleep. I added it to src/Makefile, but there is probably a better place to put it.

LINK netmrg-gatherer
Undefined first referenced
symbol in file
nanosleep netmrg.o (symbol belongs to implicit dependency /lib/librt.so.1)
ld fatal Symbol referencing errors. No output written to netmrg-gatherer
collect2 ld returned 1 exit status
make[2] *** [netmrg-gatherer] Error 1
make[1] *** [all-recursive] Error 1
make *** [all-recursive] Error 1

keb

27-03-2005 02:22:39

[quote6ce00f3049="cmsmith"]Running Solaris 8 with GCC, attempting to build NetMRG from SVN - build 1143.[/quote6ce00f3049]

Which version of gcc are you using to build netmrg? Also, is this the Intel or Sparc version of Solaris 8?

[quote6ce00f3049="cmsmith"]1) When running configure, I'm getting this

checking if Net-SNMP needs crypto support... yes
checking if UCD-SNMP needs crypto support... no
checking for CRYPTO_free in -lcrypto... yes
checking for snmp_timeout in -lnetsnmp... yes
./configure line 6783 syntax error near unexpected token `external'
./configure line 6783 `AM_GNU_GETTEXT(external)'
make *** [config.status] Error 2

Commented line 6783 as well as the corresponding line in configure.ac, and I get passed this.[/quote6ce00f3049]

Do you have gettext 0.14.1 installed? When you run configure, does it run autoconf to rebuild the configure script before continuing? Sometimes the autotools can be picky with timestamps of certain files. If you make changes (or simply "touch $file") it will try to rebuild the scripts.

[quote6ce00f3049="cmsmith"]2) What are setenv and unsetenv supposed to do in monitors.cpp? Where should they be defined?[/quote6ce00f3049]

These are to provide parameters to external scripts without passing each param in as an argument. I believe this was added in response to a bug report. These two calls should be defined in the stdlib.h system header.

[quote6ce00f3049="cmsmith"]3) Need -lrt added to LIBS for solaris. Without it, I get undefined symbol for nanosleep. I added it to src/Makefile, but there is probably a better place to put it.[/quote6ce00f3049]

Feel free to submit a bug report at bugs.netmrg.net with this information. We should be able to resolve this in the next release (0.19).

-Kevin

cmsmith

27-03-2005 13:26:21

[quote2ac02d02b2="keb"]Which version of gcc are you using to build netmrg? Also, is this the Intel or Sparc version of Solaris 8?[/quote2ac02d02b2]

Solaris 8 on SPARC - GCC 3.4.2, packaged by sunfreeware.com

[quote2ac02d02b2="keb"]Do you have gettext 0.14.1 installed? When you run configure, does it run autoconf to rebuild the configure script before continuing? Sometimes the autotools can be picky with timestamps of certain files. If you make changes (or simply "touch $file") it will try to rebuild the scripts.[/quote2ac02d02b2]

I did not have gettext 0.14.1. It was running aclocal, automake, and autoconf whenever I run configure. I think it was because I commented the AM_GETTEXT line from configure.ac. Installed gettext and uncommented the line and it cleared up this problem.

[quote2ac02d02b2="keb"]Feel free to submit a bug report at bugs.netmrg.net with this information. We should be able to resolve this in the next release (0.19).[/quote2ac02d02b2]

Will do.

cmsmith

27-03-2005 13:38:15

[quote91cc5cbb65="keb"]These are to provide parameters to external scripts without passing each param in as an argument. I believe this was added in response to a bug report. These two calls should be defined in the stdlib.h system header.[/quote91cc5cbb65]

Apparently these are not defined on solaris. Found this on a google search http//lists.gnu.org/archive/html/bug-coreutils/2004-11/msg00019.html