smartmontools on Solaris 11

ldoodle

Limp Gawd
Joined
Jun 29, 2011
Messages
172
Hiya,

Sorry if this is in the wrong sub forum, but I could think of anywhere better.

Anyway, I downloaded and extracted the latest tarball, and ./configure seems to go OK, but when I run make and make install I get a shed load of errors, and in the latter command a fatal one.

Capture from putty below in post 2.
 
-----------------------------------------------------------------------------
root@server01:/dpool/Software/Downloads/smartmontools-5.42# make
make all-am
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT smartd.o -MD -MP -MF .deps/smartd.Tpo -c -o smartd. o smartd.cpp
smartd.cpp: In function âvoid ParseOpts(int, char**)â:
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
smartd.cpp:4128:3: warning: deprecated conversion from string constant to âchar*â
mv -f .deps/smartd.Tpo .deps/smartd.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT atacmds.o -MD -MP -MF .deps/atacmds.Tpo -c -o atacm ds.o atacmds.cpp
mv -f .deps/atacmds.Tpo .deps/atacmds.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT dev_ata_cmd_set.o -MD -MP -MF .deps/dev_ata_cmd_set .Tpo -c -o dev_ata_cmd_set.o dev_ata_cmd_set.cpp
mv -f .deps/dev_ata_cmd_set.Tpo .deps/dev_ata_cmd_set.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT dev_interface.o -MD -MP -MF .deps/dev_interface.Tpo -c -o dev_interface.o dev_interface.cpp
mv -f .deps/dev_interface.Tpo .deps/dev_interface.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT knowndrives.o -MD -MP -MF .deps/knowndrives.Tpo -c -o knowndrives.o knowndrives.cpp
mv -f .deps/knowndrives.Tpo .deps/knowndrives.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT scsicmds.o -MD -MP -MF .deps/scsicmds.Tpo -c -o scs icmds.o scsicmds.cpp
mv -f .deps/scsicmds.Tpo .deps/scsicmds.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT scsiata.o -MD -MP -MF .deps/scsiata.Tpo -c -o scsia ta.o scsiata.cpp
mv -f .deps/scsiata.Tpo .deps/scsiata.Po
echo '/* svnversion.h. Generated by Makefile from Id strings. */' > svnversion. h
(cd . && cat CHANGELOG Makefile.am configure.in smart*.in *.cpp *.h *.s) \
| sed -n 's,^.*\$[d]: [^ ]* \([0-9][0-9]* [0-9][-0-9]* [0-9][:0-9]*\)[^:0-9][^ $]*\$.*$,\1,p' \
| sort -n -r \
| sed -n 'h;s,^\([^ ]*\) .*$,REV "\1",p;g;s,^[^ ]* \([^ ]*\) .*$,DATE "\1",p;g;s ,^[^ ]* [^ ]* \([^ ]*\)$,TIME "\1",p;q' \
| sed 's,^,#define SMARTMONTOOLS_SVN_,' >> svnversion.h
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT utility.o -MD -MP -MF .deps/utility.Tpo -c -o utili ty.o utility.cpp
mv -f .deps/utility.Tpo .deps/utility.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT os_solaris.o -MD -MP -MF .deps/os_solaris.Tpo -c -o os_solaris.o os_solaris.cpp
os_solaris.cpp:52:1: warning: deprecated conversion from string constant to âchar *â
os_solaris.cpp:52:1: warning: deprecated conversion from string constant to âchar *â
mv -f .deps/os_solaris.Tpo .deps/os_solaris.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT dev_legacy.o -MD -MP -MF .deps/dev_legacy.Tpo -c -o dev_legacy.o dev_legacy.cpp
mv -f .deps/dev_legacy.Tpo .deps/dev_legacy.Po
g++ -g -O2 -Wall -o smartd smartd.o atacmdnames.o atacmds.o dev_ata_cmd_set. o dev_interface.o knowndrives.o scsicmds.o scsiata.o utility.o os_solaris .o dev_legacy.o -lnsl -lsocket
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCONF DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontool s"' -g -O2 -Wall -MT smartctl.o -MD -MP -MF .deps/smartctl.Tpo -c -o sma rtctl.o smartctl.cpp
smartctl.cpp: In function âconst char* parse_options(int, char**, ata_print_optio ns&, scsi_print_options&)â:
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar* â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar â
smartctl.cpp:289:3: warning: deprecated conversion from string constant to âchar â
mv -f .deps/smartctl.Tpo .deps/smartctl.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCON DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontoo s"' -g -O2 -Wall -MT ataprint.o -MD -MP -MF .deps/ataprint.Tpo -c -o at print.o ataprint.cpp
mv -f .deps/ataprint.Tpo .deps/ataprint.Po
g++ -DHAVE_CONFIG_H -I. -DBUILD_INFO='"(local build)"' -DSMARTMONTOOLS_SYSCON DIR='"/usr/local/etc"' -DSMARTMONTOOLS_DRIVEDBDIR='"/usr/local/share/smartmontoo s"' -g -O2 -Wall -MT scsiprint.o -MD -MP -MF .deps/scsiprint.Tpo -c -o csiprint.o scsiprint.cpp
mv -f .deps/scsiprint.Tpo .deps/scsiprint.Po
g++ -g -O2 -Wall -o smartctl smartctl.o atacmdnames.o atacmds.o ataprint.o ev_ata_cmd_set.o dev_interface.o knowndrives.o scsicmds.o scsiata.o scsiprint. utility.o os_solaris.o dev_legacy.o -lnsl -lsocket
/bin/sh ./config.status --file=update-smart-drivedb
config.status: creating update-smart-drivedb
chmod +x update-smart-drivedb
sed "s|/usr/local/sbin/|/usr/local/sbin/|g" ./smartd.initd.in > smartd.initd

---------------------------------------------------------------------------------

root@server01:/dpool/Software/Downloads/smartmontools-5.42# make install
test -z "/usr/local/sbin" || /usr/bin/gmkdir -p "/usr/local/sbin"
/usr/bin/ginstall -c smartd smartctl '/usr/local/sbin'
test -z "/usr/local/sbin" || /usr/bin/gmkdir -p "/usr/local/sbin"
/usr/bin/ginstall -c update-smart-drivedb '/usr/local/sbin'
/bin/sh /dpool/Software/Downloads/smartmontools-5.42/install-sh -d /usr/local/etc
/usr/bin/ginstall -c -m 644 ./smartd.conf /usr/local/etc/smartd.conf
test -z "" || /usr/bin/gmkdir -p ""
test -z "/usr/local/share/doc/smartmontools" || /usr/bin/gmkdir -p "/usr/local/share/doc/smartmontools"
/usr/bin/ginstall -c -m 644 AUTHORS CHANGELOG COPYING INSTALL NEWS README TODO WARNINGS smartd.conf '/usr/local/share/doc/smartmontools'
test -z "/usr/local/share/smartmontools" || /usr/bin/gmkdir -p "/usr/local/share/smartmontools"
/usr/bin/ginstall -c -m 644 drivedb.h '/usr/local/share/smartmontools'
test -z "/usr/local/share/doc/smartmontools/examplescripts" || /usr/bin/gmkdir -p "/usr/local/share/doc/smartmontools/examplescripts"
/usr/bin/ginstall -c -m 644 examplescripts/README '/usr/local/share/doc/smartmontools/examplescripts'
test -z "/usr/local/share/doc/smartmontools/examplescripts" || /usr/bin/gmkdir -p "/usr/local/share/doc/smartmontools/examplescripts"
/usr/bin/ginstall -c examplescripts/Example1 examplescripts/Example2 examplescripts/Example3 examplescripts/Example4 '/usr/local/share/doc/smartmontools/examplescripts'
/bin/sh /dpool/Software/Downloads/smartmontools-5.42/install-sh -d /usr/local/etc/init.d
/usr/bin/ginstall -c ./smartd.initd /usr/local/etc/init.d/smartd
cat ./smartd.conf.5.in | sed "s|CURRENT_SVN_VERSION|smartmontools-5.42|g; s|CURRENT_SVN_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$,\1,p' svnversion.h`|g; s|CURRENT_SVN_REV|`sed -n 's,^.*REV[^"]*"\([^"]*\)".*$,r\1,p' svnversion.h`|g; s|/usr/local/share/man/|/usr/local/share/man/|g; s|/usr/local/sbin/|/usr/local/sbin/|g; s|/usr/local/etc/rc\\.d/init.d/|/usr/local/etc/init.d/|g; s|/usr/local/share/doc/smartmontools/examplescripts/|!exampledir!|g; s|/usr/local/share/doc/smartmontools/|/usr/local/share/doc/smartmontools/|g; s|!exampledir!|/usr/local/share/doc/smartmontools/examplescripts/|g; s|/usr/local/etc/smartd\\.conf|/usr/local/etc/smartd.conf|g; s|/usr/local/etc/smart_drivedb\\.h|/usr/local/etc/smart_drivedb\\.h|g" | sed '/^\.\\" %IF ENABLE_ATTRIBUTELOG/,/^\.\\" %ENDIF ENABLE_ATTRIBUTELOG/ s,^,.\\"\# ,' | sed '/^\.\\" %IF ENABLE_CAPABILITIES/,/^\.\\" %ENDIF ENABLE_CAPABILITIES/ s,^,.\\"\# ,' | sed "s|/usr/local/share/smartmontools/drivedb\\.h|/usr/local/share/smartmontools/drivedb.h|g" | sed '/^\.\\" %IF ENABLE_SAVESTATES/,/^\.\\" %ENDIF ENABLE_SAVESTATES/ s,^,.\\"\# ,' | if test -n 'Solaris'; then sed -e 's,OS_MAN_FILTER,Solaris,g' -e '/^\.\\" %IF NOT OS .*Solaris/,/^.\\" %ENDIF NOT OS .*Solaris/ s,^,.\\"\# ,' -e '/^\.\\" %IF OS .*Solaris/,/^\.\\" %ENDIF OS .*Solaris/ s,^,!!,' -e '/^\.\\" %IF OS ./,/^\.\\" %ENDIF OS ./ s,^,.\\"\# ,' -e '/^!*\.\\" %IF NOT OS ./,/^!*\.\\" %ENDIF NOT OS ./ s,^,!!,' -e '/^!!/{ s,^!!!*,,; s,^\.\\"! \(.*\)$,\1 \\"\#, ;}' ; else cat; fi > smartd.conf.5
sed: command garbled: /^!!/{ s,^!!!*,,; s,^\.\\"! \(.*\)$,\1 \\"\#, ;}
*** Error code 2
make: Fatal error: Command failed for target `smartd.conf.5'
Current working directory /dpool/Software/Downloads/smartmontools-5.42
*** Error code 1
The following command caused the error:
make install-exec-am install-data-am
make: Fatal error: Command failed for target `install-am'
 
A shot in the dark here, but perhaps the makefile is expecting a GNU sed. On OpenIndiana, you could try setting your $PATH to use /usr/gnu/bin first:
Code:
bash$ export PATH=/usr/gnu/bin:$PATH
bash$ make install
Or you may be able to install binaries (they're in SFE on OI):
Code:
$ sudo pkg install smartmontools
 
my napp-it web-UI installer includes smartmontools
you can install napp-it via wget -O - www.napp-it.org/nappit | perl
where smartmontools is included or you can install it as root like

cd $HOME
pkg install gcc-dev
wget http://downloads.sourceforge.net/project/smartmontools/smartmontools/5.40/smartmontools-5.40.tar.gz
gzcat $HOME/smartmontools-5.40.tar.gz | tar xf -
cd smartmontools-5.40/
./configure --prefix=/usr --sysconfdir=/etc
make && make install && make clean && cd $HOME
 
Last edited:
my napp-it web-UI installer includes smartmontools
you can install napp-it via wget -O - www.napp-it.org/nappit | perl
where smartmontools is included or you can install it as root like

cd $HOME
pkg install gcc-dev
wget http://downloads.sourceforge.net/project/smartmontools/smartmontools/5.40/smartmontools-5.40.tar.gz
gzcat $HOME/smartmontools-5.40.tar.gz | tar xf -
cd smartmontools-5.40/
./configure --prefix=/usr --sysconfdir=/etc
make && make install && make clean && cd $HOME

That worked, but I still got a load of deprecated warnings?
 
As long as it compiles, I wouldn't be overly concerned. The warning is to the developer of the code to change how he does things on line 289, because some day the compiler won't do what he asked, but for now it is doing it.
 
Back
Top