bugGNU GRUB - Bugs: bug #28336, Build failure on NetBSD due to...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #28336: Build failure on NetBSD due to conflict with macro UNUSED

Submitted by:  Grégoire Sutre <gsutre>
Submitted on:  Fri 18 Dec 2009 01:54:17 PM UTC  
 
Category:  Compilation Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release: 
Release:  Bazaar - trunk Reproducibility:  Every Time
Planned Release:  None

Sun 20 Dec 2009 12:54:55 PM UTC, comment #2:

Thanks for taking care of this.  I see that you fixed the problem in the experimental branch.  I'm currently tracking trunk as I thought it would be the best choice to get grub working on NetBSD/pkgsrc.  Should I track experimental instead?

Thanks for your help,

Grégoire

Grégoire Sutre <gsutre>
Project Member
Sat 19 Dec 2009 08:32:17 PM UTC, comment #1:

All new code uses _attribute_ ((unused)). I changed old code to do the same and removed UNUSED. Thanks for reporting

Vladimir Serbinenko <phcoder>
Project Administrator
Fri 18 Dec 2009 01:54:17 PM UTC, original submission:

Hi,

On NetBSD, the header file <sys/disklabel.h> contains the word UNUSED, and this leads to a build error as a macro named UNUSED is defined in include/grub/types.h.

/usr/pkg/gcc44/bin/gcc -Iutil -I./util -I. -I./include -I./gnulib -I./include -Wall -W -DGRUB_LIBDIR=\"/usr/local/lib/`echo grub/i386-pc | sed 's,x,x,'`\" -DLOCALEDIR=\"\"
-DGRUB_MACHINE_PCBIOS=1 -DGRUB_UTIL=1  -MD -c -o grub_mkdevicemap-util_deviceiter.o util/deviceiter.c
In file included from util/deviceiter.c:114:
/usr/include/sys/disklabel.h:357: error: expected ',' or '}' before '(' token
[...]
gmake: *** [grub_mkdevicemap-util_deviceiter.o] Error 1

Attached is the full log of (./autogen.sh && ./configure CC=/usr/pkg/gcc44/bin/gcc LDFLAGS=-lintl && gmake).

The problem is fixed by moving the inclusion of GRUB header files after <sys/disklabel.h> in util/deviceiter.c, e.g. as in the attached patch.

Thanks,

Grégoire

Grégoire Sutre <gsutre>
Project Member

 

Attached Files
file #19290:  patch-ad added by gsutre (598B - application/octet-stream)
file #19289:  log added by gsutre (58KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by gsutre (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-12-19 phcoder StatusNone => Fixed
        Open/ClosedOpen => Closed
    2009-12-18 gsutre Attached File- => Added log, #19289
        Attached File- => Added patch-ad, #19290

    Back to the top


    Powered by Savane 3.4