bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64994] math.h fails to compile because it does not include config.


From: G. Branden Robinson
Subject: [bug #64994] math.h fails to compile because it does not include config.h
Date: Fri, 8 Dec 2023 13:39:15 -0500 (EST)

Follow-up Comment #1, bug#64994 (group groff):

Quoting attachment; it was tagged as "application/octet-stream", so it was a
little hard to work with.


    Copyright (C) 1999-2020, 2022 Free Software Foundation, Inc.

    Copying and distribution of this file, with or without
    modification, are permitted in any medium without royalty provided
    the copyright notice and this notice are preserved.

                           groff Bug Report
GROFF VERSION:

GNU groff version 1.23.0
Copyright (C) 2022 Free Software Foundation, Inc.
GNU groff comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of groff and its subprograms
under the terms of the GNU General Public License.
For more information about these matters, see the file
named COPYING.

called subprograms:

GNU grops (groff) version 1.23.0
GNU troff (groff) version 1.23.0


PLATFORM:
Darwin doinks-MacBook-Air.local 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct
29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64


CONFIGURATION REPORT:

----------------------------------------------------------------------
 installation directory prefix    : /usr/local
 C++ compiler and options         : g++ -g -O2 
 use libgroff's memory allocator  : no
 C compiler and options           : gcc -g -O2 
 Perl interpreter version         : 5.34.0
 X11 support                      : disabled
 'groff -l' uses print spooler    : lpr
 use URW fonts for PDF output     : no
 preconv can use uchardet library : yes
 can build groff.dvi, groff.pdf   : no
----------------------------------------------------------------------


INPUT FILES:

Only used files part of the standard groff distribution.


COMMAND LINE:

make


DESCRIPTION OF INCORRECT BEHAVIOUR:

math.h fails to compile because it does not include config.h.

In file included from
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:100:
./lib/math.h:58:3: error: "Please include config.h first."
 #error "Please include config.h first."
  ^
./lib/math.h:60:1: error: unknown type name '_GL_INLINE_HEADER_BEGIN'
_GL_INLINE_HEADER_BEGIN
^
./lib/math.h:1673:1: error: expected unqualified-id
_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
^
./lib/stdlib.h:413:5: note: expanded from macro '_GL_CXXALIAS_SYS'
    _GL_EXTERN_C int _gl_cxxalias_dummy
    ^
./lib/stdlib.h:285:30: note: expanded from macro '_GL_EXTERN_C'
# define _GL_EXTERN_C extern "C"
                             ^
In file included from src/devices/grodvi/dvi.cpp:19:
In file included from ./lib/assert.h:26:
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/assert.h:44:
In file included from ./lib/stdlib.h:36:
In file included from
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/stdlib.h:100:
./lib/math.h:3237:1: error: unknown type name '_GL_INLINE_HEADER_END'
_GL_INLINE_HEADER_END
^
In file included from src/devices/grodvi/dvi.cpp:19:
In file included from ./lib/assert.h:26:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/assert.h:75:1:
error: expected unqualified-id
__BEGIN_DECLS
^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:71:32:
note: expanded from macro '__BEGIN_DECLS'
#define __BEGIN_DECLS   extern "C" {
                               ^
src/devices/grodvi/dvi.cpp:304:5: error: use of undeclared identifier
'__assert_rtn'
    assert(a == 0);
    ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/assert.h:93:34:
note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__,
#e) : (void)0)
                                 ^
src/devices/grodvi/dvi.cpp:963:7: error: use of undeclared identifier
'__assert_rtn'
      assert(0);
      ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/assert.h:93:34:
note: expanded from macro 'assert'
    (__builtin_expect(!(e), 0) ? __assert_rtn(__func__, __FILE__, __LINE__,
#e) : (void)0)
                                 ^
7 errors generated.
make[1]: *** [src/devices/grodvi/dvi.o] Error 1
make: *** [all] Error 2


SUGGESTED FIX:

Have whichever program generates math.h add #include <config.h> in the
file.

--- lib/math.h  2023-12-07 13:19:09.000000000 -0700
+++ lib/mathold.h       2023-12-07 13:36:12.000000000 -0700
@@ -22,7 +22,6 @@
 #if !(defined __ANDROID__ && defined _LIBCPP_MATH_H && !defined INFINITY)
 
 #ifndef _GL_MATH_H
-#include <config.h>
 
 #if __GNUC__ >= 3
 #pragma GCC system_header


##### Editor settings
Local Variables:
fill-column: 72
mode: text
End:
vim: set filetype= textwidth=72:




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64994>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]