libyal / libewf

Libewf is a library to access the Expert Witness Compression Format (EWF)
GNU Lesser General Public License v3.0
265 stars 76 forks source link

Solaris and errors with GNU specific arguments in ./synclibs.sh #133

Closed marksolaris closed 5 years ago

marksolaris commented 5 years ago

Provided to show the issue and cure for other Solaris users who built from the git master.

Whilst compiling on Solaris 11.3 x86, every syncing of a library had errors. The cause would be GNU/Linux exotic arguments.

grep: illegal option -- A
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
Synchronizing: libsmraw from https://github.com/libyal/libsmraw.git tag 20181227
usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]
grep: illegal option -- A
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
Synchronizing: libuna from https://github.com/libyal/libuna.git tag 20190102
usage: tail [+/-[n][lbc][f]] [file]
       tail [+/-[n][l][r|f]] [file]
grep: illegal option -- A
Usage: grep [-c|-l|-q] -bhinsvw pattern file . . .
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i
sed: illegal option -- i

The fix is to install GNU binutils from the Solaris repo

sudo pkg install developer/gnu-binutils
perl -pe 's%sed -i%/usr/gnu/bin/sed -i%' -i synclibs.sh
perl -pe 's%grep -A%/usr/gnu/bin/grep -A%' -i synclibs.sh
perl -pe 's%tail -n%/usr/gnu/bin/tail -n%' -i synclibs.sh
./synclibs
./autogen.sh
joachimmetz commented 5 years ago

Provided to show the issue and cure for other Solaris users who built from the git master.

users should not build from git master, this is only needed when you are developing libewf. As explained here: https://github.com/libyal/libewf/wiki/Building#read-first. As a user use the "source distribution package" instead.