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

2023-12-08 Thread G. Branden Robinson
Follow-up Comment #3, bug#64994 (group groff):

Whoops--I failed to read the year associated with bug #61315.  This cannot be
a duplicate of that bug because its fix also shipped with _groff_ 1.23.0.


___

Reply to this item at:

  

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




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

2023-12-08 Thread G. Branden Robinson
Update of bug#64994 (group groff):

Severity:  3 - Normal => 4 - Important  
  Item Group:None => Build/Installation 
  Status:None => In Progress
 Assigned to:None => gbranden   

___

Follow-up Comment #2:

lib/math.h.in comes from gnulib so it's not a _groff_ file proper.

I assume what's happening is that we're failing to get config.h #included in a
_groff_ .h or .cpp file.

This might already have been fixed in Git; see bug #61315 and bug #64910.  You
might try cherry-picking the commits corresponding to those to see if either
fixes the problem.  We had a similar issue in bug #60035, but shipped the fix
for it in _groff_ 1.23.0.

I see some further inconsistencies, so I have some more improvements pending. 
You can expect them in my next push (later today, I hope).


___

Reply to this item at:

  

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




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

2023-12-08 Thread G. Branden Robinson
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  in the
file.

--- lib/math.h  2023-12-07 13:19:09.0 -0700
+++ lib/mathold.h   2023-12-07 13:36:12.0 -0700
@@ -22,7 +22,6 @@
 #if !(defined __ANDROID__ && defined _LIBCPP_MATH_H && !defined INFINITY)
 
 #ifndef _GL_MATH_H
-#include 
 
 #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:

  

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




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

2023-12-07 Thread anonymous
URL:
  

 Summary: math.h fails to compile because it does not include
config.h
   Group: GNU roff
   Submitter: None
   Submitted: Thu 07 Dec 2023 08:45:25 PM UTC
Category: Core
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None


___

Follow-up Comments:


---
Date: Thu 07 Dec 2023 08:45:25 PM UTC By: Anonymous
math.h fails to compile because it does not include config.h.
more information in the included BUG-REPORT file.






___
File Attachments:


---
Date: Thu 07 Dec 2023 08:45:25 PM UTC  Name: BUG-REPORT  Size: 4KiB   By: None



___

Reply to this item at:

  

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