0

I am trying to compile qtbase recipe with CFLAGS and LDFLAGS in yocto-project. I have added the following lines in qtbase recipe.

CFLAGS and CPPFLAGS are used to add instrumentation of code to find the code coverage.

CFLAGS += "-fprofile-arcs -ftest-coverage"
CPPFLAGS += "-fprofile-arcs -ftest-coverage"

LDFLAGS are used for linking.

LDFLAGS += "-lgcov --coverage"

please find link to log file : https://drive.google.com/open?id=1tmVd7C2IHgOUZKdId-Xl0zFRfKwjYPut

Error Snippet

/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/recipe-sysroot-native/usr/bin/x86_64-mel-linux/../../libexec/x86_64-mel-linux/gcc/x86_64-mel-linux/7.3.0/ld.gold: internal error in override_version, at ../../gold/resolve.cc:61<br>
collect2: error: ld returned 1 exit status<br>
Makefile.eglfs_device_lib:146: recipe for target '../../../../lib/libQt5EglDeviceIntegration.so.5.6.3' failed<br>
make[5]:  [../../../../lib/libQt5EglDeviceIntegration.so.5.6.3] Error 1
make[5]: Leaving directory '/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/build/src/plugins/platforms/eglfs'
Makefile:42: recipe for target 'sub-eglfs_device_lib-pro-make_first-ordered' failed
make[4]: *** [sub-eglfs_device_lib-pro-make_first-ordered] Error 2
make[4]: Leaving directory '/scratch/work/sysdk/dksys/build/tmp/work/core2-64-mel-linux/qtbase/5.6.3+gitAUTOINC+e6f8b072d2-r0/build/src/plugins/platforms/eglfs'
Makefile:96: recipe for target 'sub-eglfs-make_first' failed
make[3]:[sub-eglfs-make_first] Error 2
make[3]:Waiting for unfinished jobs....
Ajay.kundu
  • 195
  • 2
  • 10
  • 1
    Maybe try to add `-no-use-gold-linker` as well. – Nayfe Feb 19 '19 at 07:54
  • And your question is? You found a bug in the gold [linker], please report it :) – Kuba hasn't forgotten Monica Feb 19 '19 at 15:00
  • @Nayfe It is now giving so other errors. Thank you for replying. – Ajay.kundu Feb 20 '19 at 04:15
  • @KubaOber I don't know sir where and how to report it. Any help. – Ajay.kundu Feb 20 '19 at 04:16
  • https://sourceware.org/bugzilla/buglist.cgi?component=gold&query_format=advanced This is the bug list for gold. Make sure your problem isn't listed, and if it isn't: sign up and report the bug, with exact steps needed to reproduce. Understand that the bug will most likely only occur in identical circumstances, so provide the full version of your distribution, versions of all installed packages (copy the partition(s) to a vm, take a snapshot and remove packages whose removal doesn't get rid of the bug: thus obtain the minimum package list needed to reproduce) – Kuba hasn't forgotten Monica Feb 20 '19 at 05:59
  • @KubaOber Yocto is highly customized environment, so I think it is probably better option to use [Yocto mailinglist](https://lists.yoctoproject.org/listinfo/yocto) or Irc [#yocto channel](https://webchat.freenode.net/) – Nayfe Feb 20 '19 at 15:22
  • you could also try to add `DISTRO_FEATURES_remove = "ld-is-gold"` in `local.conf` – Nayfe Feb 20 '19 at 22:15
  • Thank you so much @Nayfe. we have to add QT_CONFIG_FLAGS += " -no-use-gold-linker" in bbappend. – Ajay.kundu Feb 22 '19 at 07:09
  • @Ajay.kundu glad it worked – Nayfe Feb 22 '19 at 08:03

1 Answers1

2

After a lot of research, I am able to find an answer to my question. I have to add the following line in recipe to remove gold linker.

QT_CONFIG_FLAGS += " -no-use-gold-linker"
Ajay.kundu
  • 195
  • 2
  • 10