Created attachment 207643 [details] Fix groff build with libc++ 9.0.0 Because libc++ 9.0.0 now includes <math.h> from <stdlib.h>, groff fails to build with error similar to: n file included from src/libs/libgroff/assert.cpp:20: In file included from /usr/include/c++/v1/stdlib.h:100: ./lib/math.h:38:3: error: "Please include config.h first." #error "Please include config.h first." ^ ./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN' _GL_INLINE_HEADER_BEGIN ^ Here is a patch which fixes that in the least intrusive way. Another way would be to #include "config.h" at the top of every .cpp file, but that is more more churn.
approved, just commit
^Triage: Re-assign per comment 1
Comment on attachment 207643 [details] Fix groff build with libc++ 9.0.0 ^Triage: Track maintainer approval, using the attachment maintainer-approval flag (per comment 1)
A commit references this bug: Author: dim Date: Fri Sep 20 19:48:01 UTC 2019 New revision: 512436 URL: https://svnweb.freebsd.org/changeset/ports/512436 Log: Fix groff build with libc++ 9.0.0 Because libc++ 9.0.0 now includes <math.h> from <stdlib.h>, groff fails to build with an error similar to: In file included from src/libs/libgroff/assert.cpp:20: In file included from /usr/include/c++/v1/stdlib.h:100: ./lib/math.h:38:3: error: "Please include config.h first." #error "Please include config.h first." ^ ./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN' _GL_INLINE_HEADER_BEGIN ^ Fix this in the least intrusive way, by simply including config.h instead of emitting an error message. Approved by: bapt (maintainer) PR: 240701 MFH: 2019Q3 Changes: head/textproc/groff/files/patch-lib_math.in.h
A commit references this bug: Author: dim Date: Tue Oct 1 06:00:59 UTC 2019 New revision: 513456 URL: https://svnweb.freebsd.org/changeset/ports/513456 Log: MFH: r512436 Fix groff build with libc++ 9.0.0 Because libc++ 9.0.0 now includes <math.h> from <stdlib.h>, groff fails to build with an error similar to: In file included from src/libs/libgroff/assert.cpp:20: In file included from /usr/include/c++/v1/stdlib.h:100: ./lib/math.h:38:3: error: "Please include config.h first." #error "Please include config.h first." ^ ./lib/math.h:40:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN' _GL_INLINE_HEADER_BEGIN ^ Fix this in the least intrusive way, by simply including config.h instead of emitting an error message. Approved by: portmgr (joneum) PR: 240701 Changes: _U branches/2019Q3/ branches/2019Q3/textproc/groff/files/patch-lib_math.in.h