hreinecke / sg3_utils

Deprecated git-svn mirror for sg3_utils
http://sg.danny.cz/sg/sg3_utils.html
Other
155 stars 91 forks source link

Build failure on musl since version 1.46 #74

Closed ffontaine closed 1 year ago

ffontaine commented 3 years ago

Builds fails on musl since version 1.46 and https://github.com/hreinecke/sg3_utils/commit/d05a8bde428bfbfe74b0f19be27fe1b76dc3c401 because musl doesn't define srand48_r and mrand48_r:

sg_dd.c: In function 'main':
sg_dd.c:2127:9: warning: implicit declaration of function 'srand48_r'; did you mean 'srand48'? [-Wimplicit-function-declaration]
 2127 |         srand48_r(seed, &drand);
      |         ^~~~~~~~~
      |         srand48
/tmp/instance-0/output-1/host/bin/i586-linux-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o sgm_dd.o sgm_dd.c
/tmp/instance-0/output-1/host/bin/i586-linux-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -W  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -c -o sgp_dd.o sgp_dd.c
sg_dd.c:2404:25: warning: implicit declaration of function 'mrand48_r'; did you mean 'mrand48'? [-Wimplicit-function-declaration]
 2404 |                         mrand48_r(&drand, &rn);
      |                         ^~~~~~~~~
      |                         mrand48
sg_dd.c: At top level:
sg_dd.c:179:28: error: storage size of 'drand' isn't known
  179 | static struct drand48_data drand;/* opaque, used by srand48_r and mrand48_r */
      |                            ^~~~~

Full build log: http://autobuild.buildroot.org/results/a72/a72d5979ba4184c38e7caccf67a3fa37983ea0af/build-end.log

doug-gilbert commented 3 years ago

I believe that one has been fixed. See: https://github.com/doug-gilbert/sg3_utils Please respond if that doesn't fix your problem.

ffontaine commented 3 years ago

Indeed, bumping to https://github.com/doug-gilbert/sg3_utils/commit/6aa4d33cce95c534665f3f8e057f13a69ab10835 fixes the build failure on musl. However, there is more than one commit to backport and those don't apply cleanly on version 1.46. Do you plan to make a new release any time soon?

doug-gilbert commented 3 years ago

sg3_utils release/version 1.47 is now available at https://github.com/doug-gilbert/sg3_utils . Hopefully this repository gets updated soon.

hreinecke commented 1 year ago

Fixed with git-svn id 913