On Thu, 20 Mar 2014 10:12:59 -0300 Mariano Reingart wrote:
MR> For the GSOC 2014 proposal, I've working in a patch to run the current wxQT
MR> branch (2.9.2) under Qt 5.2.1.
Thanks!
MR> * changed moc precompiler path (to use my qt5.2.1)
This seems unnecessary, you can just set your PATH to include this
directory in front of it.
MR> * updated configure.in to include Qt5* libs
MR> * changed includes from QtGui/QPushButton to QtWidgets/QPushButton
MR> (warning: not allways)
MR> * changed toAscii -> toLatin
MR> * removed QApplication::GuiClient from QApplication() in main;
MR> * etc
There are a lot of changes to just the RCS-ID line, I wonder if we could
filter them out somehow? Also, there are some EOL changes (e.g. in
include/wx/qt/calctrl.h) which distract from the real changes...
MR> The patch:
MR>
MR> https://dl.dropboxusercontent.com/u/75600582/wxQT_5_2_1.patch
Do I understand correctly that this should be applied to wxQT branch?
MR> When trying to cross-compile it for Android (arm-linux-androideabi), it
MR> raises the following error:
MR>
MR> ../include/wx/wxcrtbase.h:758:68: error: 'wcsdup' was not declared in this
MR> scope
AFAIR Android didn't have wchar_t support at all until relatively
recently. But I think it is supposed to have it now... So perhaps it's just
a matter of using a newer SDK? In any case, it looks like configure wrongly
detected wcsdup() availability, you'd need to look at config.log to see
what happened when testing for it and why was it found even though it
doesn't seem to be there.
On Thu, 20 Mar 2014 15:19:03 -0300 Mariano Reingart wrote:
MR> > There are a lot of changes to just the RCS-ID line, I wonder if we could
MR> > filter them out somehow? Also, there are some EOL changes (e.g. in
MR> > include/wx/qt/calctrl.h) which distract from the real changes...
MR> >
MR> Yes, I saw them, maybe I'm omitting some setting at the svn level
MR> About the EOL, I just edited the files, but it seems gedit has changed the
MR> file beyond my modifications.
MR> Do you have a guide or something similar about this two?
We don't really have any guides specifically about the EOLs but my
personal advice would be to keep everything (except some specific files,
like MSVS projects and .bat files) in Unix format, always, i.e. even under
Windows. Any decent editor should support Unix file format too and this
avoids problems if you ever copy files between the systems or use a VCS
which doesn't do any EOL translation (or use one which is capable of doing
it but don't want to bother with it).
MR> (and IDE that you can recomend and is not too cumbersone)
I'm not the one to ask about IDEs as I am a Vim person.
MR> I'm setting up hg-git so I could a fine grainded local commits in a easier
MR> way.
While using git-svn works very well and I think that using hg-git works
well too, I really question the idea of using hg-git-svn. Even if it also
works (which would be amazing on its own), this seems like just asking for
trouble. Personally, I'd recommend switching to git, if you're comfortable
with hg, it won't be a big problem. But if you absolutely want to use hg,
then I think you should use hg-svn directly.
MR> > MR> The patch:
MR> > MR>
MR> > MR> https://dl.dropboxusercontent.com/u/75600582/wxQT_5_2_1.patch
MR> >
MR> > Do I understand correctly that this should be applied to wxQT branch?
MR>
MR> Yes
OK, I can apply it without problems then (I'd be more careful with the
trunk...), just let me know if you can make a new version fixing the RCS-ID
and EOL problems. TIA!
MR> I've tried --enable-utf8, --enable-utf8only,
Yes, I think using those two should be the default for Android.
MR> --disable-std_string
This shouldn't be needed.
MR> I'm using (configure_android_sh.txt), note that it includes the paths that
MR> works for the standalone qt app.
Ugh, this is pretty horrible. Is this really the best/only way to do it?
MR> This is the complete config.log:
MR>
MR> https://dl.dropboxusercontent.com/u/75600582/config_log_android_wxqt.txt
I don't see anything wrong in it... It seems to detect wcsdup just fine.
The only explanation I have is that wcsdup actually exists in the library
but is not declared in any header. Can you try grepping them to check if
this is really the case?
MR> BTW, how can I compile the __WXANDROID__ port already in the trunk?
Only wxBase can be compiled for Android, there is no GUI Android port
(yet).
On Tue, 25 Mar 2014 04:44:50 -0300 Mariano Reingart wrote:
MR> I'd resolved the wcsdup issue (not defining wxCRT_StrdupW in wxcrtbase.h to
MR> use the wx code in wxcrt.cpp, but I'ld like investigate why HAVE_WCSDUP get
MR> defined by configure...)
Hi,
I think it's very simple: configure uses C for this test and in C the lack
of function prototype is not an error, unlike in C++. So the program
compiles and links because wcsdup() is actually available in the libraries.
But in C++ it doesn't even compile because of this lack of prototype.
MR> When I try to debug, in the emulator appears:
MR>
MR> reingart@s5ultra:~/src/gsoc2014$
MR> /home/reingart/src/android-sdk-linux/platform-tools/adb shell
MR> LD_LIBRARY_PATH=/data/local/tmp /data/local/gdbserver :1234
MR> /data/local/tmp/minimal
MR> Process /data/local/tmp/minimal created; pid = 669
MR> Listening on port 1234
MR> Remote debugging from host 127.0.0.1
MR> % in DoGetArgumentType(): more arguments than format string specifiers?
Notice that this assert doesn't exist in the latest trunk code any more
(see r76027).
MR> 5663204 in wxArgNormalizerUtf8(): format specifier doesn't match argument
MR> type
This one looks bad though. Unfortunately I have no idea where does it come
from.
MR> BTW, does anyone know how this could be debugged easily without setting
MR> the full environment? (ie.command line to avoid qt creator /
MR> eclipse...)
I'd love to know this too, but I can't help you here, sorry.
On Fri, 28 Mar 2014 04:45:52 -0300 Mariano Reingart wrote:
MR> Well, wxQT on Android did work!
Great news!
MR> On Tue, Mar 25, 2014 at 10:35 AM, Vadim Zeitlin <va...@wxwidgets.org> wrote:
MR>
MR> > On Tue, 25 Mar 2014 04:44:50 -0300 Mariano Reingart wrote:
...
MR> > I think it's very simple: configure uses C for this test and in C the lack
MR> > of function prototype is not an error, unlike in C++. So the program
MR> > compiles and links because wcsdup() is actually available in the libraries.
MR> > But in C++ it doesn't even compile because of this lack of prototype.
MR> >
MR> Yes, I understand that, but it doesn't link
Then I don't understand how does the configure test pass...
MR> I could fix adding the missing prototipes for wcslen, wcsnlen, wcscasecmp,
MR> wcsncasecmp (they seems to work) but with the missing prototipe of wcsdup
MR> doesn't link.
Just a stupid question: did you use extern "C" for these prototypes?
MR> Anyway, there should be any other problem as the traps (Signal 5),
MR> assertions and segmentation faults are related to string methods...
MR>
MR> See this wxWidgets Debug Alert:
MR>
MR> in FromWChar(): trying to encode undefined Unicode character.
That's interesting... It really shouldn't happen. Can you see the actual
contents of "src" passed to FromWChar()? And if it's really invalid, where
does it come from?
MR> Also, other error was that android doesn't have "uname" so wxGetOsVersion
MR> and similar were causing a crash:
This is not right neither :-( If there is uname, these functions should
return an error, but not crash.
MR> > MR> BTW, does anyone know how this could be debugged easily without setting
MR> > MR> the full environment? (ie.command line to avoid qt creator /
MR> > MR> eclipse...)
MR> >
MR> > I'd love to know this too, but I can't help you here, sorry.
MR> >
MR> Here is a minimal script that almost works to debug the minimal wxQT
MR> android package:
MR>
MR> https://dl.dropboxusercontent.com/u/75600582/gsoc2014/wxQT/gdb.sh
Thanks, I'll try to test it when I have time (which unfortunately won't be
now...).
VZ
Hi, Mariano,
On Sun, Mar 30, 2014 at 8:45 PM, Mariano Reingart <rein...@gmail.com> wrote:
I can see that you are doing tests on the emulator.
Do you have an actual device to test? (at least one Android phone/tablet)