[Bug 257676] sysutils/grub2-pcbsd garbage-gen.c fails build missing STD C lib headers

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 07 Aug 2021 17:32:01 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257676

            Bug ID: 257676
           Summary: sysutils/grub2-pcbsd garbage-gen.c fails build missing
                    STD C lib headers
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: kevlo_at_FreeBSD.org
          Reporter: alt2600_at_icloud.com
             Flags: maintainer-feedback?(kevlo_at_FreeBSD.org)
          Assignee: kevlo_at_FreeBSD.org

I'm trying to get this built and run into this error, it seems somehow the
basic include path for stdio.h and similar are not being passed to the make
target. I'm doing this from a live system. Not sure if garbage-gen.c is a
required library, or somehow being pulled in by presence of random library
available in my system. I'm exploring a little bit more to see if that is the
case to hunt it down.

Releng 12.2p9, ports tree main from last night and 15:00 UTC today. I'm
building with FUSE, but this happens with that option or not.


gcc -o garbage-gen  -DGRUB_FILE=\"util/garbage-gen.c\" -I. -I. -I. -I.
-I./include -I./include -I./grub-core/lib/libgcrypt-grub/src/  
util/garbage-gen.c
util/garbage-gen.c:23:19: error: stdio.h: No such file or directory
util/garbage-gen.c:24:20: error: stdlib.h: No such file or directory
util/garbage-gen.c:25:18: error: time.h: No such file or directory
util/garbage-gen.c:26:22: error: sys/time.h: No such file or directory
util/garbage-gen.c: In function 'main':
util/garbage-gen.c:36: error: storage size of 'tv' isn't known
util/garbage-gen.c:37: error: 'NULL' undeclared (first use in this function)
util/garbage-gen.c:62: error: 'stdout' undeclared (first use in this function)
gmake[3]: *** [Makefile:13648: garbage-gen] Error 1
gmake[3]: Leaving directory '/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02'
gmake[2]: *** [Makefile:11092: all-recursive] Error 1
gmake[2]: Leaving directory '/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02'
gmake[1]: *** [Makefile:3482: all] Error 2
gmake[1]: Leaving directory '/usr/ports/sysutils/grub2-pcbsd/work/grub-2.02'
*** Error code 1

### $WORKSRC/Makefile

lines 1916-1921

BUILD_CC = gcc
BUILD_CFLAGS = 
BUILD_CPPFLAGS =  $(CPPFLAGS_DEFAULT)
BUILD_EXEEXT = 
BUILD_FREETYPE = freetype-config
BUILD_LDFLAGS = 

lines 2738-2741

CPPFLAGS_DEFAULT = -DGRUB_FILE=\"$(subst $(srcdir)/,,$<)\" \
        -I$(builddir) -I$(srcdir) -I$(top_builddir) -I$(top_srcdir) \
        -I$(top_srcdir)/include -I$(top_builddir)/include \
        -I$(top_srcdir)/grub-core/lib/libgcrypt-grub/src/


lines 13647-13648

garbage-gen$(BUILD_EXEEXT): util/garbage-gen.c
        $(BUILD_CC) -o $_at_ $(BUILD_CFLAGS) $(BUILD_CPPFLAGS) $(BUILD_LDFLAGS) 
$^

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Sat Aug 07 2021 - 17:32:01 UTC

Original text of this message