Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 828897

Summary: sys-apps/sg3_utils-1.47 - sg_dd.c: error: unknown type name uint
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: base-system
Priority: Normal Keywords: PATCH, PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/28259
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
emerge-history.txt
environment
etc.portage.tar.bz2
logs.tar.bz2
sys-apps:sg3_utils-1.47:20211211-013500.log
temp.tar.bz2
sg_dd.c patch

Description Toralf Förster gentoo-dev 2021-12-11 10:04:57 UTC
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Wall -W  -pipe -march=native -fno-diagnostics-color -O2 -c -o sg_zone.o sg_zone.c
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Wall -W  -pipe -march=native -fno-diagnostics-color -O2 -c -o sg_copy_results.o sg_copy_results.c
x86_64-gentoo-linux-musl-gcc -DHAVE_CONFIG_H -I. -I..  -iquote ../include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64   -Wall -W  -pipe -march=native -fno-diagnostics-color -O2 -c -o sg_dd.o sg_dd.c
sg_dd.c: In function 'main':
sg_dd.c:2402:17: error: unknown type name 'uint'; did you mean 'int'?
 2402 |                 uint off;
      |                 ^~~~
      |                 int
make[2]: *** [Makefile:1176: sg_dd.o] Error 1

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl_hardened-j4-20211210-222208

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

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.2.1 *
Python 3.9.9
Available Ruby profiles:
  (none found)
php cli:

  HEAD of ::gentoo
commit faaa93bf9b95c4ef4c9f0aacca47da0575327bea
Merge: b8589c9f9a9 fd083e51091
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Sat Dec 11 00:36:33 2021 +0000

    Merge updates from master

emerge -qpvO sys-apps/sg3_utils
[ebuild  N    ] sys-apps/sg3_utils-1.47  USE="-static-libs"
Comment 1 Toralf Förster gentoo-dev 2021-12-11 10:04:58 UTC
Created attachment 758413 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-11 10:04:59 UTC
Created attachment 758414 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2021-12-11 10:05:00 UTC
Created attachment 758415 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2021-12-11 10:05:01 UTC
Created attachment 758416 [details]
etc.portage.tar.bz2
Comment 5 Toralf Förster gentoo-dev 2021-12-11 10:05:02 UTC
Created attachment 758417 [details]
logs.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-11 10:05:04 UTC
Created attachment 758418 [details]
sys-apps:sg3_utils-1.47:20211211-013500.log
Comment 7 Toralf Förster gentoo-dev 2021-12-11 10:05:05 UTC
Created attachment 758419 [details]
temp.tar.bz2
Comment 8 ayuayuayu 2022-06-19 05:52:07 UTC
Created attachment 786104 [details, diff]
sg_dd.c patch

https://github.com/doug-gilbert/sg3_utils/commit/9e6d513fe192e53778b6dd98954e43b8e6f0c3a6
fix looks to be slated for the next release (1.48).
in the meantime, users can cherry-pick from the upstream commit (as in attached patch).
Comment 9 Larry the Git Cow gentoo-dev 2022-11-18 02:20:25 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1e9afb52621981f5e77546348f99d244ddcdb22

commit a1e9afb52621981f5e77546348f99d244ddcdb22
Author:     Ian Jordan <immoloism@gmail.com>
AuthorDate: 2022-11-13 20:45:53 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-11-18 02:18:16 +0000

    sys-apps/sg3_utils: musl uint fix
    
    Upstream patch for cherry pick - https://github.com/doug-gilbert/sg3_utils/commit/9e6d513fe192e53778b6dd98954e43b8e6f0c3a6.patch
    
    This patch allows sg3_utils to work under Musl by replacing uint
    with uint32_t and has been tested on amd64 and PPC.
    
    Upstream bug: https://github.com/doug-gilbert/sg3_utils/pull/7
    Closes: https://bugs.gentoo.org/828897
    Thanks-to: ayuayuayu
    Signed-off-by: Ian Jordan <immoloism@gmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/28259
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-apps/sg3_utils/files/sg3_utils-1.47-musl.patch | 32 +++++++++++++++++
 sys-apps/sg3_utils/sg3_utils-1.47-r1.ebuild        | 42 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)