[MacPorts] #56260: gtkglext 1.2.0 build failure

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

[MacPorts] #56260: gtkglext 1.2.0 build failure

MacPorts
#56260: gtkglext  1.2.0  build failure
-------------------------+----------------------
 Reporter:  jbuencuerpo  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.4.2
 Keywords:               |       Port:  gtkglext
-------------------------+----------------------
 I have tried to build gtkglext +quartz without success.
 I attach the main.log file. I have encountered this when trying to build
 gwyddion in an isolated installation of macports. (/opt/gwyddion)

 The error is in gdkglshapes I think. By accesing the work path of the
 build and running make I obtain:

 gdkglshapes.c:552:12: error: redefinition of 'index' as different kind of
 symbol
 static int index[20][3] =

 My os and xcode version:
 xcode version 9.2
 macOS 10.12.6

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

Re: [MacPorts] #56260: gtkglext 1.2.0 build failure

MacPorts
#56260: gtkglext  1.2.0  build failure
--------------------------+--------------------
  Reporter:  jbuencuerpo  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.4.2
Resolution:               |   Keywords:
      Port:  gtkglext     |
--------------------------+--------------------
Changes (by jbuencuerpo):

 * Attachment "main.log" added.

 main.log

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

Re: [MacPorts] #56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol (was: gtkglext 1.2.0 build failure)

MacPorts
In reply to this post by MacPorts
#56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol
--------------------------+----------------------
  Reporter:  jbuencuerpo  |      Owner:  jd@…
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.4.2
Resolution:               |   Keywords:
      Port:  gtkglext     |
--------------------------+----------------------
Changes (by ryandesign):

 * owner:  (none) => jd@…
 * status:  new => assigned
 * cc: jd@… (removed)


Old description:

> I have tried to build gtkglext +quartz without success.
> I attach the main.log file. I have encountered this when trying to build
> gwyddion in an isolated installation of macports. (/opt/gwyddion)
>
> The error is in gdkglshapes I think. By accesing the work path of the
> build and running make I obtain:
>
> gdkglshapes.c:552:12: error: redefinition of 'index' as different kind of
> symbol
> static int index[20][3] =
>
> My os and xcode version:
> xcode version 9.2
> macOS 10.12.6
New description:

 I have tried to build gtkglext +quartz without success.
 I attach the main.log file. I have encountered this when trying to build
 gwyddion in an isolated installation of macports. (/opt/gwyddion)

 The error is in gdkglshapes I think. By accesing the work path of the
 build and running make I obtain:

 {{{
 gdkglshapes.c:552:12: error: redefinition of 'index' as different kind of
 symbol
 static int index[20][3] =
 }}}

 My os and xcode version:\\
 xcode version 9.2\\
 macOS 10.12.6

--

Comment:

 It seems that gtkglext's use of a variable named `index` is conflicting
 with a function named `index` that is provided by the operating system. I
 am surprised that the operating system would provide a function with such
 a generic name, and that this problem was not observed before, but I can
 confirm the problem on my Sierra system.

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

Re: [MacPorts] #56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol

MacPorts
In reply to this post by MacPorts
#56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol
--------------------------+----------------------
  Reporter:  jbuencuerpo  |      Owner:  jd@…
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.4.2
Resolution:               |   Keywords:
      Port:  gtkglext     |
--------------------------+----------------------

Comment (by jbuencuerpo):

 Hi,
 I have just rename index, and it compiles. Also gwyddion seems to work
 patched,
 The file patch  gdk/gdkglshapes.c

 {{{

 --- gdk/gdkglshapes.c.orig      2018-04-11 15:15:50.000000000 -0600
 +++ gdk/gdkglshapes.c   2018-04-11 15:16:13.000000000 -0600
 @@ -549,7 +549,7 @@
    {-Z, -X, 0}
  };

 -static int index[20][3] =
 +static int bindex[20][3] =
  {
    {0, 4, 1},
    {0, 9, 4},
 @@ -579,7 +579,7 @@
    int i;

    for (i = 19; i >= 0; i--) {
 -    drawtriangle(i, idata, index, shadeType);
 +    drawtriangle(i, idata, bindex, shadeType);
    }
  }
 }}}

 Avoiding using strings.h could be  preferable/possible?

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

Re: [MacPorts] #56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol

MacPorts
In reply to this post by MacPorts
#56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol
--------------------------+----------------------
  Reporter:  jbuencuerpo  |      Owner:  jd@…
      Type:  defect       |     Status:  assigned
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.4.2
Resolution:               |   Keywords:
      Port:  gtkglext     |
--------------------------+----------------------
Changes (by jbuencuerpo):

 * Attachment "patch-index-gdkglshapes-osx.diff" added.

 patch to gdk/gdkglshapes.c

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

Re: [MacPorts] #56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol

MacPorts
In reply to this post by MacPorts
#56260: gtkglext @1.2.0: error: redefinition of 'index' as different kind of symbol
--------------------------+--------------------
  Reporter:  jbuencuerpo  |      Owner:  jd@…
      Type:  defect       |     Status:  closed
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.4.2
Resolution:  fixed        |   Keywords:
      Port:  gtkglext     |
--------------------------+--------------------
Changes (by MarcusCalhoun-Lopez):

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


Comment:

 In [changeset:"154136086d14a0044a25aba90ea7826ca9b7f89a/macports-ports"
 154136086d14a0044a25aba90ea7826ca9b7f89a/macports-ports] (master):
 {{{
 #!ConfigurableCommitTicketReference repository="macports-ports"
 revision="154136086d14a0044a25aba90ea7826ca9b7f89a"
 gtkglext: avoid name conflict with strings.h func

 Fixes https://trac.macports.org/ticket/56260
 }}}

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