2014-12-26 1:37 GMT+03:00 Adam Wolk <adam.w...@koparo.com>:
>
> On Thu, Dec 25, 2014, at 09:44 PM, Adam Wolk wrote:
>> On Thu, Dec 25, 2014, at 09:28 PM, Adam Wolk wrote:
>> > Hi ports@
>> >
>> > I'm CC'ing the KDE porting team as they are marked as the MAINTAINER of
>> > the qt5 port in the
>> > OpenBSD ports tree.
>> >
>> > I'm working on a port of the Otter Browser (http://otter-browser.org/)
>> > and have hit a bunch of issues that
>> > do not seem to be upstream (otter-browser) related.
>> >
>> > Details:
>> >  - OpenBSD i386 running snapshots (from 23 Dec 2014)
>> >  - otter-browser commit e6a48fd71c121f1d486dabcf21e5b48809497c3a from
>> >  Thu Dec 25 16:28:02 2014 +0100
>> >  - ldd output at the end of the email
>>
>> Forgot to mention. I'm running with Xfce 4.10 - KDE & Gnome is not
>> installed on this system.
>>
>> Regards,
>> Adam
>>
>
> I found the reason for the following error:
>  "Warning: QGtkStyle could not resolve GTK. Make sure you have installed
> the proper libraries."
>
> In the qt5 source code the error comes from:
> https://qt.gitorious.org/qt/qt5-maemo5-qtbase/source/3e11afdea6edb753291ad15d963e8b44c9f5d33c:src/widgets/styles/qgtkstyle_p.cpp#L612
>  qWarning("QGtkStyle could not resolve GTK. Make sure you have installed
>  the proper libraries.");
>
> which is based on a call to QGtkStylePrivate::gtk_init which in turn is
> dynamically resolved by a call to void QGtkStylePrivate::resolveGtk()
> const:
> https://qt.gitorious.org/qt/qt5-maemo5-qtbase/source/3e11afdea6edb753291ad15d963e8b44c9f5d33c:src/widgets/styles/qgtkstyle_p.cpp#L351
>
>  // enforce the "0" suffix, so we'll open libgtk-x11-2.0.so.0
> QLibrary libgtk(QLS("gtk-x11-2.0"), 0, 0);
>
> as you can see it tries to load libgtk-x11-2.0.so.0  but on OpenBSD the
> .so file is named libgtk-x11-2.0.so.2400.0 leading to the library not
> being loaded and the warning displayed with an improperly initialized
> UI.
>
> I confirmed this by making a symlink from
> /usr/local/lib/libgtk-x11-2.0.so.0 to
> /usr/local/lib/libgtk-x11-2.0.so.2400.0 and running the application
> which got rid of the gtk style warning.
>
> Does anyone know why the .so name differs on OpenBSD? Should this be
> handled by the Qt5 port or altered and submitted upstream? Perhaps I
> should handle this somehow in the otter port I'm working on - any
> suggestions?

Nice catch! Yes, OpenBSD shared library rules are quiet different - in
particular, we override library versions due to the unfortunate fact
that many upstream developers don't respect shared library ABI rules
always.

I've just committed fix to Qt5 port that avoids hardcoding shared
library major versions. So this issue should be fixed as of now.
You'll need to build Qt5 yourself (that will require some patience) or
wait for new packages snapshot. I can't provide amd64 package as of
now because in my tree I have quiet a few other patches to be polished
(or discarded) for Qt.

> The remaining issue is the crashes & cmake issues I mentioned before.
> I don't know yet if the crashes could be a result of the following
> message:
>
> ./otter-browser:/usr/local/lib/libestdc++.so.16.0:
> /usr/lib/libstdc++.so.57.0 : WARNING:
> symbol(_ZN11__gnu_debug17_S_debug_messagesE) size mismatch, relink your
> program
>
> full transcript of an attempt to run the app:
> $ ./otter-browser
> ./otter-browser:/usr/local/lib/libestdc++.so.16.0:
> /usr/lib/libstdc++.so.57.0 : WARNING:
> symbol(_ZN11__gnu_debug17_S_debug_messagesE) size mismatch, relink your
> program
> otter-browser(32731) in free(): error: bogus pointer (double free?)
> 0xdfdfdfdf
> Abort trap (core dumped)

Hm, looks like really packages mismatch in GTK land. I'm not an expert
here but remember there were many problems due to the nature of GTK
(or GDK?) stuff. The rule here is simple: things should be in sync.

--
  WBR,
  Vadim Zhukov

Reply via email to