Bug 241168 - sysutils/grub2-bhyve fails to build with error: 'gets' undeclared here on CURRENT
Summary: sysutils/grub2-bhyve fails to build with error: 'gets' undeclared here on CUR...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: Peter Grehan
URL: https://github.com/grehan-freebsd/gru...
Keywords: needs-patch
Depends on:
Blocks: 222796
  Show dependency treegraph
 
Reported: 2019-10-10 00:35 UTC by Robert James Hernandez
Modified: 2019-10-13 23:07 UTC (History)
2 users (show)

See Also:


Attachments
poudriere pkg build log (65.15 KB, text/plain)
2019-10-10 00:35 UTC, Robert James Hernandez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert James Hernandez 2019-10-10 00:35:53 UTC
Created attachment 208217 [details]
poudriere pkg build log

I get the following error during my poudriere build against CURRENT:

mv wchar.h-t wchar.h
rm -f wctype.h-t wctype.h && \
{ echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
  sed -e 's/@''HAVE_WCTYPE_H''@/1/g' \
      -e 's|@''INCLUDE_NEXT''@|include_next|g' \
      -e 's|@''PRAGMA_SYSTEM_HEADER''@|#pragma GCC system_header|g' \
      -e 's|@''NEXT_WCTYPE_H''@|<wctype.h>|g' \
      -e 's/@''HAVE_ISWBLANK''@/1/g' \
      -e 's/@''HAVE_ISWCNTRL''@/1/g' \
      -e 's/@''HAVE_WINT_T''@/1/g' \
      -e 's/@''REPLACE_ISWBLANK''@/0/g' \
      -e 's/@''REPLACE_ISWCNTRL''@/0/g' \
      -e '/definitions of _GL_FUNCDECL_RPL/r c++defs.h' \
      -e '/definition of _GL_WARN_ON_USE/r warn-on-use.h' \
      < ./wctype.in.h; \
} > wctype.h-t && \
mv wctype.h-t wctype.h
gmake  all-recursive
gmake[4]: Entering directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40/grub-core/gnulib'
gmake[5]: Entering directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40/grub-core/gnulib'
gcc9 -DHAVE_CONFIG_H -I. -I../..  -I../../intl    -MT argp-ba.o -MD -MP -MF .deps/argp-ba.Tpo -c -o argp-ba.o argp-ba.c
mv -f .deps/argp-ba.Tpo .deps/argp-ba.Po
gcc9 -DHAVE_CONFIG_H -I. -I../..  -I../../intl    -MT argp-eexst.o -MD -MP -MF .deps/argp-eexst.Tpo -c -o argp-eexst.o argp-eexst.c
In file included from argp.h:22,
                 from argp-eexst.c:25:
./stdio.h:456:1: error: 'gets' undeclared here (not in a function); did you mean 'getw'?
  456 | _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
      | ^~~~~~~~~~~~~~~
gmake[5]: *** [Makefile:1030: argp-eexst.o] Error 1
gmake[5]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40/grub-core/gnulib'
gmake[4]: *** [Makefile:1050: all-recursive] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40/grub-core/gnulib'
gmake[3]: *** [Makefile:915: all] Error 2
gmake[3]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40/grub-core/gnulib'
gmake[2]: *** [Makefile:20160: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40'
gmake[1]: *** [Makefile:15992: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/grub2-bhyve/work/grub2-bhyve-0.40'
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/grub2-bhyve
=>> Cleaning up wrkdir
===>  Cleaning for grub2-bhyve-0.40_7
build of sysutils/grub2-bhyve | grub2-bhyve-0.40_7 ended at Mon Oct  7 04:41:46 UTC 2019
build time: 00:00:57
!!! build failure encountered !!!


Ive attached the entire per-pkg build log for grub2-bhyve. I know theres the error about the jail being too new but its only slightly due to the pace of CURRENT vs AWS ami Im using.

Another thing I noticed is that FreeBSD CURRENT doesnt have grub2-bhyve in the pkg.freebsd.org mirror (as of: 11/09/19): http://pkg.freebsd.org/FreeBSD:13:amd64/latest/All/ (I would suspect its failing it the build there as well?)

If you need any more info or need anything else please let me know!

~Rob
Comment 1 Tobias Kortkamp freebsd_committer 2019-10-10 07:35:09 UTC
> If you need any more info or need anything else please let me know!

grub2-bhyve has no maintainer.  This bug needs a patch.
Comment 2 Walter Schwarzenfeld freebsd_triage 2019-10-10 12:49:56 UTC
Could not find "gets" in  argp-eexst.c. If I am right, I guess it is the warning itself causes this error.

455 #undef gets
    456 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");

and we only need to comment it out.
Comment 3 Walter Schwarzenfeld freebsd_triage 2019-10-10 12:53:29 UTC
Forgot:
in the file grub-core/gnulib/stdio.h.
Comment 4 Robert James Hernandez 2019-10-13 20:21:11 UTC
(In reply to Walter Schwarzenfeld from comment #3)

Thanks Ill try that out and report back.

It looks like this issue has also been raised on the projects github page as well: https://github.com/grehan-freebsd/grub2-bhyve/issues/10
Comment 5 Ben Woods freebsd_committer 2019-10-13 23:07:10 UTC
Hi Peter,
Since you said you would look into this, I’ve set you as the bug assignee. Feel free to change it back if you are no longer pursuing a fix for this.
Thanks,
Ben