Bug 222056

Summary: print/qpdf fails to build with gcc6
Product: Ports & Packages Reporter: Justin Hibbits <jhibbits>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: d.y.kazarov, yuri
Priority: --- Flags: bugzilla: maintainer-feedback? (d.y.kazarov)
Version: Latest   
Hardware: Any   
OS: Any   

Description Justin Hibbits freebsd_committer freebsd_triage 2017-09-04 21:07:42 UTC
When building with gcc6, qpdf fails with the following error:

/bin/sh ./libtool --quiet --mode=compile g++6 -O2 -pipe -Wl,-rpath=/usr/local/lib/gcc6 -fno-strict-aliasing  -Wl,-rpath=/usr/local/lib/gcc6 -Wold-style-cast -Wall -MD -MF libqpdf/build/QUtil.tdep -MP -Iinclude -Ilibqpdf -I/usr/local/include -c libqpdf/QUtil.cc -o libqpdf/build/QUtil.o; sed -e 's/\.o:/.lo:/' < libqpdf/build/QUtil.tdep > libqpdf/build/QUtil.dep
libqpdf/QUtil.cc: In function 'void QUtil::setLineBuf(FILE*)':
libqpdf/QUtil.cc:233:45: error: invalid cast from type 'std::nullptr_t' to type 'char*'
     setvbuf(f, reinterpret_cast<char *>(NULL), _IOLBF, 0);
                                             ^


It builds fine with lang/gcc5
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-29 17:13:36 UTC
Confirmed for 7.1.0 and USE_GCC=6.
However, it builds fine with USE_GCC=5.

Is this an important problem given that clang is a default compiler?
Comment 2 Justin Hibbits freebsd_committer freebsd_triage 2018-01-29 18:01:35 UTC
Clang is default for amd64/i386 and arm/arm64, but not for most tier2 platforms, which I run powerpc.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-29 18:06:45 UTC
This is a general C++ error on both gcc6 and latest clang on 12-CURRENT: https://github.com/qpdf/qpdf/issues/177

It is not a port-specific problem.
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2018-01-29 18:19:55 UTC
I'm going to label this report as duplicate of bug#225226 because the pending update to qpdf-7.1.0 there will resolve this problem through the temporary port patch.

*** This bug has been marked as a duplicate of bug 225226 ***