All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] Remaining kmsxx build issue
Date: Wed, 24 Aug 2016 22:40:33 +0200	[thread overview]
Message-ID: <20160824224033.2276f19b@free-electrons.com> (raw)
In-Reply-To: <20160824185128.68a2fdef@free-electrons.com>

Hello,

On Wed, 24 Aug 2016 18:51:28 +0200, Thomas Petazzoni wrote:

> > There is another type of issues for kmsxx:
> > 
> >     http://autobuild.buildroot.org/results/5e9/5e9963c1f11af40a6349da524fc128116a1d9e6e/build-end.log
> > 
> >     [ 81%] Linking CXX executable ../bin/fbtestpat
> >     /tmp/ccvhwy4u.ltrans0.ltrans.o: In function `main':
> >     <artificial>:(.text.startup+0xa4): undefined reference to `kms::ExtCPUFramebuffer::ExtCPUFramebuffer(unsigned int, unsigned int, kms::PixelFormat, unsigned char*, unsigned int)'
> >     <artificial>:(.text.startup+0xd4): undefined reference to `kms::draw_test_pattern(kms::IMappedFramebuffer&)'
> >     <artificial>:(.text.startup+0x10c): undefined reference to `kms::RGB::RGB(unsigned char, unsigned char, unsigned char)'
> >     <artificial>:(.text.startup+0x128): undefined reference to `kms::draw_text(kms::IMappedFramebuffer&, unsigned int, unsigned int, std::string const&, kms::RGB)'
> >     <artificial>:(.text.startup+0x188): undefined reference to `kms::ExtCPUFramebuffer::~ExtCPUFramebuffer()'
> >     <artificial>:(.text.startup+0x2a8): undefined reference to `kms::ExtCPUFramebuffer::~ExtCPUFramebuffer()'
> >     collect2: error: ld returned 1 exit status
> >     make[3]: *** [bin/fbtestpat] Error 1
> > 
> > And I was not able to reproduce it either... :-/  
> 
> This issue happened only once:
> 
> 	http://autobuild.buildroot.net/?reason=kmsxx-bd5f6471e619a6ba2987bc7f66ef78a531f94d6c
> 
> I've restarted the same build on the same machine, I'll see if it
> happens again.

I've been able to reproduce it on gcc20, and a reduced test case is:

BR2_arm=y
BR2_STATIC_LIBS=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-arm-full-static-2016.08-rc1-4-g07e8d1c.tar.bz2"
BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y
BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_14=y
BR2_TOOLCHAIN_EXTERNAL_LOCALE=y
# BR2_TOOLCHAIN_EXTERNAL_HAS_THREADS_DEBUG is not set
BR2_TOOLCHAIN_EXTERNAL_INET_RPC=y
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_PACKAGE_KMSXX=y

The exact same defconfig builds fine on my laptop.

On gcc20, I'm able to fix the build by disabling LTO support in the
kmsxx CMakeLists.txt file. I.e, I remove:

if (NOT ${U_CMAKE_BUILD_TYPE} MATCHES DEBUG)
    CHECK_CXX_COMPILER_FLAG("-flto" HAS_LTO_FLAG)

    if (HAS_LTO_FLAG)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -flto")
        set(CMAKE_AR gcc-ar)
        set(CMAKE_RANLIB gcc-ranlib)
    endif()
endif()

And then the build works.

While I could imagine some LTO-related bug, I cannot understand why
with the exact same toolchain/cross-compiler it builds on my laptop but
not on gcc20.

Completely weird.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-08-24 20:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-19  6:30 [Buildroot] [autobuild.buildroot.net] Build results for 2016-08-18 Thomas Petazzoni
2016-08-19 22:07 ` [Buildroot] Analysis of build " Thomas Petazzoni
2016-08-19 22:19   ` Yann E. MORIN
2016-08-19 22:22   ` Waldemar Brodkorb
2016-08-20 10:27     ` Thomas Petazzoni
2016-08-19 22:29   ` Yann E. MORIN
2016-08-24 16:51     ` Thomas Petazzoni
2016-08-24 20:40       ` Thomas Petazzoni [this message]
2016-08-26 19:30         ` [Buildroot] Remaining kmsxx build issue Arnout Vandecappelle
2016-08-26 19:42           ` Thomas Petazzoni
2016-08-20  9:17   ` [Buildroot] Analysis of build results for 2016-08-18 Rahul Bedarkar
2016-08-20  9:22     ` Thomas Petazzoni
2016-08-20 10:11       ` Rahul Bedarkar
2016-08-20 13:52   ` Gustavo Zacarias
2016-08-20 13:55     ` [Buildroot] odroid-mali issue Thomas Petazzoni
2016-08-21  6:42   ` [Buildroot] Analysis of build results for 2016-08-18 Baruch Siach

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=20160824224033.2276f19b@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.