[MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
---------------------------------+------------------------
 Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
     Type:  defect               |     Status:  new
 Priority:  Normal               |  Milestone:
Component:  ports                |    Version:
 Keywords:                       |       Port:  clang-4.0
---------------------------------+------------------------
 In an attempt to fix #51046, I tried to build [https://github.com/macports
 /macports-ports/tree/master/graphics/vigra VIGRA] with a compiler from
 MacPorts.[[BR]]
 {{{macports-clang-4.0}}} and {{{macports-clang-5.0}}} failed but
 {{{macports-gcc-6}}} succeeded.[[BR]]
 Below is the smallest test case I could get it down to.[[BR]]
 {{{/usr/bin/clang++}}} and {{{g++-mp-6}}} compile it without
 complaint.[[BR]]
 {{{clang++-mp-4.0}}} and {{{clang++-mp-5.0}}} fail with the error:
 {{{
 test.cxx:35:5: error: no matching function for call to
 'gaussianDivergenceMultiArray'
     gaussianDivergenceMultiArray(array, res);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 test.cxx:40:1: note: in instantiation of function template specialization
 'pythonGaussianDivergence<double, 2>' requested here
 pythonGaussianDivergence<double,2>(NumpyArray<2, TinyVector<double, 2> >
 array,
 ^
 test.cxx:13:1: note: candidate template ignored: could not match
 'MultiArrayView' against 'NumpyArray'
 gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N> > const &
 vectorField,
 ^
 1 error generated.
 }}}
 Since the Apple supplied {{{clang++}}} works, I am not sure whether this
 Trac or the [http://lists.llvm.org/mailman/listinfo/cfe-dev clang mailing
 list] is the more appropriate forum for discussion.[[BR]]
 Truth be told, I am no expert in template programming, so it is possible
 that the code '''should''' cause an error, in which case, it is VIGRA's
 problem.[[BR]]
 Test case:
 {{{
 template <unsigned N, class T>
 class MultiArrayView
 {
 };

 template <class T, int SIZE>
 class TinyVector
 {
 };

 template <unsigned N, class T1, class T2>
 inline void
 gaussianDivergenceMultiArray(MultiArrayView<N, TinyVector<T1, N> > const &
 vectorField,
                              MultiArrayView<N, T2> divergence)
 {
 }

 template<unsigned N, class T>
 struct NumpyArrayTraits
 {
     typedef T value_type;
 };

 template <unsigned N, class T>
 class NumpyArray
 : public MultiArrayView<N, typename NumpyArrayTraits<N, T>::value_type>
 {
 };

 template <class PixelType, unsigned N>
 void
 pythonGaussianDivergence(NumpyArray<N, TinyVector<PixelType, N> > array,
                          NumpyArray<N, double > res)
 {
     gaussianDivergenceMultiArray(array, res);
 }

 template
 void
 pythonGaussianDivergence<double,2>(NumpyArray<2, TinyVector<double, 2> >
 array,
                                    NumpyArray<2, double > res);
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54548>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
----------------------------------+------------------------
  Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:
      Port:  clang-4.0            |
----------------------------------+------------------------

Comment (by jeremyhu):

 What is reported by `/usr/bin/clang --version`?

 Please file a bug report at https://bugs.llvm.org and provide a reference
 to it from here.

--
Ticket URL: <https://trac.macports.org/ticket/54548#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
In reply to this post by MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
----------------------------------+------------------------
  Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:
      Port:  clang-4.0            |
----------------------------------+------------------------

Comment (by MarcusCalhoun-Lopez):

 There is now an upstream bug report
 [https://bugs.llvm.org/show_bug.cgi?id=33995 #33995].[[BR]]
 {{{/usr/bin/clang --version}}} gives
 {{{
 Apple LLVM version 8.1.0 (clang-802.0.42)
 Target: x86_64-apple-darwin16.7.0
 Thread model: posix
 InstalledDir:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54548#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
In reply to this post by MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
----------------------------------+------------------------
  Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:
      Port:  clang-4.0            |
----------------------------------+------------------------

Comment (by MarcusCalhoun-Lopez):

 According to  [https://bugs.llvm.org/show_bug.cgi?id=33995 #33995], Clang
 should indeed reject the code.[[BR]]
 I posted a bug report on the [https://mailhost.informatik.uni-
 hamburg.de/pipermail/vigra/2017-July/001363.html Vigra mailing list].

--
Ticket URL: <https://trac.macports.org/ticket/54548#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
In reply to this post by MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
----------------------------------+------------------------
  Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:
      Port:  clang-4.0            |
----------------------------------+------------------------

Comment (by MarcusCalhoun-Lopez):

 Upstream seems to already have
 [https://github.com/ukoethe/vigra/commit/b2ff44fbffcfa3f9e2862d890f43ad7cf588f565
 committed a fix].

--
Ticket URL: <https://trac.macports.org/ticket/54548#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [MacPorts] #54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6 succeed

MacPorts
In reply to this post by MacPorts
#54548: clang++-mp-4.0 and clang++-mp-5.0 fail where /usr/bin/clang++ and g++-mp-6
succeed
----------------------------------+------------------------
  Reporter:  MarcusCalhoun-Lopez  |      Owner:  jeremyhu@…
      Type:  defect               |     Status:  closed
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:  fixed                |   Keywords:
      Port:  clang-4.0            |
----------------------------------+------------------------
Changes (by MarcusCalhoun-Lopez):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"fa032984a531c5e787b026d5db358e1dea568505/macports-ports"
 fa032984a531c5e787b026d5db358e1dea568505/macports-ports]:
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="fa032984a531c5e787b026d5db358e1dea568505"
 vigra: patch template instantiation

 Fixes https://trac.macports.org/ticket/54548
 No revbump since port either builds correctly or not at all
 }}}

--
Ticket URL: <https://trac.macports.org/ticket/54548#comment:5>
MacPorts <https://www.macports.org/>
Ports system for macOS
Loading...