Issue about Tizen local full build by GBS

From Tizen Wiki
Jump to: navigation, search

QEMU hang

Qemu build is hung when it is emulating cmake sometimes. cmake doesn't need emulation and hence qemu is hung. The solution is not to use emulation for cmake.

Error message in GBS log

   2015-08-13 16:20:11 �[32minfo: �[0m*** [138/605] building libICE-1.0.8-1 armv7l tizen_2.3_mobile (worker: 10) ***
   2015-08-13 16:21:37 �[32minfo: �[0mnext pass:
   2015-08-13 16:21:37 kpartx
   2015-08-13 16:21:37 tolua++
   2015-08-13 16:21:37 augeas
   2015-08-13 16:21:37 �[32minfo: �[0mfinished building gawk
   2015-08-13 16:21:37 �[32minfo: �[0mfinished building bash3
   2015-08-13 16:21:37 �[32minfo: �[0mfinished building openssl
   2015-08-13 16:21:37 �[32minfo: �[0mfinished building ppl
   2015-08-13 16:21:37 �[32minfo: �[0m*** [139/605] building kpartx-0.4.9-7 armv7l tizen_2.3_mobile (worker: 1) ***
   2015-08-13 16:21:37 �[32minfo: �[0m*** [140/605] building tolua++-1.0.93-1 armv7l tizen_2.3_mobile (worker: 13) ***
   2015-08-13 16:21:37 �[32minfo: �[0m*** [141/605] building augeas-0.8.1-1 armv7l tizen_2.3_mobile (worker: 15) ***
   <doesn't processing>

Configuration for cmake-x86

  • modify build.conf to use cmake-x86
   Preinstall: libmount libblkid libuuid
   %_use_internal_dependency_generator 1
   %endif # aarch64
   %if %speedtools
   Support: patch-x86-arm findutils-x86-arm gawk-x86-arm fdupes-x86-arm
   Preinstall: libfile-x86-arm
   Preinstall: elfutils-libelf-x86-arm
   Preinstall: nss-softokn-freebl-x86-arm
   Preinstall: nss-x86-arm
   Required: cmake
   Required: cmake-x86-arm
   Runscripts: rpm-x86-arm
   Runscripts: rpm-libs-x86-arm
   Runscripts: rpm-build-x86-arm
  $ gbs build -A armv7l ... -R ...

Can't export source code

  • -x86 and some package is using shell script in spec file. But with the latest GBS release, a change to one of its dependencies (librpm-tizen) prevents shell scripts in %() from running when parsing the spec file. Instead, it replaces what would be the shell script output with the string "UNEXPANDEDSHELLSCRIPT". As a result, the rpm conditional checks will fail in some spec file , because numbers cannot be compared with strings.
  warning: spec file cmake-x86.spec has not been exported to /home/ correctly, please check if there're special macros in Name/Version/Release fields 
  • Maybe, Some package about having shell scripts cannot build to use GBS

Configure error about C compiler

  • Check this issue now
   [   96s] checking whether make sets $(MAKE)... yes
   [   97s] checking for style of include used by make... GNU
   [   97s] checking for armv7l-unknown-linux-gnueabi-gcc... no
   [   97s] checking for gcc... gcc
   [   97s] checking whether the C compiler works... no
   [   97s] configure: error: in `/home/abuild/rpmbuild/BUILD/eio-1.7.1+svn.77392+build04':
   [   97s] configure: error: C compiler cannot create executables
   [   97s] See `config.log' for more details
   [   98s] error: Bad exit status from /var/tmp/rpm-tmp.Mv2ORs (%build)
   [   98s]
   [   98s]
   [   98s] RPM build errors:
   [   98s]     Bad exit status from /var/tmp/rpm-tmp.Mv2ORs (%build)

In case of Ubuntu 16.04, check Troubleshooting of OSDev/qemu-accel

Createrepo error

GBS is building packages in parallel and following error occurs when multiple threads are trying to modify the repomd.xml at same time after the package build. The solution is thread gets the lock on repomd.xml before writing and other threads wait for the lock to be released if the repomd.xml is in use by other thread.

Error message at building a package

   [    0s] initializing /var/lib/jenkins/jobs/GBS-local-full-build/workspace/GBS-ROOT/local/BUILD-ROOTS/scratch.armv7l.7/.srcfiles.cache ...
   [    0s] /usr/lib/build/createrpmdeps /var/lib/jenkins/jobs/GBS-local-full-build/workspace/GBS-ROOT/local/repos/tizen_2.4_release/armv7l/RPMS
   [    1s] /usr/lib/build/createrepomddeps --cachedir=/var/lib/jenkins/jobs/GBS-local-full-build/workspace/GBS-ROOT/local/cache
   [    1s] /usr/lib/build/createrepomddeps --cachedir=/var/lib/jenkins/jobs/GBS-local-full-build/workspace/GBS-ROOT/local/cache
   [    1s] Couldn't open /var/lib/jenkins/jobs/GBS-local-full-build/workspace/GBS-ROOT/local/cache/7f3d4272aa0039bb8981f303774f6f0e/repodata/repomd.xml 
   [    1s] No such file or directory at /usr/lib/build/createrepomddeps line 436.

Patch createrepomddeps

  • modify 379th line of /usr/lib/build/createrepomddeps
Befor After
   system($INC[0].'/download', $dest, $url . "repodata/repomd.xml"); 
   # File Lock
use Fcntl ':flock'; my $lock_file = $dest . '/down_repomd.lock'; open(my $lfh, '>>', $lock_file) or die "Could not open '$lock_file' - $!"; flock($lfh, LOCK_EX);
if (!-f $dest . '/repomd.xml') {
if (system($INC[0].'/download', $dest, $url . "repodata/repomd.xml")) { close($lfh) or die "Could not write '$lock_file' - $!"; die("get metadata failed\n"); } } close($lfh) or die "Could not write '$lock_file' - $!";