Author Topic: wxScintilla and wx2.8  (Read 389 times)

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 83
wxScintilla and wx2.8
« on: May 21, 2018, 09:32:51 am »
Looks like one of the recent wxScintilla merge broke wx2.8 compatibility:

Code: [Select]
src/PlatWX.cpp: In member function ‘void Window::SetPositionRelative(PRectangle, Window)’:
src/PlatWX.cpp:1908:32: error: ‘wxDisplay’ has not been declared
     const int currentDisplay = wxDisplay::GetFromWindow(relativeWin);
                                ^
src/PlatWX.cpp:1909:56: error: ‘wxDisplay’ was not declared in this scope
     const wxRect displayRect = wxDisplay(currentDisplay).GetClientArea();
                                                        ^

Are we officially moving to wx3.0 and above?

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10842
    • Travis build status
Re: wxScintilla and wx2.8
« Reply #1 on: May 21, 2018, 09:48:03 am »
Looks like one of the recent wxScintilla merge broke wx2.8 compatibility:

It builds fine for me with wx2.8.12 on gentoo and centos.
It seems the wxDisplay subsystem in your wx build is disabled.

Are we officially moving to wx3.0 and above?
It will be good if we drop wx2.8, but we've not done so yet.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: wxScintilla and wx2.8
« Reply #2 on: May 21, 2018, 01:14:48 pm »
It seems the wxDisplay subsystem in your wx build is disabled.

Interesting... I haven't touched the build script in ages...
Code: [Select]
../../configure --disable-compat26 --enable-unicode --disable-sys-libs --enable-monolithic --with-gtk=2 --with-jpeg=builtin --with-libpng=builtin --with-regex=builtin --with-tiff=builtin --with-zlib=builtin --with-expat=builtin

Does it need an extra toggle?

(I do have the display.h in the install directory... weird)
« Last Edit: May 21, 2018, 01:18:20 pm by Commaster »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6221
    • My Best Post
Re: wxScintilla and wx2.8
« Reply #3 on: May 21, 2018, 02:09:43 pm »
--enable-display
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: wxScintilla and wx2.8
« Reply #4 on: May 22, 2018, 09:01:43 pm »
I've added that flag, but the setup.h still says
Code: [Select]
#define wxUSE_DISPLAY 0
I'll have to dig into the wx src to figure out why this is happening.

Thanks for the suggestion!  :)

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10842
    • Travis build status
Re: wxScintilla and wx2.8
« Reply #5 on: May 22, 2018, 09:37:53 pm »
You can use the patch attached here: http://trac.wxwidgets.org/ticket/18115 (after modifying it to match the source locations in cb's repo).
But generally you want to have wxdisplay working. It will make you're user experience a lot better.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6221
    • My Best Post
Re: wxScintilla and wx2.8
« Reply #6 on: May 23, 2018, 12:12:28 am »
From wxWidgets configure.in
Code: [Select]
AC_MSG_WARN([Xinerama not found; disabling wxDisplay])

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6221
    • My Best Post
Re: wxScintilla and wx2.8
« Reply #7 on: May 23, 2018, 12:23:24 am »
But generally you want to have wxdisplay working. It will make you're user experience a lot better.

I am guessing this is mostly only true if you have multiple monitors; is this correct?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Testing, compiling CB Trunk against wxWidgets 3.0.2.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10842
    • Travis build status
Re: wxScintilla and wx2.8
« Reply #8 on: May 23, 2018, 01:27:44 am »
Nope, it improves experience in single monitor settings.
The the bug from the link happens on a single monitor machine.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: wxScintilla and wx2.8
« Reply #9 on: May 23, 2018, 07:53:09 pm »
Feels like a bug in the wxWidgets 2.8 branch:

I have Xinerama installed, but the default install path for the .so on *Ubuntu is /usr/lib/x86_64-linux-gnu/.

Debugging the configure script showed, that the search paths for libs are:
Code: [Select]
/usr/local/lib
/usr/local/X11/lib
/usr/local/lib/X11
/usr/local/X11R6/lib
/usr/local/lib/X11R6
/usr/Motif-2.1/lib
/usr/Motif-1.2/lib
/usr/lib/Motif1.2
/usr/dt/lib
/usr/openwin/lib
/usr/lib/Xm
/usr/X11R6/lib
/usr/X11R6.4/lib
/usr/lib/X11R6
/usr/X11/lib
/usr/lib/X11
/usr/XFree86/lib/X11
/usr/pkg/lib
/usr/local/X1R5/lib
/usr/local/lib/X11R5
/usr/X11R5/lib
/usr/lib/X11R5
/usr/local/X11R4/lib
/usr/local/lib/X11R4
/usr/X11R4/lib
/usr/lib/X11R4
/usr/openwin/share/lib
/usr/lib

Basically everywhere BUT the right location. I don't think my shell-script-fu is strong enough to untangle the mess of $SEARCH_LIB.

Also looking at wx3.0+ configure shows that it no longer checks for Xinerama  :-\

Online Commaster

  • Multiple posting newcomer
  • *
  • Posts: 83
Re: wxScintilla and wx2.8
« Reply #10 on: May 23, 2018, 08:06:58 pm »
nvm, got it working after this patch for the wx2.8 source:

Code: [Select]
diff --git a/configure b/configure
index f2ba453158..86ede0018a 100755
--- a/configure
+++ b/configure
@@ -24947,9 +24947,9 @@ SEARCH_INCLUDE="\
                               \
     /usr/dt/include           \
     /usr/openwin/include      \
-                              \
+    /usr/include              \
     /usr/include/Xm           \
-                              \
+    /usr/include/x86_64-linux-gnu \
     /usr/X11R6/include        \
     /usr/X11R6.4/include      \
                               \
diff --git a/configure.in b/configure.in
index b73abca3c5..4c9492e7ed 100644
--- a/configure.in
+++ b/configure.in
@@ -2652,9 +2652,9 @@ SEARCH_INCLUDE="\
                               \
     /usr/dt/include           \
     /usr/openwin/include      \
-                              \
+    /usr/include              \
     /usr/include/Xm           \
-                              \
+    /usr/include/x86_64-linux-gnu \
     /usr/X11R6/include        \
     /usr/X11R6.4/include      \
                               \

@oBFusCATed: while you are at it, please add "_T" in the last StartsWith-s in the rev 11411. Cheers.
« Last Edit: May 23, 2018, 08:35:12 pm by Commaster »