Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
FYI for devs -- uClibc install notes
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
assemblerhead
n00b
n00b


Joined: 23 Jan 2016
Posts: 14
Location: TX,US

PostPosted: Sat Jan 23, 2016 1:49 am    Post subject: FYI for devs -- uClibc install notes Reply with quote

To Moderators : If this is in the wrong forum, please feel free to move it. Thanks.

The Gentoo Handbook worked, with a little add-lib.

uClibc stage3 tarballs did not have a ( locale-gen, locale.gen, /etc/env.d/02locale ) file.
I wrote a fake ( /etc/env.d/02locale ). It allowed the install to continue.
Content of file : LANG="en_US.utf8"
Added LINGUAS="en" to /etc/portage/make.conf

Do not add ( LC_LANG="C" ) to the fake file like the guide recommends.
Compiles immediately start to fail / error out, with "unable to setlocale" messages.
Installed "libiconv". Same errors continued. ( Yes, I know it was "masked". )
Reason = can't find "setlocale" / "glibc", not installed.

uClibc stage3 tarballs did not have any timezone data.
Workaround = do the "echo" step and "emerge sys-libs/timezone-data".
The localtime setup auto-corrected by Portage.

the following packages failed to compile, with path error "/usr/share/locale" && "LC_MESSAGES not found"
sys-process/cronie
sys-fs/dosfstools
media-sound/wavpack
dev-vcs/cvs
dev-libs/efivar
Note : no "USE = nls" or "USE = iconv" in "make.conf".

the following package killed the "--update --with-bdeps=y --deep @world" process after booting without the install CD.
dev-libs/pth

The ( dev-libs/pth ) package is coded to check libc ID. Only compiles against "GNU glibc", aborts on all others.
Note : no "USE = threads" or "USE = nptl" in "make.conf".
Test machine CPU AMD FX 9590. Sucked in by "USE = smp" ??

The ( GPT / UEFI / GRUB2 ) install & boot attempts all failed. Unable to install a boot-loader. ( efivar / dosfstools packages )
The ( MBR / BIOS / Lilo ) install & boot attempt worked. No boot problems.

Note : I did not write this error down so memory may be off on file names.
Constant Error, Ignored : "you should remove /lib from /etc/ld.so.conf" spam from the linker.
Constant Error, Ignored : "you should remove /usr/lib from /etc/ld.so.conf" spam from the linker.

The "pth" error was the killer. Unable to find a workaround. ( Abort, Retry, Fail? )

Hope this info helps.
Thanks for letting me "play" with it! :twisted:

PS : never run "make mrproper" on "gentoo-sources" kernel source code. BAD!!!
Back to top
View user's profile Send private message
Walter Dnes
n00b
n00b


Joined: 24 Aug 2007
Posts: 9

PostPosted: Wed Apr 27, 2016 1:35 am    Post subject: Reply with quote

Hi all;

I'm following in the previous poster's footsteps, so this seems like the logical place to post. I'm attempting to set up a uclibc system in a 32-bit QEMU VM (on my 64-bit Gentoo host). I want to eventually install it on my ancient 32-bit-only Atom netbook. Following the previous poster's instructions, I got the initial install set up and booting properly in a VM, but ran into issues.

  • As noted by assemblerhead, every invocation of "emerge" results in the warnings...
    Code:
    /sbin/ldconfig: You should remove `/lib' from `/etc/ld.so.conf'
    /sbin/ldconfig: You should remove `/usr/lib' from `/etc/ld.so.conf'

    Some Google searching indicates that this is not a problem, and can be ignored.


    • Emerging app-admin/logrotate-3.9.2...
    • Pulls in virtual/cron-0-r1...
    • Which pulls in sys-process/cronie-1.5.0 by default...
    • Which fails during the build


    However, virtual-cron can be satisfied by dcron, amongst others. So "emerge -1 dcron", followed by "emerge logrotate", is my workaround.

  • dhcpcd builds but fails to start. This would be a deal-breaker for a netbook, or any laptop. eth0 comes up, but dhcpcd fails to get an IP address. Note that static IP address works properly, which is why it is able to pull down tarballs for more ebuilds. When trying to start dhcpcd manually, the same problem happens as at bootup, i.e...
    Code:
    [g32uclibc][root][~] dhcpcd
    DUID 00:01:00:01:1e:b1:52:a7:52:54:00:12:34:56
    eth0: IAID 00:12:34:56
    eth0: soliciting a DHCP lease
    eth0: if_sendrawpacket: Invalid argument
    timed out
    forked to background, child pid 15949


What makes things hopeless is that almost all of xorg-server builds, but x11-drivers/xf86-input-keyboard-1.8.1 and x11-drivers/xf86-video-intel-2.99.917-r2 fail to build. For text browsing, www-client/w3m fails to build. links is not really usable.
_________________
I'm not repeating myself
I'm an X Window user
I'm an ex-Windows user
Back to top
View user's profile Send private message
Walter Dnes
n00b
n00b


Joined: 24 Aug 2007
Posts: 9

PostPosted: Fri Apr 29, 2016 1:55 am    Post subject: Reply with quote

Walter Dnes wrote:
What makes things hopeless is that almost all of xorg-server builds, but x11-drivers/xf86-input-keyboard-1.8.1 and x11-drivers/xf86-video-intel-2.99.917-r2 fail to build. For text browsing, www-client/w3m fails to build. links is not really usable.

More progress. I now have X Window running under ICEWM. The following changes were required in make.conf...

  • INPUT_DEVICES="evdev"
  • VIDEO_CARDS="vesa fbdev"
  • enable the "udev" flag globally

After making the above changes, execute...
Code:
emerge --changed-use --deep @world

Handling input via "evdev" removes the need for the "xf86-input-keyboard" build. Unlike xf86-video-intel, the fbdev and VESA drivers build properly under uclibc. Note that I'm running "eudev", which demonstrates its compatability with "udev".
_________________
I'm not repeating myself
I'm an X Window user
I'm an ex-Windows user
Back to top
View user's profile Send private message
assemblerhead
n00b
n00b


Joined: 23 Jan 2016
Posts: 14
Location: TX,US

PostPosted: Fri Apr 29, 2016 4:30 pm    Post subject: Thanks Reply with quote

Thank you for updating this forum thread with new info.

Very helpful for those that STFW first. :D
Back to top
View user's profile Send private message
Walter Dnes
n00b
n00b


Joined: 24 Aug 2007
Posts: 9

PostPosted: Sun May 01, 2016 5:39 am    Post subject: Reply with quote

Another day, another problem solved. To start up dhcp at bootup, you need to do 2 things...

  1. emerge net-misc/dhcp
    This provides /sbin/dhclient

  2. The file /etc/conf.d/net should read similar to...

    config_eth0="dhclient"

    Replace "eth0" with whatever the actual interface name is.

_________________
I'm not repeating myself
I'm an X Window user
I'm an ex-Windows user
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun May 01, 2016 10:32 am    Post subject: Reply with quote

Walter Dnes wrote:
Another day, another problem solved. To start up dhcp at bootup, you need to do 2 things...

Walter ... as you're using uClibc, and as dhcpcd has issues, then why not use udhcpd. As part of busybox (so installed as part of @sysetm) it will have had been built/run numerious occasions on uClibc due to busybox being the de facto "swiss-army-knife" for embeded.

I recently attempted a uclibc-hardened install, but wasn't able to get networking functioning within the chroot, and so gave up and am currently building a musl based system.

best ... khay
Back to top
View user's profile Send private message
Walter Dnes
n00b
n00b


Joined: 24 Aug 2007
Posts: 9

PostPosted: Sun May 01, 2016 9:24 pm    Post subject: Reply with quote

khayyam wrote:
Walter ... as you're using uClibc, and as dhcpcd has issues, then why not use udhcpd. As part of busybox (so installed as part of @sysetm) it will have had been built/run numerious occasions on uClibc due to busybox being the de facto "swiss-army-knife" for embeded.

I tried both udhcpc and udhcpcd, but it doesn't work. BTW, the busybox-1.23.1-r1 that comes with the uclibc install image is no longer in the tree. But newer versions are hard-masked for uclibc, because of problems in uclibc. See https://bugs.gentoo.org/show_bug.cgi?id=567598

In the bug comments, Anthony Basile mentions his frustration with uclibc, and that he's working on switching the Gentoo uclibc stages over to the uclibc-ng fork.
_________________
I'm not repeating myself
I'm an X Window user
I'm an ex-Windows user
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Sun May 01, 2016 11:16 pm    Post subject: Reply with quote

Walter Dnes wrote:
khayyam wrote:
Walter ... as you're using uClibc, and as dhcpcd has issues, then why not use udhcpd. As part of busybox (so installed as part of @sysetm) it will have had been built/run numerious occasions on uClibc due to busybox being the de facto "swiss-army-knife" for embeded.

I tried both udhcpc and udhcpcd, but it doesn't work. BTW, the busybox-1.23.1-r1 that comes with the uclibc install image is no longer in the tree. But newer versions are hard-masked for uclibc, because of problems in uclibc. See https://bugs.gentoo.org/show_bug.cgi?id=567598

Walter ... I see, well, the busybox-1.23.1-r1.ebuild can still be in found in the attic. From the above bug it seems the issue with more recent version is the lack of syncfs() so you may get it to build by using savedconfig and setting CONFIG_SYNC=n.

Walter Dnes wrote:
In the bug comments, Anthony Basile mentions his frustration with uclibc, and that he's working on switching the Gentoo uclibc stages over to the uclibc-ng fork.

I've been following Anthony's blog for some time, and that's partly why I went with musl (even though it's "experimental" and "for masochists"), its been a struggle but I have most of the stuff I need built, and some bug reports, patches, etc, to push. It probably sounds worse than it actually is, the musl overlay seems to have most stuff patched, and so mostly what I've been hitting are corner cases.

best ... khay
Back to top
View user's profile Send private message
Walter Dnes
n00b
n00b


Joined: 24 Aug 2007
Posts: 9

PostPosted: Mon May 02, 2016 2:30 am    Post subject: Reply with quote

khayyam wrote:
Walter Dnes wrote:
In the bug comments, Anthony Basile mentions his frustration with uclibc, and that he's working on switching the Gentoo uclibc stages over to the uclibc-ng fork.

I've been following Anthony's blog for some time, and that's partly why I went with musl (even though it's "experimental" and "for masochists"), its been a struggle but I have most of the stuff I need built, and some bug reports, patches, etc, to push. It probably sounds worse than it actually is, the musl overlay seems to have most stuff patched, and so mostly what I've been hitting are corner cases.

best ... khay

IANAP, I Am Not A Programmer, let alone a developer. "Power User" is more accurate, although even that might be too much. I'm OK with beta-testing somebody else's uclibc-ng or musl "Stage 3" Gentoo experimental release. Going off on my own is beyond me.
_________________
I'm not repeating myself
I'm an X Window user
I'm an ex-Windows user
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum