Bug 88519

Summary: sha1.c:210:22: error: 'grcy_md_hd_t' undeclared (first use in this function)
Product: Mesa Reporter: Vinson Lee <vlee>
Component: Mesa coreAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: blocker    
Priority: medium CC: cworth
Version: gitKeywords: regression
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Vinson Lee 2015-01-16 23:52:55 UTC
mesa: a9f657ded1de1a43b16e942d8910239df4c92999 (master 10.5.0-devel)


checking for SHA1Init... no
checking for CC_SHA1_Init... no
checking for wincrypt.h... no
checking for SHA1Init in -lmd... no
checking for LIBSHA1... no
checking for nettle_sha1_init in -lnettle... no
checking for gcry_md_open in -lgcrypt... yes
checking for SHA1_Init in -lcrypto... yes
checking for OPENSSL... yes
checking for SHA1 implementation... libgcrypt
checking for LIBDRM... yes


  CC     libmesautil_la-sha1.lo
sha1.c: In function '_mesa_sha1_final':
sha1.c:210:22: error: 'grcy_md_hd_t' undeclared (first use in this function)
sha1.c:210:22: note: each undeclared identifier is reported only once for each function it appears in
sha1.c:210:36: error: expected ',' or ';' before 'ctx'
Comment 1 Carl Worth 2015-01-17 00:17:56 UTC
Hi Vinson,

Thanks for the bug report.

What version of libgcrypt do you have installed on your system? This code compiles for me:

        Shader cache:    yes
        With SHA1 from:  libgcrypt

  CC       libmesautil_la-sha1.lo

Here's what the package manager says about libgcrypt on my Debian system:

$ apt-cache policy libgcrypt20-dev
libgcrypt20-dev:
  Installed: 1.6.2-4+b1

If you've got some incompatible version, perhaps there's an easy tweak we can make to the configure check so that it doesn't attempt to build with that version.

-Carl
Comment 2 Vinson Lee 2015-01-17 00:39:24 UTC
commit 9075823c17280d36ca2ba2e98ec93fb097801593
Author: Vinson Lee <vlee@freedesktop.org>
Date:   Fri Jan 16 16:21:41 2015 -0800

    sha1: Fix gcry_md_hd_t typo.
    
    Fix build error.
    
      CC       libmesautil_la-sha1.lo
    sha1.c: In function '_mesa_sha1_final':
    sha1.c:210:22: error: 'grcy_md_hd_t' undeclared (first use in this function)
        gcry_md_hd_t h = (grcy_md_hd_t) ctx;
                          ^
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88519
    Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Comment 3 Carl Worth 2015-01-17 01:23:52 UTC
Thanks for the fix, Vinson.

I'm really baffled how I thought I saw this compile successfully. (I even found the error sitting in my terminal backlog.)

Anyway, I'm glad it's fixed now.

-Carl
Comment 4 Matt Turner 2015-01-17 02:25:47 UTC
Just a note: when you change the assignee make sure mesa-dev@ stays as the QA contact or in the Cc list. Otherwise we stop seeing updates to the bug.
Comment 5 Carl Worth 2015-01-19 19:19:12 UTC
(In reply to Matt Turner from comment #4)
> Just a note: when you change the assignee make sure mesa-dev@ stays as the
> QA contact or in the Cc list. Otherwise we stop seeing updates to the bug.

Thanks for the reminder.

To make this less error prone, I've just run through all Mesa bugzilla components and wherever the default assignee is a list, I copied the same list address to the default QA contact.

-Carl

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.