#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

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

#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+--------------------------
 Reporter:  dimstar  |      Owner:  EionRobb
     Type:  defect   |     Status:  new
Milestone:           |  Component:  unclassified
  Version:  2.10.11  |   Keywords:
---------------------+--------------------------
 openSUSE is in progress of updating ncurses to version 6.0 and
 WINDOW_OPAQUE is being set to 1.

 This results in build failures of finch, with this kind of log:


 {{{
 [  868s]   CC       gntws.lo
 [  868s] gntwm.c: In function 'work_around_for_ncurses_bug':
 [  868s] gntwm.c:177:18: error: dereferencing pointer to incomplete type
 'WINDOW {aka struct _win_st}'
 [  868s]    sx = panel->win->_begx;
 [  868s]                   ^
 [  868s] Makefile:738: recipe for target 'gntwm.lo' failed
 }}}


 The issue being, that when WINDOW_OPAQUE is enabled in ncurses, the WINDOW
 struct is not supposed to be accessed directly, but only thruogh accessor
 functions

--
Ticket URL: <https://developer.pidgin.im/ticket/16764>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  unclassified
  Version:  2.10.11  |  Resolution:
 Keywords:           |
---------------------+---------------------------

Comment (by dimstar):

 With the attached patch, I managed to build pidgin/finch on openSUSE with
 ncurses 6.0

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:1>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  unclassified
  Version:  2.10.11  |  Resolution:
 Keywords:           |
---------------------+---------------------------

Comment (by QuLogic):

 Thanks! Will it also build with 5.1 using this patch (i.e., when were
 these functions added)?

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:2>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  unclassified
  Version:  2.10.11  |  Resolution:
 Keywords:           |
---------------------+---------------------------

Comment (by dimstar):

 The ncurses changelog mentions it at around:


 {{{
 20070331
         + add access-functions and macros to return properties of the
 WINDOW
           structure, e.g., when NCURSES_OPAQUE is set.
 }}}

 so, no, ncurses 5.1 does not have those accessors (5.1 was released
 2000/07/08!)

 Looking at the release history, 5.7 was the first release after 20070331

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:3>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  unclassified
  Version:  2.10.11  |  Resolution:
 Keywords:           |
---------------------+---------------------------

Comment (by QuLogic):

 Oh, wait, not sure where I got 5.1 from. There's actually no minimum
 specified in `configure.ac`, but I guess whatever's in a reasonably recent
 (and still supported) distro.

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:4>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  defect   |      Status:  new
Milestone:           |   Component:  unclassified
  Version:  2.10.11  |  Resolution:
 Keywords:           |
---------------------+---------------------------

Comment (by bjoernv):

 The bug exists in default branch (Pidgin 3.0) too. The patch fixes the
 compilation errors.

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:5>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------
Changes (by Robby):

 * type:  defect => patch
 * milestone:   => Patches Needing Review


Old description:

> openSUSE is in progress of updating ncurses to version 6.0 and
> WINDOW_OPAQUE is being set to 1.
>
> This results in build failures of finch, with this kind of log:
>

> {{{
> [  868s]   CC       gntws.lo
> [  868s] gntwm.c: In function 'work_around_for_ncurses_bug':
> [  868s] gntwm.c:177:18: error: dereferencing pointer to incomplete type
> 'WINDOW {aka struct _win_st}'
> [  868s]    sx = panel->win->_begx;
> [  868s]                   ^
> [  868s] Makefile:738: recipe for target 'gntwm.lo' failed
> }}}
>

> The issue being, that when WINDOW_OPAQUE is enabled in ncurses, the
> WINDOW struct is not supposed to be accessed directly, but only thruogh
> accessor functions

New description:

 openSUSE is in progress of updating ncurses to version 6.0 and
 WINDOW_OPAQUE is being set to 1.

 This results in build failures of finch, with this kind of log:

 {{{
 [  868s]   CC       gntws.lo
 [  868s] gntwm.c: In function 'work_around_for_ncurses_bug':
 [  868s] gntwm.c:177:18: error: dereferencing pointer to incomplete type
 'WINDOW {aka struct _win_st}'
 [  868s]    sx = panel->win->_begx;
 [  868s]                   ^
 [  868s] Makefile:738: recipe for target 'gntwm.lo' failed
 }}}

 The issue being, that when WINDOW_OPAQUE is enabled in ncurses, the WINDOW
 struct is not supposed to be accessed directly, but only thruogh accessor
 functions

--

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:6>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by bjoernv):

 The patch resolves the build error. But does Finch really work with the
 patch and ncurses 6?

 If I start Finch, the terminal window is cleared. After that I see my
 shell prompt again. But I can't type anything before I reset the terminal
 window with "reset".

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:7>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by dx):

 I don't get it. Arch linux here, ncurses 6.0, no patches applied to
 2.10.12 and it builds just fine.

 https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/pidgin

 The only patch is unrelated, for python2/python3 fixes.

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:8>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by bjoernv):

 Replying to [comment:8 dx]:
 > I don't get it. Arch linux here, ncurses 6.0, no patches applied to
 2.10.12 and it builds just fine.
 >
 >
 https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/pidgin
 >
 > The only patch is unrelated, for python2/python3 fixes.

 The problem is only visible, if NCURSES_OPAQUE=1 (not WINDOW_OPAQUE like
 in the bug title) is set in /usr/include/ncurses.h. The configure switch
 --enable-reentrant triggers NCURSES_OPAQUE=1.

 openSUSE Tumbleweed compiles ncurses with these switches:

 {{{
 %configure \
         --without-ada           \
         --without-debug         \
         --without-profile       \
         --without-manpage-tbl   \
         --with-shared           \
         --with-normal           \
         --with-manpage-format=gzip \
         --with-manpage-renames=${PWD}/man/man_db.renames \
         --with-manpage-aliases  \
         --with-ospeed=speed_t   \
 %if 0%{?suse_version} > 1310
         --with-gpm=$(readlink %{_libdir}/libgpm.so) \
 %else
         --with-gpm              \
 %endif
         --with-dlsym            \
         --with-termlib=tinfo    \
         --with-ticlib=tic       \
         --with-xterm-kbs=del    \
         --disable-root-environ  \
         --disable-termcap       \
         --disable-overwrite     \
         --disable-rpath         \
         --disable-rpath-hack    \
         --disable-leaks         \
         --disable-xmc-glitch    \
         --enable-symlinks       \
         --enable-big-core       \
         --enable-const          \
         --enable-hashmap        \
         --enable-no-padding     \
         --enable-sigwinch       \
         --enable-colorfgbg      \
         --enable-sp-funcs       \
         --enable-interop        \
         --with-pthread          \
         --enable-reentrant      \
         --enable-ext-mouse      \
         --disable-widec         \
         --enable-ext-colors     \
         --enable-weak-symbols   \
         --enable-wgetch-events  \
         --enable-pthreads-eintr \
         --enable-string-hacks   \
         --prefix=%{_prefix}     \
         --exec-prefix=%{_prefix}\
         --libdir=%{_libdir}     \
         --datadir=%{_datadir}   \
         --mandir=%{_mandir}     \
         --includedir=%{_incdir} \
         "${WITHCHTYPE}"         \
         --disable-tic-depends   \
         --with-cxx-shared       \
         --with-pc-suffix        \
         --enable-pc-files       \
 %if 0%{?_crossbuild}
         --with-fallbacks="$FALLBK" \
 %else
         --with-fallbacks=""     \
 %endif
 %if %{with symversion}
         --with-versioned-syms=${PWD}/package/ncursest.map \
 %endif
 %if %{with hasheddb}
         --with-hashed-db        \
 %endif
         --with-pkg-config-libdir=%{_libdir}/pkgconfig}}}

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:9>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by dx):

 Of those options, the following are in the "Experimental Code" section of
 the ncurses configure help

 {{{
 --enable-colorfgbg
 --enable-interop
 --enable-pthreads-eintr
 --enable-reentrant
 --enable-weak-symbols
 --enable-wgetch-events
 --with-pthread
 }}}

 Is there a good reason for all of these? Enabling experimental thread
 related features in production code seems like an awful idea.

 Debian and arch don't enable any of these. Fedora enables colorfgbg only.

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:10>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by bjoernv):

 Replying to [comment:10 dx]:
 > Is there a good reason for all of these? Enabling experimental thread
 related features in production code seems like an awful idea.
 >
 > Debian and arch don't enable any of these. Fedora enables colorfgbg
 only.

 I don't know and I am not the package maintainer of ncurses or Pidgin
 packages in openSUSE project. There are some hits on "thread" options in
 ncurses.changes file. But I haven't found the answer of your question
 here:

 https://build.opensuse.org/package/show?project=openSUSE%3AFactory&package=ncurses

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:11>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
------------------------------------+---------------------------
 Reporter:  dimstar                 |       Owner:  EionRobb
     Type:  patch                   |      Status:  new
Milestone:  Patches Needing Review  |   Component:  unclassified
  Version:  2.10.11                 |  Resolution:
 Keywords:                          |
------------------------------------+---------------------------

Comment (by dx):

 Submitted a bug https://bugzilla.opensuse.org/show_bug.cgi?id=984322

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:12>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  patch    |      Status:  closed
Milestone:  2.10.13  |   Component:  unclassified
  Version:  2.10.11  |  Resolution:  fixed
 Keywords:           |
---------------------+---------------------------
Changes (by Gary Kramlich <grim@…>):

 * status:  new => closed
 * resolution:   => fixed
 * milestone:  Patches Needing Review => 2.10.13


Comment:

 (In [7b4e9bdf079e]):[[BR]]
 ChangeLog the pr and fix for ncurses 6.0 opaque structs.  Fixes #16764

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:13>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker
Reply | Threaded
Open this post in threaded view
|

Re: #16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1

Pidgin
In reply to this post by Pidgin
#16764: Pidgin/finch fails to build against ncurses 6.0 with WINDOW_OPAQUE set to 1
---------------------+---------------------------
 Reporter:  dimstar  |       Owner:  EionRobb
     Type:  patch    |      Status:  closed
Milestone:  2.12.1   |   Component:  unclassified
  Version:  2.10.11  |  Resolution:  fixed
 Keywords:           |
---------------------+---------------------------
Changes (by Robby):

 * milestone:  2.10.13 => 2.12.1


Comment:

 Can someone please fix the post-commit hook?

--
Ticket URL: <https://developer.pidgin.im/ticket/16764#comment:14>
Pidgin <https://pidgin.im>
Pidgin
_______________________________________________
Tracker mailing list
[hidden email]
https://pidgin.im/cgi-bin/mailman/listinfo/tracker