Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#603 closed defect (worksforme)

smartmontools trunk fails to build on osx/darwin after changes in r4067

Reported by: Alex Samorukov Owned by: Christian Franke
Priority: major Milestone:
Component: all Version: 6.4
Keywords: Cc:


smartmontools fails to build on osx after r4067, see error report below:

[...output skipped]
config.status: creating update-smart-drivedb
chmod +x update-smart-drivedb
/bin/sh ./config.status
config.status: creating
chmod +x
  cat ./ | $(MAN_FILTER) > smartd.conf.5
/bin/sh: -c: line 0: syntax error near unexpected token `|'
/bin/sh: -c: line 0: `cat ./ | sed -e 's|CURRENT_SVN_VERSION|smartmontools-6.4|g' -e "s|CURRENT_SVN_DATE|`sed -n 's,^.*DATE[^"]*"\([^"]*\)".*$,\1,p' svnversion.h`|g" -e "s|CURRENT_SVN_REV|`sed -n 's,^.*REV[^"]*"\([^"]*\)".*$,r\1,p' svnversion.h`|g" -e 's|/usr/local/share/man/|/usr/local/share/man/|g' -e 's|/usr/local/sbin/|/usr/local/sbin/|g' -e 's|/usr/local/etc/rc\.d/init.d/|/|g' -e 's|/usr/local/share/doc/smartmontools/examplescripts/|!exampledir!|g' -e 's|/usr/local/share/doc/smartmontools/|/usr/local/share/doc/smartmontools/|g' -e 's|!exampledir!|/usr/local/share/doc/smartmontools/examplescripts/|g' -e 's|/usr/local/etc/smartd\.conf|/usr/local/etc/smartd.conf|g' -e 's|/usr/local/etc/smart_drivedb\.h|/usr/local/etc/smart_drivedb.h|g' -e 's|/usr/local/etc/smartd_warning\.sh|/usr/local/etc/|g' -e 's|\\fBmail\\fP|\\fBmail\\fP|g' -e 's|\\'\''mail\\'\''|\\'\''mail\\'\''|g' -e 's|/usr/bin/mail|/usr/bin/mail|g' -e 's|RELEASE_6_0_DRIVEDB|RELEASE_6_4_DRIVEDB|g' | if test -n '/usr/local/etc/smartd_warning.d'; then sed 's|/usr/local/etc/smartd_warning\.d|/usr/local/etc/smartd_warning.d|g' ; else sed '/^\.\\" %IF ENABLE_SMARTDPLUGINDIR/,/^\.\\" %ENDIF ENABLE_SMARTDPLUGINDIR/ s,^,.\\"# ,' ; fi | sed '/^\.\\" %IF ENABLE_ATTRIBUTELOG/,/^\.\\" %ENDIF ENABLE_ATTRIBUTELOG/ 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 'Darwin'; then sed -e 's,OS_MAN_FILTER,Darwin,g' -e '/^\.\\" %IF NOT OS .*Darwin/,/^.\\" %ENDIF NOT OS .*Darwin/ s,^,.\\"# ,' -e '/^\.\\" %IF OS .*Darwin/,/^\.\\" %ENDIF OS .*Darwin/ s,^,!!,' -e '/^\.\\" %IF OS ./,/^\.\\" %ENDIF OS ./ s,^,.\\"# ,' -e '/^!*\.\\" %IF NOT OS ./,/^!*\.\\" %ENDIF NOT OS ./ s,^,!!,' -e 's,^!!!*\.\\"! \(.*\)$,\1 \\"#,' -e 's,^!!!*,,' ; else cat; fi > smartd.conf.5'
make[1]: *** [smartd.conf.5] Error 2
make: *** [all] Error 2

Change History (7)

comment:1 Changed 5 years ago by Christian Franke

Cc: Christian Franke removed
Owner: set to Christian Franke
Status: newaccepted

Any ./configure Parameters used?

Which shell is /bin/sh ?

Which make is used?

Does the problem persist if other parameters, another shell (e.g. make SHELL=/bin/bash), or another make (e.g. GNU make instead of BSD make) are used?

Homebrew and Macports already provide smartmontools 6.4. I'm not aware of any related complaints or patches from there.

comment:2 Changed 5 years ago by Alex Samorukov

  1. No ./configure parameters
  2. GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14)
  3. GNU Make 3.81
  4. Env is very, very default, no changes are done.

And if i am doing svn up -r r4066 all builds fine.

I will try to find why build from the brew works correctly. Probably some version magic.

comment:3 Changed 5 years ago by Alex Samorukov

It is strange, if i am downloading tar.gz file it builds just fine. Also tried make distclean && autoreconf && make - all is ok.

Version 0, edited 5 years ago by Alex Samorukov (next)

comment:4 Changed 5 years ago by Alex Samorukov

Sorry for taking your time. After reinstalling automake from brew it now build fine. So probably some local issue with automake package. Still no idea what it was, and how this could happens. I am closing this ticket.

comment:5 Changed 5 years ago by Alex Samorukov

Resolution: worksforme
Status: acceptedclosed

comment:6 Changed 5 years ago by Christian Franke

Milestone: Release 6.5


comment:7 in reply to:  description Changed 5 years ago by Christian Franke

This part of the error message suggests that was not regenerated after updating

/bin/sh: -c: line 0: `...ATTRIBUTELOG/ s,^,.\\"# ,' |  | sed "s|/usr/local/...

The syntax error at '| |' was introduced because MAN_CAPABILITIES is no longer set if new config.status is used.

Try ./configure --enable-maintainer-mode to add Makefile targets which rebuild configure and/or (and then config.status and Makefile) if needed.

Note: See TracTickets for help on using tickets.