Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lukichev <alexander.lukichev@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [autobuild.buildroot.net] Build results for 2015-09-27
Date: Fri, 02 Oct 2015 12:33:13 +0300	[thread overview]
Message-ID: <560E4F59.2050506@gmail.com> (raw)
In-Reply-To: <20150928063014.85E79102A48@stock.ovh.net>

Hi,

On 09/28/2015 09:30 AM, Thomas Petazzoni wrote:
>          arm |                       qt-4.8.7 | NOK | http://autobuild.buildroot.net/results/11a4c19638ca211bd2a424fd92602166235c9433/

  This, and some other builds [1], fail because of the BR2_STATIC_LIBS configuration. The pre-built toolchain in this case does not have dlfcn.h. The failing source file src/corelib/plugin/qlibrary_unix.cpp has a QT_NO_DYNAMIC_LIBRARY guard constant for this case, which was added to qt by the patch [2]. It makes the module behave correctly when plugins cannot be loaded dynamically, which is the case for BR2_STATIC_LIBS in Buildroot:

#if (defined(Q_OS_VXWORKS) && !defined(VXWORKS_RTP)) || defined (Q_OS_NACL)
#define QT_NO_DYNAMIC_LIBRARY
#endif

QT_BEGIN_NAMESPACE

#if !defined(QT_HPUX_LD) && !defined(QT_NO_DYNAMIC_LIBRARY)
QT_BEGIN_INCLUDE_NAMESPACE
#include <dlfcn.h>
QT_END_INCLUDE_NAMESPACE
#endif

static QString qdlerror()
{
#if defined(QT_NO_DYNAMIC_LIBRARY)
    const char *err = "This platform does not support dynamic libraries.";
#elif !defined(QT_HPUX_LD)
    const char *err = dlerror();
#else
    const char *err = strerror(errno);
#endif
    return err ? QLatin1Char('(') + QString::fromLocal8Bit(err) + QLatin1Char(')'): QString();
}
...and so on.

  The QT_NO_DYNAMIC_LIBRARY constant is defined in the same file for Q_OS_VXWORKS or Q_OS_NACL (from src/corelib/global/qglobal.h). There are also two other constants related to inclusion of dlfcn.h: QT_HPUX_LD (from a platform mkspec's qplatformdefs.h, e.g. for hpux-acc-o64) and VXWORKS_RTP (defined elsewhere than qt package).

  One way to fix the failing builds [1] would be to make this QT_NO_DYNAMIC_LIBRARY defined if BR2_STATIC_LIBS is chosen in the Buildroot configuration, and to do this preferably in an upstream-friendly way but I don't see how this could be done. One option could be to define an mkspec for Buildroot, which seems too heavy. Another is to make a "constant defined elsewhere" available in the qt's compilation environment (like VXWORKS_RTP above). How this could be done? Does adding a Qt-wide BUILDROOT_STATIC (or some such) constant to QT_CXXFLAGS in qt.mk in seem a good idea? Would such a patch (that examines this Buildroot-specific constant in src/corelib/plugin/qlibrary_unix.cpp) look good in Qt's upstream?

  References:
  [1] http://autobuild.buildroot.net/?status=NOK&reason=qt-4.8.7&arch=arm
  [2] https://github.com/mirror/qt/commit/468142db15fe99c70505f507f6c2941706172853

--
Best regards,
  Alexander Lukichev

      reply	other threads:[~2015-10-02  9:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  6:30 [Buildroot] [autobuild.buildroot.net] Build results for 2015-09-27 Thomas Petazzoni
2015-10-02  9:33 ` Alexander Lukichev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=560E4F59.2050506@gmail.com \
    --to=alexander.lukichev@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox