Opened 5 years ago

Last modified 5 years ago

#59783 new defect

groff @1.22.4: build fails due to math.h name collision

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: jmroot (Joshua Root)
Port: groff

Description

  CXX      src/libs/libgroff/libgroff_a-device.o
In file included from src/libs/libgroff/assert.cpp:20:
In file included from /opt/local/libexec/llvm-9.0/bin/../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
^
./lib/math.h:1537:1: error: expected unqualified-id
_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
^
./lib/stdio.h:344:5: note: expanded from macro '_GL_CXXALIAS_SYS'
    _GL_EXTERN_C int _gl_cxxalias_dummy
    ^
./lib/stdio.h:234:30: note: expanded from macro '_GL_EXTERN_C'
# define _GL_EXTERN_C extern "C"
                             ^
In file included from src/libs/libgroff/assert.cpp:20:
In file included from /opt/local/libexec/llvm-9.0/bin/../include/c++/v1/stdlib.h:100:
./lib/math.h:2888:1: error: unknown type name '_GL_INLINE_HEADER_END'
_GL_INLINE_HEADER_END

but builds fine when I force the build compiler to clang-5.0:

 port -v installed groff
The following ports are currently installed:
  groff @1.22.4_2 (active) platform='darwin 10' archs='x86_64' date='2019-11-30T13:25:24-0800'

Attachments (1)

groff-SL-fail.log (155.4 KB) - added by kencu (Ken) 5 years ago.

Download all attachments as: .zip

Change History (9)

Changed 5 years ago by kencu (Ken)

Attachment: groff-SL-fail.log added

comment:1 Changed 5 years ago by kencu (Ken)

exactly the same error occurs on Mojave with clang-9.0 as well.

comment:2 Changed 5 years ago by kencu (Ken)

clang-8.0 works.

comment:3 Changed 5 years ago by kencu (Ken)

In 0cd324405d720d64707f9ecd83fa9bec937a925f/macports-ports (master):

groff: blacklist clang-9.0+

not presently building with these compilers
see: #59783

comment:4 Changed 5 years ago by kencu (Ken)

was going to add clang-devel, ergo the 9.0+, but in the end, did not.

I see JMR is working on this separately, hopefully will find the real fix.

comment:5 Changed 5 years ago by jmroot (Joshua Root)

It has a header called math.h in the search path (-I./lib). It can only be by pure luck that this hasn't caused problems with earlier compiler versions.

comment:6 Changed 5 years ago by jmroot (Joshua Root)

Port: groff added
Summary: groff-1.22.4: build fails on 10.6 (clang-9.0, libc++): #error "Please include config.h first."groff @1.22.4: build fails due to math.h name collision

comment:7 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

comment:8 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: jmroot added

@jmroot see comment above

Note: See TracTickets for help on using tickets.