<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8243</bug_id>
          
          <creation_ts>2015-09-02 14:16:45 +0000</creation_ts>
          <short_desc>Busybox build fails on meta-fsl-ppc core-image-minimal using uclibc</short_desc>
          <delta_ts>2016-02-17 13:53:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>core</component>
          <version>1.9</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.0.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</reporter>
          <assigned_to name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</assigned_to>
          <cc>benjamin.esquivel</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          <qa_contact name="Valentin Hangan">valentinx.hangan</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>New (Never tested)</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>53637</commentid>
    <comment_count>0</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-09-02 14:16:45 +0000</bug_when>
    <thetext>I tried to build a core-image-minimal using uclibc for mpc8544 (verifying bug Bug 8025) and I got a known error for building busybox: 
&quot;
No such file or directory 
# include &lt;utmp.h&gt;
&quot;

Seems to be related to uClibc-0.9.33 version, which has UTMP support disabled.



Detailed log: 

powerpc-poky-linux-uclibcspe-gcc  -m32 -mcpu=8548 -mabi=spe -mspe -mfloat-gprs=double --sysroot=/home/bvoiculescu/yocto/bug8025/poky/build/tmp/sysroots/mpc8544ds -Wp,-MD,applets/.applets.o.d   -std=gnu99 -Iinclude -Ilibbb  -include include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D&quot;BB_VER=KBUILD_STR(1.23.2)&quot; -DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wdeclaration-after-statement -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types   -D&quot;KBUILD_STR(s)=#s&quot; -D&quot;KBUILD_BASENAME=KBUILD_STR(applets)&quot;  -D&quot;KBUILD_MODNAME=KBUILD_STR(applets)&quot; -c -o applets/applets.o applets/applets.c
In file included from include/busybox.h:8:0,
                 from applets/applets.c:9:
include/libbb.h:87:19: fatal error: utmp.h: No such file or directory
 # include &lt;utmp.h&gt;
                   ^
compilation terminated.
scripts/Makefile.build:197: recipe for target &apos;applets/applets.o&apos; failed
make[1]: *** [applets/applets.o] Error 1
make[1]: Leaving directory &apos;/home/bvoiculescu/yocto/bug8025/poky/build/tmp/work/ppce500v2-poky-linux-uclibcspe/busybox/1.23.2-r0/busybox-1.23.2&apos;
Makefile:372: recipe for target &apos;applets_dir&apos; failed
make: *** [applets_dir] Error 2
ERROR: oe_runmake failed
ERROR: Function failed: do_compile (log file is located at /home/bvoiculescu/yocto/bug8025/poky/build/tmp/work/ppce500v2-poky-linux-uclibcspe/busybox/1.23.2-r0/temp/log.do_compile.689)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53703</commentid>
    <comment_count>1</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2015-09-03 15:44:21 +0000</bug_when>
    <thetext>here lies the problem

busybox has 

CONFIG_FEATURE_UTMP=y

where as uclibc has 

# UCLIBC_HAS_UTMP is not set</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56444</commentid>
    <comment_count>2</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-11-12 16:39:06 +0000</bug_when>
    <thetext>A solution has been suggested by Khem, let&apos;s go ahead and patch uclibc to enable the UCLIBC_HAS_UTMP config option</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56479</commentid>
    <comment_count>3</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-11-13 23:16:42 +0000</bug_when>
    <thetext>I believe this bug is fixed with bumping busybox to 1.24 because we&apos;re lacking this patch:

http://lists.busybox.net/pipermail/busybox-cvs/2015-April/035099.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56490</commentid>
    <comment_count>4</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-16 12:39:49 +0000</bug_when>
    <thetext>We still have some issues: 
 
configure: error: Systems with UTMPX and no ut_id field in the utmp structure are not supported
Configure failed. The contents of all config.log files follows to aid debugging
WARNING: /home/yocto/yocto/BBB/8438/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-uclibceabi/shadow/4.2.1-r0/temp/run.do_configure.22507:1 exit 1 from
  exit 1
ERROR: oe_runconf failed
ERROR: Function failed: do_configure (log file is located at /home/yocto/yocto/BBB/8438/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-uclibceabi/shadow/4.2.1-r0/temp/log.do_configure.22507)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56561</commentid>
    <comment_count>5</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-11-17 19:58:37 +0000</bug_when>
    <thetext>hello Bogdan, does this mean you tried it with the patch I mentioned?

Just telling you because what I was going to do was to try the upgrade of busybox to 1.24 as I don&apos;t know what else this patch depends on</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56590</commentid>
    <comment_count>6</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-18 16:07:55 +0000</bug_when>
    <thetext>Hi Benjamin, it build the &apos;busybox&apos; now (w/o the patch), the error occurs when building &apos;shadow&apos;; after adding 
UCLIBC_HAS_UTMP=y
in 
meta/recipes-core/uclibc/uclibc-git/uClibc.distro

&apos;shadow&apos; package builds ok and errors are gone.

I will re-test from scratch using current master, then applying the patch, then adding UCLIBC_HAS_UTMP=y.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56592</commentid>
    <comment_count>7</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-18 16:16:36 +0000</bug_when>
    <thetext>- busybox build seems ok on master
- the issue moved to &apos;shadow&apos; package

&quot;| checking for struct utmp.ut_xtime... no
| checking for struct utmp.ut_tv... no
| configure: error: Systems with UTMPX and no ut_id field in the utmp structure are not supported
| Configure failed. The contents of all config.log files follows to aid debugging
| WARNING: /home/yocto/yocto/BBB/8438/build/tmp/work/ppce300c3-poky-linux-uclibc/shadow/4.2.1-r0/temp/run.do_configure.25238:1 exit 1 from
|   exit 1
| ERROR: oe_runconf failed
| ERROR: Function failed: do_configure (log file is located at /home/yocto/yocto/BBB/8438/build/tmp/work/ppce300c3-poky-linux-uclibc/shadow/4.2.1-r0/temp/log.do_configure.25238)
NOTE: recipe shadow-4.2.1-r0: task do_configure: Failed
ERROR: Task 1610 (/home/yocto/yocto/BBB/poky/meta/recipes-extended/shadow/shadow_4.2.1.bb, do_configure) failed with exit code &apos;1&apos;
NOTE: Running task 1356 of 1916 (ID: 1783, /home/yocto/yocto/BBB/poky/meta/recipes-graphics/xorg-lib/xtrans_1.3.5.bb, do_package)
NOTE: recipe gdbm-1.11-r0: task do_configure_ptest_base: Started
&quot;
Workaround/fix: 
add 
UCLIBC_HAS_UTMP=y
in 
meta/recipes-core/uclibc/uclibc-git/uClibc.distro</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56601</commentid>
    <comment_count>8</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-11-18 18:22:30 +0000</bug_when>
    <thetext>Bogdan, thanks for making the test, I believe that the shadow package is also prepared for utmpx and it could be fixed with the change proposed in contrib::besquive/shadow-utmpx:

http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=besquive/shadow-utmpx&amp;id=134beaf8391b344cfcfbd823ac89a75ed89214e9

It seems that Khem&apos;s suggestion and your test confirm that the bug is not shown with UCLIBC_HAS_UTMP=y in meta/recipes-core/uclibc/uclibc-git/uClibc.distro but this work of updating the busybox recipe will have to be done anyways and I believe it solves the bug. Plus, the person that finally updates busybox will need to undo this proposed change and go back to UTMPX</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56607</commentid>
    <comment_count>9</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-11-19 00:03:55 +0000</bug_when>
    <thetext>Hi Bogdan, I checked the --enable-utmpx option in the shadow package and it does not fix it. I&apos;m not sure of the effects of such flag in shadow but it certainly still looks out for utmp.h. Effectively, utmp.h is placed in the sysroot by setting up UCLIBC_HAS_UTMP in uclibc like you mentioned.

So, after all it looks like UCLIBC_HAS_UTMP fixes it in one single change.

It still looks like the shadow package is not prepared to use utmpx and it might be an issue of it&apos;s own.

Bogdan, if you put the patch for the UCLIBC_HAS_UTMP = y configuration I&apos;ll assign this bug to you. Let me know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56610</commentid>
    <comment_count>10</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-19 07:33:05 +0000</bug_when>
    <thetext>Thank you, Benjamin! I will fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56619</commentid>
    <comment_count>11</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-11-19 09:47:27 +0000</bug_when>
    <thetext>The commit is here:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/commit/?h=bvoiculescu/master&amp;id=3dafa6800838ed93982f6fac0bf6ce4e04d59e1b

Benjamin, please tell me if is anything more to be done from my side.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56821</commentid>
    <comment_count>12</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2015-11-26 18:09:31 +0000</bug_when>
    <thetext>http://lists.openembedded.org/pipermail/openembedded-core/2015-November/113313.html

Patch sent to the ML by Bogdan</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58394</commentid>
    <comment_count>13</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-01 17:05:21 +0000</bug_when>
    <thetext>Merged to oe-core master in 969158d63ba2c8e2e11af41c2a6d4f1aa5b0099f.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58440</commentid>
    <comment_count>14</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-02-02 12:50:23 +0000</bug_when>
    <thetext>Patch sent for jethro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59043</commentid>
    <comment_count>15</comment_count>
    <who name="Benjamin Esquivel">benjamin.esquivel</who>
    <bug_when>2016-02-15 17:23:17 +0000</bug_when>
    <thetext>Got it integrated at:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-core/uclibc/uclibc-git/uClibc.distro?id=55614076fbfd267d81ab8110a4f5c30779ac6f76</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59152</commentid>
    <comment_count>16</comment_count>
    <who name="Valentin Hangan">valentinx.hangan</who>
    <bug_when>2016-02-17 13:53:01 +0000</bug_when>
    <thetext>Used latest commit: 152914f2983c5d69001de1d46ce99547fa1e75fe and successfully built a core-image-minimal using uclib. Marking as verified</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>