Skip to contentSkip to conversation

error.h missing on mingw (grub-core/kern/emu/misc.c fails to compile)

DISCUSSION Andrey Borzenkov 2 participants 4 messages Dec 26, 2013 – Dec 28, 2013

lore
Share & tools
lore
#0 lore raw

I'm not sure how to fix it. It is pulled in by build-grub-pep2elf and build-grub-pe2elf. Those are build time programs and so use BUILD_CPPFLAGS; adding CPPFLAGS_GNULIB is probably not appropriate. It compiles just fine with error.h commented out. May be something like

#if !defined(GRUB_BUILD) || defined(HAVE_ERROR_H)

#1 lore raw

В Чт, 26/12/2013 в 23:54 +0400, Andrey Borzenkov пишет:

Quoted 7 lines

I'm not sure how to fix it. It is pulled in by build-grub-pep2elf and build-grub-pe2elf. Those are build time programs and so use BUILD_CPPFLAGS; adding CPPFLAGS_GNULIB is probably not appropriate. It compiles just fine with error.h commented out. May be something like

#if !defined(GRUB_BUILD) || defined(HAVE_ERROR_H)

On the second glance - why is <error.h> needed at all? Nothing defined there is used in misc.c and on Linux it compiles just fine with error.h as well.

May be we could simply drop it?

#2 lore raw
Quoted 6 lines · Andrey Borzenkov

В Чт, 26/12/2013 в 23:54 +0400, Andrey Borzenkov пишет:

Quoted 5 lines

I'm not sure how to fix it. It is pulled in by build-grub-pep2elf and build-grub-pe2elf. Those are build time programs and so use BUILD_CPPFLAGS; adding CPPFLAGS_GNULIB is probably not appropriate. It compiles just fine with error.h commented out. May be something like

Quoted 9 lines
Quoted 2 lines

#if !defined(GRUB_BUILD) || defined(HAVE_ERROR_H)

On the second glance - why is <error.h> needed at all? Nothing defined there is used in misc.c and on Linux it compiles just fine with error.h as well.

May be we could simply drop it?

Yes. I was going to answer with this. Many of includes are inherited by copying of include parts.
error.h there can simply be removed

Quoted 6 lines

_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel

#3 lore raw

В Пт, 27/12/2013 в 20:34 +0100, Vladimir 'φ-coder/phcoder' Serbinenko пишет:

Quoted 14 lines · Andrey Borzenkov
Quoted 13 lines

В Чт, 26/12/2013 в 23:54 +0400, Andrey Borzenkov пишет:

Quoted 7 lines

I'm not sure how to fix it. It is pulled in by build-grub-pep2elf and build-grub-pe2elf. Those are build time programs and so use BUILD_CPPFLAGS; adding CPPFLAGS_GNULIB is probably not appropriate. It compiles just fine with error.h commented out. May be something like

#if !defined(GRUB_BUILD) || defined(HAVE_ERROR_H)

On the second glance - why is <error.h> needed at all? Nothing defined there is used in misc.c and on Linux it compiles just fine with error.h as well.

Quoted 5 lines
Quoted 2 lines

May be we could simply drop it?

Yes. I was going to answer with this. Many of includes are inherited by copying of include parts.
error.h there can simply be removed

done