Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
lxc does not compile in embedded chroot
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
OnlyTux
Apprentice
Apprentice


Joined: 15 Mar 2007
Posts: 174

PostPosted: Mon Aug 23, 2010 11:42 pm    Post subject: lxc does not compile in embedded chroot Reply with quote

Hello,

I am merrily toying with some of Gentoo's unique features.
I had some spare time so I had fun in building a very minimal, working embedded system with uClibc (boot, login, shutdown, network, very basic things) by using these stages.

Then I tried to install lxc in this system to play with Linux Containers, too. Everything worked fine until the last package, i.e. lxc.

I do not know if it is my fault, or if lxc cannot compile with uClibc. I know I am using non-official stages and lxc is still masked, too.

Anyway, I post these informations in case someone finds them interesting, or can point me to a solution.

My emerge --info:
Code:
Portage 2.1.8.3 (uclibc/x86, gcc-4.1.2, uclibc-0.9.30.1-r1, 2.6.34-gentoo-r1 i686)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.34-gentoo-r1-i686-AMD_Hammer_Family_processor_-_Model_Unknown-with-gentoo-2.0.1
Timestamp of tree: Mon, 23 Aug 2010 16:30:01 +0000
app-shells/bash:     4.1_p7
dev-lang/python:     2.4.4-r6, 2.6.5-r3, 3.1.2-r4
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.2
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.65-r1
sys-devel/automake:  1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.1.2, 4.4.4-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.34
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i386-gentoo-linux-uclibc"
CFLAGS="-Os -mtune=i386 -pipe"
CHOST="i386-gentoo-linux-uclibc"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-Os -mtune=i386 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests autoconfig distlocks fixpackages news nodoc noinfo noman parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="it_IT@euro"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="cli crypt cxx dri modules mudflap ncurses openmp pam pcre perl python readline reflection session sha512 spl ssl tcpd uclibc x86 xorg zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="uclibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" RUBY_TARGETS="ruby18" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

This is instead lxc's build log:
Code:
 * CPV:  app-emulation/lxc-0.7.2-r1
 * REPO: gentoo
 * USE:  elibc_uclibc kernel_linux userland_GNU x86
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /mounted3/usr/src/linux
 * Found sources for kernel version:
 *     2.6.35-gentoo-r2
 * Checking for suitable kernel configuration options...                  [ ok ]
>>> Unpacking source...
>>> Unpacking lxc-0.7.2.tar.gz to /var/tmp/portage/app-emulation/lxc-0.7.2-r1/work
>>> Source unpacked in /var/tmp/portage/app-emulation/lxc-0.7.2-r1/work
>>> Preparing source in /var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2 ...
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2 ...
 * econf: updating lxc-0.7.2/config/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating lxc-0.7.2/config/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=i386-gentoo-linux-uclibc --host=i386-gentoo-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --localstatedir=/var --bindir=/usr/sbin --docdir=/usr/share/doc/lxc-0.7.2-r1 --with-config-path=/etc/lxc --disable-doc --disable-examples
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i386-gentoo-linux-uclibc
checking host system type... i386-gentoo-linux-uclibc
checking for style of include used by make... GNU
checking for i386-gentoo-linux-uclibc-gcc... i386-gentoo-linux-uclibc-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i386-gentoo-linux-uclibc-gcc accepts -g... yes
checking for i386-gentoo-linux-uclibc-gcc option to accept ISO C89... none needed
checking dependency style of i386-gentoo-linux-uclibc-gcc... gcc3
checking whether i386-gentoo-linux-uclibc-gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... i386-gentoo-linux-uclibc-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for setcap... yes
checking for linux/netlink.h... yes
checking for linux/genetlink.h... yes
checking for sys/capability.h... yes
checking for cap_set_proc in -lcap... yes
checking linux capabilities... -lcap
checking whether PR_CAPBSET_DROP is declared... yes
checking sys/signalfd.h usability... yes
checking sys/signalfd.h presence... yes
checking for sys/signalfd.h... yes
checking whether i386-gentoo-linux-uclibc-gcc needs -traditional... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lxc.pc
config.status: creating lxc.spec
config.status: creating config/Makefile
config.status: creating doc/Makefile
config.status: creating doc/lxc-create.sgml
config.status: creating doc/lxc-destroy.sgml
config.status: creating doc/lxc-execute.sgml
config.status: creating doc/lxc-start.sgml
config.status: creating doc/lxc-checkpoint.sgml
config.status: creating doc/lxc-restart.sgml
config.status: creating doc/lxc-stop.sgml
config.status: creating doc/lxc-console.sgml
config.status: creating doc/lxc-freeze.sgml
config.status: creating doc/lxc-unfreeze.sgml
config.status: creating doc/lxc-monitor.sgml
config.status: creating doc/lxc-wait.sgml
config.status: creating doc/lxc-ls.sgml
config.status: creating doc/lxc-ps.sgml
config.status: creating doc/lxc-cgroup.sgml
config.status: creating doc/lxc-kill.sgml
config.status: creating doc/lxc.conf.sgml
config.status: creating doc/lxc.sgml
config.status: creating doc/common_options.sgml
config.status: creating doc/see_also.sgml
config.status: creating doc/rootfs/Makefile
config.status: creating doc/examples/Makefile
config.status: creating doc/examples/lxc-macvlan.conf
config.status: creating doc/examples/lxc-vlan.conf
config.status: creating doc/examples/lxc-no-netns.conf
config.status: creating doc/examples/lxc-empty-netns.conf
config.status: creating doc/examples/lxc-phys.conf
config.status: creating doc/examples/lxc-veth.conf
config.status: creating doc/examples/lxc-complex.conf
config.status: creating templates/Makefile
config.status: creating templates/lxc-debian
config.status: creating templates/lxc-ubuntu
config.status: creating templates/lxc-busybox
config.status: creating templates/lxc-fedora
config.status: creating templates/lxc-sshd
config.status: creating src/Makefile
config.status: creating src/lxc/Makefile
config.status: creating src/lxc/lxc-ps
config.status: creating src/lxc/lxc-ls
config.status: creating src/lxc/lxc-netstat
config.status: creating src/lxc/lxc-checkconfig
config.status: creating src/lxc/lxc-setcap
config.status: creating src/lxc/lxc-setuid
config.status: creating src/lxc/lxc-version
config.status: creating src/lxc/lxc-create
config.status: creating src/lxc/lxc-destroy
config.status: creating src/config.h
config.status: executing depfiles commands
config.status: executing default commands
configure:

Advice:
-------

If you wish to have a non root user to use the lxc tools,
you can add the needed capabilities to the tools by invoking
the 'lxc-setcap' script. To remove the capabilities, use
'lxc-setcap -d'.

>>> Source configured.
>>> Compiling source in /var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2 ...
make -j2
Making all in src
make[1]: Entering directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src'
make  all-recursive
make[2]: Entering directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src'
Making all in lxc
make[3]: Entering directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src/lxc'
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -I../../src -Os -mtune=i386 -pipe -Wall -MT lxc_attach.o -MD -MP -MF .deps/lxc_attach.Tpo -c -o lxc_attach.o lxc_attach.c
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-arguments.o -MD -MP -MF .deps/liblxc_so-arguments.Tpo -c -o liblxc_so-arguments.o `test -f 'arguments.c' || echo './'`arguments.c
mv -f .deps/liblxc_so-arguments.Tpo .deps/liblxc_so-arguments.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-commands.o -MD -MP -MF .deps/liblxc_so-commands.Tpo -c -o liblxc_so-commands.o `test -f 'commands.c' || echo './'`commands.c
mv -f .deps/lxc_attach.Tpo .deps/lxc_attach.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-start.o -MD -MP -MF .deps/liblxc_so-start.Tpo -c -o liblxc_so-start.o `test -f 'start.c' || echo './'`start.c
mv -f .deps/liblxc_so-commands.Tpo .deps/liblxc_so-commands.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-stop.o -MD -MP -MF .deps/liblxc_so-stop.Tpo -c -o liblxc_so-stop.o `test -f 'stop.c' || echo './'`stop.c
mv -f .deps/liblxc_so-stop.Tpo .deps/liblxc_so-stop.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-monitor.o -MD -MP -MF .deps/liblxc_so-monitor.Tpo -c -o liblxc_so-monitor.o `test -f 'monitor.c' || echo './'`monitor.c
mv -f .deps/liblxc_so-start.Tpo .deps/liblxc_so-start.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-console.o -MD -MP -MF .deps/liblxc_so-console.Tpo -c -o liblxc_so-console.o `test -f 'console.c' || echo './'`console.c
mv -f .deps/liblxc_so-monitor.Tpo .deps/liblxc_so-monitor.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-freezer.o -MD -MP -MF .deps/liblxc_so-freezer.Tpo -c -o liblxc_so-freezer.o `test -f 'freezer.c' || echo './'`freezer.c
mv -f .deps/liblxc_so-freezer.Tpo .deps/liblxc_so-freezer.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-checkpoint.o -MD -MP -MF .deps/liblxc_so-checkpoint.Tpo -c -o liblxc_so-checkpoint.o `test -f 'checkpoint.c' || echo './'`checkpoint.c
mv -f .deps/liblxc_so-checkpoint.Tpo .deps/liblxc_so-checkpoint.Po
mv -f .deps/liblxc_so-console.Tpo .deps/liblxc_so-console.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-restart.o -MD -MP -MF .deps/liblxc_so-restart.Tpo -c -o liblxc_so-restart.o `test -f 'restart.c' || echo './'`restart.c
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-error.o -MD -MP -MF .deps/liblxc_so-error.Tpo -c -o liblxc_so-error.o `test -f 'error.c' || echo './'`error.c
mv -f .deps/liblxc_so-error.Tpo .deps/liblxc_so-error.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-parse.o -MD -MP -MF .deps/liblxc_so-parse.Tpo -c -o liblxc_so-parse.o `test -f 'parse.c' || echo './'`parse.c
mv -f .deps/liblxc_so-restart.Tpo .deps/liblxc_so-restart.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-cgroup.o -MD -MP -MF .deps/liblxc_so-cgroup.Tpo -c -o liblxc_so-cgroup.o `test -f 'cgroup.c' || echo './'`cgroup.c
mv -f .deps/liblxc_so-parse.Tpo .deps/liblxc_so-parse.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-utils.o -MD -MP -MF .deps/liblxc_so-utils.Tpo -c -o liblxc_so-utils.o `test -f 'utils.c' || echo './'`utils.c
mv -f .deps/liblxc_so-cgroup.Tpo .deps/liblxc_so-cgroup.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-sync.o -MD -MP -MF .deps/liblxc_so-sync.Tpo -c -o liblxc_so-sync.o `test -f 'sync.c' || echo './'`sync.c
mv -f .deps/liblxc_so-sync.Tpo .deps/liblxc_so-sync.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-namespace.o -MD -MP -MF .deps/liblxc_so-namespace.Tpo -c -o liblxc_so-namespace.o `test -f 'namespace.c' || echo './'`namespace.c
mv -f .deps/liblxc_so-utils.Tpo .deps/liblxc_so-utils.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-conf.o -MD -MP -MF .deps/liblxc_so-conf.Tpo -c -o liblxc_so-conf.o `test -f 'conf.c' || echo './'`conf.c
mv -f .deps/liblxc_so-namespace.Tpo .deps/liblxc_so-namespace.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-confile.o -MD -MP -MF .deps/liblxc_so-confile.Tpo -c -o liblxc_so-confile.o `test -f 'confile.c' || echo './'`confile.c
mv -f .deps/liblxc_so-confile.Tpo .deps/liblxc_so-confile.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-state.o -MD -MP -MF .deps/liblxc_so-state.Tpo -c -o liblxc_so-state.o `test -f 'state.c' || echo './'`state.c
mv -f .deps/liblxc_so-state.Tpo .deps/liblxc_so-state.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-log.o -MD -MP -MF .deps/liblxc_so-log.Tpo -c -o liblxc_so-log.o `test -f 'log.c' || echo './'`log.c
mv -f .deps/liblxc_so-conf.Tpo .deps/liblxc_so-conf.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-network.o -MD -MP -MF .deps/liblxc_so-network.Tpo -c -o liblxc_so-network.o `test -f 'network.c' || echo './'`network.c
mv -f .deps/liblxc_so-log.Tpo .deps/liblxc_so-log.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-nl.o -MD -MP -MF .deps/liblxc_so-nl.Tpo -c -o liblxc_so-nl.o `test -f 'nl.c' || echo './'`nl.c
mv -f .deps/liblxc_so-nl.Tpo .deps/liblxc_so-nl.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-rtnl.o -MD -MP -MF .deps/liblxc_so-rtnl.Tpo -c -o liblxc_so-rtnl.o `test -f 'rtnl.c' || echo './'`rtnl.c
mv -f .deps/liblxc_so-network.Tpo .deps/liblxc_so-network.Po
mv -f .deps/liblxc_so-rtnl.Tpo .deps/liblxc_so-rtnl.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-genl.o -MD -MP -MF .deps/liblxc_so-genl.Tpo -c -o liblxc_so-genl.o `test -f 'genl.c' || echo './'`genl.c
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-caps.o -MD -MP -MF .deps/liblxc_so-caps.Tpo -c -o liblxc_so-caps.o `test -f 'caps.c' || echo './'`caps.c
mv -f .deps/liblxc_so-genl.Tpo .deps/liblxc_so-genl.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-mainloop.o -MD -MP -MF .deps/liblxc_so-mainloop.Tpo -c -o liblxc_so-mainloop.o `test -f 'mainloop.c' || echo './'`mainloop.c
mv -f .deps/liblxc_so-caps.Tpo .deps/liblxc_so-caps.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-af_unix.o -MD -MP -MF .deps/liblxc_so-af_unix.Tpo -c -o liblxc_so-af_unix.o `test -f 'af_unix.c' || echo './'`af_unix.c
mv -f .deps/liblxc_so-mainloop.Tpo .deps/liblxc_so-mainloop.Po
i386-gentoo-linux-uclibc-gcc -DHAVE_CONFIG_H -I. -I../../src    -fPIC -DPIC -I../../src -Os -mtune=i386 -pipe -Wall -MT liblxc_so-utmp.o -MD -MP -MF .deps/liblxc_so-utmp.Tpo -c -o liblxc_so-utmp.o `test -f 'utmp.c' || echo './'`utmp.c
utmp.c:32:25: error: sys/timerfd.h: No such file or directory
utmp.c:41:19: error: utmpx.h: No such file or directory
utmp.c: In function 'utmp_get_runlevel':
utmp.c:172: warning: implicit declaration of function 'utmpxname'
utmp.c:177: warning: implicit declaration of function 'setutxent'
utmp.c:179: warning: implicit declaration of function 'getutxent'
utmp.c:179: warning: assignment makes pointer from integer without a cast
utmp.c:181: error: dereferencing pointer to incomplete type
utmp.c:181: error: 'RUN_LVL' undeclared (first use in this function)
utmp.c:181: error: (Each undeclared identifier is reported only once
utmp.c:181: error: for each function it appears in.)
utmp.c:182: error: dereferencing pointer to incomplete type
utmp.c:183: error: dereferencing pointer to incomplete type
utmp.c:190: warning: implicit declaration of function 'endutxent'
utmp.c: In function 'lxc_utmp_add_timer':
utmp.c:326: warning: implicit declaration of function 'timerfd_create'
utmp.c:326: error: 'TFD_NONBLOCK' undeclared (first use in this function)
utmp.c:326: error: 'TFD_CLOEXEC' undeclared (first use in this function)
utmp.c:341: warning: implicit declaration of function 'timerfd_settime'
make[3]: *** [liblxc_so-utmp.o] Error 1
make[3]: *** Waiting for unfinished jobs....
mv -f .deps/liblxc_so-af_unix.Tpo .deps/liblxc_so-af_unix.Po
make[3]: Leaving directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src/lxc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2/src'
make: *** [all-recursive] Error 1
 * ERROR: app-emulation/lxc-0.7.2-r1 failed:
 *   died running emake, base_src_make
 *
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 3224:  Called base_src_compile
 *   environment, line  340:  Called base_src_make
 *   environment, line  378:  Called die
 * The specific snippet of code:
 *           emake "$@" || die "died running emake, $FUNCNAME";
 *
 * If you need support, post the output of 'emerge --info =app-emulation/lxc-0.7.2-r1',
 * the complete build log and the output of 'emerge -pqv =app-emulation/lxc-0.7.2-r1'.
 * The complete build log is located at '/var/tmp/portage/app-emulation/lxc-0.7.2-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-emulation/lxc-0.7.2-r1/temp/environment'.
 * S: '/var/tmp/portage/app-emulation/lxc-0.7.2-r1/work/lxc-0.7.2'

Unfortunately my lack of experience is such that I can only guess some libraries are missing.
If mine was a definitely crazy attempt, then I apologize. :-)

Thanks in advance for any suggestions.
_________________
ANTONIO: How every fool can play upon the world! I think the best grace of wit will shortly turn into silence, and discourse grow commendable in none only but parrots...

Shakespeare, The Merchant of Venice
Back to top
View user's profile Send private message
MassimoM
n00b
n00b


Joined: 03 May 2008
Posts: 14
Location: Italy

PostPosted: Tue Aug 24, 2010 11:30 pm    Post subject: Re: lxc does not compile in embedded chroot Reply with quote

The problem is here:
OnlyTux wrote:

utmp.c:32:25: error: sys/timerfd.h: No such file or directory
utmp.c:41:19: error: utmpx.h: No such file or directory


On my system, those files are owned by glibc.
So, on your system, those should be provided by uClibc, but evidently they aren't.
Searching on glibc GIT, I saw that timerfd.h was committed on 2009-09 (http://git.uclibc.org/uClibc/commit/?id=cdeb75380c910f22b1c8d42defca5946fd594d75)
If your libc in newer, try to look around for it and symlink it in an appropriate position.If it is older, upgrade!
But for utmpx.h, looks like it's unsupported on libc, therefore you can't get lxc working un uClibc. At least, not without heavy changes in lxc code or implementing missing functions on uClibc.
Happy experimenting!

How was your first impression with lxc?
Back to top
View user's profile Send private message
OnlyTux
Apprentice
Apprentice


Joined: 15 Mar 2007
Posts: 174

PostPosted: Wed Aug 25, 2010 1:40 am    Post subject: Reply with quote

MassimoM, thanks for your answer.

The stage I downloaded uses ~arch but the latest uClibc ebuild available in portage is version 0.9.30.1-r1, which was released upstream around April 2009, if I am not mistaken. So, as for timerfd.h, it could be only a problem of ebuild oldness.

Anyway, since I am playing with a spare machine running a "normal" stable desktop profile as its basis, I copied the two missing files from the base system to the chroot. Obviously, other errors appear which make me think that lxc was not thought to work with uClibc.

As for LXC, well I never used it before, but I know OpenVZ and was excited at reading flameeyes' accounts about LXC through his blog. Since OpenVZ's stages are compatible with LXC, I decided to give it a try.
I just pushed too many new things at once without being aware of what I was doing. I am studying C too, but the road is long and time is short, so I have no expertise to understand at first sight which headers belong to which packages yet.

I will invent something else to test this working embedded system with and will try LXC on a standard Gentoo installation, then I will tell about my impressions about it soon.

Thanks again.
Kind regards.
_________________
ANTONIO: How every fool can play upon the world! I think the best grace of wit will shortly turn into silence, and discourse grow commendable in none only but parrots...

Shakespeare, The Merchant of Venice
Back to top
View user's profile Send private message
MassimoM
n00b
n00b


Joined: 03 May 2008
Posts: 14
Location: Italy

PostPosted: Wed Aug 25, 2010 8:54 am    Post subject: Reply with quote

To understand which header belongs to which package, use qfile!
As you're studying C, I tell you that in your try there's a big conceptual error:
As you should know, in header files there are function prototypes.
In .C files there's function code.
When you build a library, you compile .c file.
To link another program (lxc) to the library (libc, doesn't matter if glibc or uClibc) you need to include the header file to let the compiler know which functions are available.
If you copy only the header file from another library (glibc), or a newer uClibc than the one that's effectively installed, you give the compiler a false information.
The next step after compilation, linking (ldd) , is going to fail with "unresolved symbols":
The compiler (with prototypes from the copied header file) created an object file with a reference to a function which doesn't exist in the library, and so the linker doesn't find them. And it obviously fails.
Back to top
View user's profile Send private message
judepereira
Apprentice
Apprentice


Joined: 19 Jan 2008
Posts: 179
Location: Portage, yes, somewhere out there

PostPosted: Wed Aug 25, 2010 10:53 am    Post subject: Reply with quote

Hello, update the stage3, and also comment the line INSTALL_MASK in my make.conf, that line contains *.h so it will obviously remove all headers, re-emerge uclibc then.
Code:
emerge -avuDN world

_________________
Jude Pereira
(http://judepereira.com)
Back to top
View user's profile Send private message
OnlyTux
Apprentice
Apprentice


Joined: 15 Mar 2007
Posts: 174

PostPosted: Wed Aug 25, 2010 2:02 pm    Post subject: Reply with quote

@MassimoM,
thank you very much for your help and for your explaination. I knew that a first reading of K&R2 was far from enough. Unfortunately I just can build my first simple examples/exercises... :oops:

@judepereira,
thank you too for your interest.

I had previously commented the INSTALL_MASK line, so the problem does not lie there.
I have just finished updating your embedded stage's world. Apart from an inconvenient with the latest busybox 1.17.1-r1 (quick and dirty, just masked it), it gave no problems.
However, emerging lxc presents again the same missing libraries. After all, LXC's integration in the official kernel is recent while the uClibc provided by portage is a bit old...

Apart from my insane attempts, your embedded stages work very well. I will try to make something useful and more well-advised with them.

Thank you very much for your stages.

Kind regards.
_________________
ANTONIO: How every fool can play upon the world! I think the best grace of wit will shortly turn into silence, and discourse grow commendable in none only but parrots...

Shakespeare, The Merchant of Venice
Back to top
View user's profile Send private message
judepereira
Apprentice
Apprentice


Joined: 19 Jan 2008
Posts: 179
Location: Portage, yes, somewhere out there

PostPosted: Thu Aug 26, 2010 2:38 am    Post subject: Reply with quote

That's weird, maybe wait for sometime when the uClibc ebuild gets updated.

One interesting application of the stage3 is to make a download server and run it on an embedded machine, that's what got me making my stage3, i have it all under 12M, and runs just fine :)

Cheers
_________________
Jude Pereira
(http://judepereira.com)
Back to top
View user's profile Send private message
OnlyTux
Apprentice
Apprentice


Joined: 15 Mar 2007
Posts: 174

PostPosted: Thu Aug 26, 2010 8:09 pm    Post subject: Reply with quote

Thank you for your suggestion.

I have tried to emerge mldonkey, but it does not compile. This is the build log with ocaml 3.10.2:
Code:
# cat /var/tmp/portage/net-p2p/mldonkey-3.0.0/temp/build.log
 * CPV:  net-p2p/mldonkey-3.0.0
 * REPO: gentoo
 * USE:  elibc_uclibc kernel_linux ocamlopt userland_GNU x86
>>> Unpacking source...
>>> Unpacking mldonkey-3.0.0.tar.bz2 to /var/tmp/portage/net-p2p/mldonkey-3.0.0/work
>>> Source unpacked in /var/tmp/portage/net-p2p/mldonkey-3.0.0/work
>>> Preparing source in /var/tmp/portage/net-p2p/mldonkey-3.0.0/work/mldonkey-3.0.0 ...
 * Running autoconf ...                                                   [ ok ]
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/net-p2p/mldonkey-3.0.0/work/mldonkey-3.0.0 ...
 * econf: updating mldonkey-3.0.0/config/config.sub with /usr/share/gnuconfig/config.sub
 * econf: updating mldonkey-3.0.0/config/config.guess with /usr/share/gnuconfig/config.guess
./configure --prefix=/usr --build=i386-gentoo-linux-uclibc --host=i386-gentoo-linux-uclibc --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --sysconfdir=/etc/mldonkey --sharedstatedir=/var/mldonkey --localstatedir=/var/mldonkey --enable-checks --disable-batch --disable-fasttrack --disable-gnutella --disable-gnutella2 --disable-gd --disable-magic --enable-ocamlver=3.10 --disable-gui
Arguments to configure:  '--prefix=/usr' '--build=i386-gentoo-linux-uclibc' '--host=i386-gentoo-linux-uclibc' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--sysconfdir=/etc/mldonkey' '--sharedstatedir=/var/mldonkey' '--localstatedir=/var/mldonkey' '--enable-checks' '--disable-batch' '--disable-fasttrack' '--disable-gnutella' '--disable-gnutella2' '--disable-gd' '--disable-magic' '--enable-ocamlver=3.10' '--disable-gui' 'build_alias=i386-gentoo-linux-uclibc' 'host_alias=i386-gentoo-linux-uclibc' 'CFLAGS=-Os -mtune=i386 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed' 'CXXFLAGS=-Os -mtune=i386 -pipe'
checking for i386-gentoo-linux-uclibc-gcc... i386-gentoo-linux-uclibc-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i386-gentoo-linux-uclibc-gcc accepts -g... yes
checking for i386-gentoo-linux-uclibc-gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... i386-gentoo-linux-uclibc-gcc -E
checking build system type... i386-gentoo-linux-uclibc
checking host system type... i386-gentoo-linux-uclibc

--------------------------------
     Checking system tools.
--------------------------------
checking for i386-gentoo-linux-uclibc-ranlib... i386-gentoo-linux-uclibc-ranlib
checking for gmake... gmake
checking for make... (cached) gmake
checking if gmake is GNU make ... yes
checking for bzip2... bzip2
checking for gzip... (cached) bzip2
checking for perl... /usr/bin/perl
checking for rpmbuild... no
checking for rpm... no
checking for wget... wget
----------------------------------------
     Checking system tools finished.
----------------------------------------

--------------------------------
     Checking Ocaml compiler.
--------------------------------
checking for ocamlc.opt... /usr/bin/ocamlc.opt
checking for i386-gentoo-linux-uclibc-ocamlc... /usr/bin/ocamlc.opt
checking for camlp4... /usr/bin/camlp4
checking for ocamlopt.opt... ocamlopt.opt
checking for ocamlopt... (cached) ocamlopt.opt
checking for ocamldep... ocamldep
checking for ocamllex.opt... ocamllex.opt
checking for ocamllex... (cached) ocamllex.opt
checking for ocamlyacc... ocamlyacc
checking for ocamldoc... ocamldoc
checking for ocamlmktop... ocamlmktop
checking for camlp4... /usr/bin/camlp4
-------------------------------------------
     Checking Ocaml 3.10.2 finished.
-------------------------------------------

----------------------------------
     Checking system headers.
----------------------------------
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... 64
checking for setrlimit... yes
checking for getrlimit... yes
checking for strerror_r... yes
checking for strerror... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking byteswap.h usability... yes
checking byteswap.h presence... yes
checking for byteswap.h... yes
checking sys/utsname.h usability... yes
checking sys/utsname.h presence... yes
checking for sys/utsname.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking for sys/types.h... (cached) yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for netinet/in_systm.h... yes
checking for netinet/in.h... yes
checking for netinet/ip.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking for poll... yes
checking sys/vfs.h usability... yes
checking sys/vfs.h presence... yes
checking for sys/vfs.h... yes
checking sys/statvfs.h usability... yes
checking sys/statvfs.h presence... yes
checking for sys/statvfs.h... yes
checking for sys/param.h... yes
checking for sys/mount.h... yes
-------------------------------------------
     Checking system headers finished.
-------------------------------------------

-----------------------------------
     Checking system libraries.
-----------------------------------
----- checking zlib (required)
checking for inflate in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for zlibVersion in -lz... yes
----- checking bzlib (optional)
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for BZ2_bzReadOpen in -lbz2... yes
checking for BZ2_bzlibVersion in -lbz2... yes
configure: libmagic not available
----- checking iconv (optional)
checking for ld used by GCC... /usr/i386-gentoo-linux-uclibc/bin/ld
checking if the linker (/usr/i386-gentoo-linux-uclibc/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for iconv... no, consider installing GNU libiconv
----- checking thread support (optional, strongly advised)
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for cc_r... i386-gentoo-linux-uclibc-gcc
----- GNU C Library version
checking linux/limits.h usability... yes
checking linux/limits.h presence... yes
checking for linux/limits.h... yes
checking gnu/libc-version.h usability... no
checking gnu/libc-version.h presence... no
checking for gnu/libc-version.h... no
---------------------------------------------
     Checking system libraries finished.
---------------------------------------------

--------------------------------------
     Checking activated networks.
--------------------------------------
checking eDonkey... yes
checking for i386-gentoo-linux-uclibc-g++... i386-gentoo-linux-uclibc-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i386-gentoo-linux-uclibc-g++ accepts -g... yes
checking for i386-gentoo-linux-uclibc-i386-gentoo-linux-uclibc-g++... no
checking for i386-gentoo-linux-uclibc-g++... i386-gentoo-linux-uclibc-g++
checking eMule SUI... yes
checking whether i386-gentoo-linux-uclibc-g++ accepts -fno-omit-frame-pointer... yes
checking whether i386-gentoo-linux-uclibc-g++ accepts -mno-omit-leaf-frame-pointer... yes
checking BitTorrent... yes
checking FileTP... yes
checking DirectConnect... yes
-----------------------------------------------
     Checking activated networks finished.
-----------------------------------------------
configure: creating ./config.status
config.status: creating Makefile.config
config.status: creating mldonkey.rc
config.status: creating ../src/utils/lib/autoconf.ml.new
config.status: creating ../src/utils/lib/gAutoconf.ml.new
config.status: creating ../src/utils/lib/magic.ml
config.status: creating ../src/networks/donkey/donkeySui.ml
config.status: creating ../src/daemon/driver/driverGraphics.ml
config.status: creating ../packages/rpm/mldonkey.spec
config.status: creating ../packages/rpm/Makefile
config.status: creating ../packages/slackware/mldonkey.options
config.status: creating config.h

Building dependencies (if it blocks, try 'gmake depend' to see the problem)
Building dependencies fails: try: 'gmake depend'

Configuring MLDonkey 3.0.0 completed.

Network modules:
 - eDonkey           enabled (eMule SUI enabled)
 - BitTorrent        enabled
 - FileTP (aka wget) enabled
 - Fasttrack                 disabled
 - Gnutella                  disabled - unmaintained
 - Gnutella2                 disabled - unmaintained
 - Direct Connect    enabled
 - Open Napster              disabled - currently not usable
 - Soulseek                  disabled - currently not usable
 - OpenFT                    disabled - currently not usable

Core features:
 - zlib (required)   enabled
 - threads           enabled
 - bzip2             enabled
 - iconv                     disabled
 - libmagic                  disabled
 - graphical stats           disabled

Compilers:
 - Ocaml version     3.10.2
 - i386-gentoo-linux-uclibc-gcc version       4.1.2
 - i386-gentoo-linux-uclibc-g++ version       4.1.2

Now execute 'gmake' to start compiling. Good luck!

To compile a static code execute:     gmake mlnet.static
To produce a release tarball execute: gmake release.mlnet.static
To clean the build directory execute: gmake maintainerclean

Compiling CryptoPP.cc can take several minutes, on slow machines up to half an hour.
>>> Source configured.
>>> Compiling source in /var/tmp/portage/net-p2p/mldonkey-3.0.0/work/mldonkey-3.0.0 ...
make -j2
/usr/bin/ocamlc.opt   -I src/utils/cdk  -I src/utils/lib  -I src/utils/ocamlrss  -I src/utils/xml-light  -I src/utils/net  -I tools  -I src/daemon/common  -I src/daemon/driver  -I src/utils/mp3tagui  -I src/config/unix  -I src/networks/direct_connect  -I src/networks/fileTP  -I src/networks/bittorrent  -I src/networks/donkey -c tools/ocamlpp.ml
echo '# 1 "src/utils/lib/options.ml4"' > src/utils/lib/options.ml
/usr/bin/camlp4 pa_o.cmo pa_op.cmo pr_o.cmo -impl src/utils/lib/options.ml4 >> src/utils/lib/options.ml
Fatal error: cannot find file pa_o.cmo
make: *** [src/utils/lib/options.ml] Error 2
make: *** Waiting for unfinished jobs....
 * ERROR: net-p2p/mldonkey-3.0.0 failed:
 *   emake failed
 *
 * Call stack:
 *     ebuild.sh, line  54:  Called src_compile
 *   environment, line 3175:  Called die
 * The specific snippet of code:
 *       emake || die "emake failed";
 *
 * If you need support, post the output of 'emerge --info =net-p2p/mldonkey-3.0.0',
 * the complete build log and the output of 'emerge -pqv =net-p2p/mldonkey-3.0.0'.
 * The complete build log is located at '/var/tmp/portage/net-p2p/mldonkey-3.0.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-p2p/mldonkey-3.0.0/temp/environment'.
 * S: '/var/tmp/portage/net-p2p/mldonkey-3.0.0/work/mldonkey-3.0.0'


With oclam version 3.11.2 it could not even finish the configure phase.
I emerged mldonkey in the desktop system disabling gtk, gdbm and X flags, thus recreating the same conditions, and it works properly.

Well, I do not really care about mldonkey, but it seems I have *many* problems emerging software. It is funny, because I also studied Building Embedded Linux Systems before attempting this, but it is almost unuseful with me. :roll:

Did this problem happen to you, too?

Thanks for your help.
_________________
ANTONIO: How every fool can play upon the world! I think the best grace of wit will shortly turn into silence, and discourse grow commendable in none only but parrots...

Shakespeare, The Merchant of Venice
Back to top
View user's profile Send private message
judepereira
Apprentice
Apprentice


Joined: 19 Jan 2008
Posts: 179
Location: Portage, yes, somewhere out there

PostPosted: Fri Aug 27, 2010 6:44 am    Post subject: Reply with quote

I've never seen anything like that, are here's what I'd rather suggest you to do, as I do it quite often as it saves space too,
do a whereis on that command, then do an ldd on that binary.

whereis will also show you the conf files, and other required data, so just copy all this into the embedded folder, this way, you know what gets installed and you can also throw out stuff if you don't need it.
_________________
Jude Pereira
(http://judepereira.com)
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