Bug 1304102 - Rinterface.h redefines uintptr_t
Rinterface.h redefines uintptr_t
Product: Fedora
Classification: Fedora
Component: R (Show other bugs)
i686 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Tom "spot" Callaway
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-02 16:50 EST by Orion Poplawski
Modified: 2017-08-08 08:44 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2017-08-08 08:44:12 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Orion Poplawski 2016-02-02 16:50:27 EST
Description of problem:

Trying to compile vtk 7 with gcc 6 I get:

In file included from /builddir/build/BUILD/VTK-7.0.0/Filters/StatisticsGnuR/vtkRInterface.cxx:47:0:
/usr/lib/R/include/Rinterface.h:98:24: error: conflicting declaration 'typedef long unsigned int uintptr_t'
  typedef unsigned long uintptr_t;
In file included from /usr/lib/gcc/i686-redhat-linux/6.0.0/include/stdint.h:9:0,
                 from /usr/include/c++/6.0.0/cstdint:41,
                 from /usr/include/c++/6.0.0/bits/char_traits.h:420,
                 from /usr/include/c++/6.0.0/ios:40,
                 from /usr/include/c++/6.0.0/ostream:38,
                 from /usr/include/c++/6.0.0/iostream:39,
                 from /builddir/build/BUILD/VTK-7.0.0/Common/Core/vtkIOStream.h:28,
                 from /builddir/build/BUILD/VTK-7.0.0/Common/Core/vtkSystemIncludes.h:36,
                 from /builddir/build/BUILD/VTK-7.0.0/Common/Core/vtkIndent.h:25,
                 from /builddir/build/BUILD/VTK-7.0.0/Common/Core/vtkObjectBase.h:44,
                 from /builddir/build/BUILD/VTK-7.0.0/Common/Core/vtkObject.h:42,
                 from /builddir/build/BUILD/VTK-7.0.0/Filters/StatisticsGnuR/vtkRInterface.h:43,
                 from /builddir/build/BUILD/VTK-7.0.0/Filters/StatisticsGnuR/vtkRInterface.cxx:21:
/usr/include/stdint.h:128:23: note: previous declaration as 'typedef unsigned int uintptr_t'
 typedef unsigned int  uintptr_t;

Version-Release number of selected component (if applicable):

Rinterface.h does:

#if !defined(HAVE_UINTPTR_T) && !defined(uintptr_t)
 typedef unsigned long uintptr_t;

but neither of those guards appear to be sufficient.
Comment 1 Tom "spot" Callaway 2016-02-03 10:42:51 EST
Just a thought, but can you add -DHAVE_UINTPTR_T to the VTK7 optflags? If that works, then perhaps VTK7 needs to do a proper configure check for uintptr_t.

I feel like R is properly guarded here...
Comment 2 Orion Poplawski 2016-02-03 11:06:51 EST
I thought about that as a workaround, but the whole "HAVE_UINTPTR_T" thing is an autotools construct and vtk uses cmake.  Some downstream consumer of R shouldn't have to know how to tweak its headers.  I would argue that R should do one of: not place the definition in the header if not needed, include its own (properly namespaced) config header that sets HAVE_UINTPTR_T, or define HAVE_UINTPTR_T appropriately in Rinterface.h.
Comment 3 Tom "spot" Callaway 2016-02-03 11:26:09 EST
gcc is defining uintptr_t in stdint... so I'm not sure how it's getting undefined when Rinterface.h is parsed. I feel like #if !defined(uintptr_t) is perfectly valid... I just suggested HAVE_UINTPTR_T as a possible workaround.

In fact, nothing seems to have changed in /usr/include/stdint.h with regards to how uintptr_t is defined (between 5.3.3 and 6.0.0). Perhaps this is a VTK7 specific change?

Based on mailing list history, I'm pretty sure R will be reluctant to drop this typedef, as they're trying to cover cases where uintptr_t is not defined. If we can figure out an additional guard that resolves the VTK7 case, I could propose that.
Comment 4 Orion Poplawski 2016-02-03 16:13:10 EST
It's not getting undefined.  #ifdef tests for the existence of macros, but  uintptr_t is not a macro, it's a typedef.  If the typedef were equivalent, the compiler should not complain, but it appears that R is not defining it consistent with stdint.
Comment 5 Jan Kurik 2016-02-24 10:39:15 EST
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
Comment 6 Fedora End Of Life 2017-07-25 15:53:08 EDT
This message is a reminder that Fedora 24 is nearing its end of life.
Approximately 2 (two) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 24. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '24'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 24 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Comment 7 Fedora End Of Life 2017-08-08 08:44:12 EDT
Fedora 24 changed to end-of-life (EOL) status on 2017-08-08. Fedora 24 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.