Skip to contentSkip to conversation

Cannot compile glibc-initial for ARM

DISCUSSION Pawel Osmialowski 2 participants 5 messages Nov 21, 2011 – Nov 25, 2011

lore
Share & tools
lore
#0 lore raw

I'm trying to build Angstrom-derived distro for my handheld with customized set of software. It will be held in few-GB CF card, so I can use full-blown glibc for it.

I've prepared following distro configuration file:

# file-native version compatible with rpm tools:
PREFERRED_VERSION_file-native = "4.18"
DISTRO_NAME = "customized"
DISTRO_TYPE = "release"
DISTRO_VERSION = "0.1"
TOOLCHAIN_TYPE = "internal"
TOOLCHAIN_BRAND = ""
IMAGE_LINGUAS = "en-us"
IMAGE_FSTYPE = "tar.gz"
IMAGE_FSTYPES = "tar.gz"
IMAGE_PKGTYPE = "rpm"
IMAGE_PKGTYPES = "rpm"
PREFERRED_PKG_FORMAT = "rpm"
ANGSTROM_PKG_FORMAT = "rpm"
TARGET_OS = "linux"
ANGSTROM_FEED_CONFIGS = "angstrom-feed-configs"
DISTRO_FEED_CONFIGS = "${ANGSTROM_FEED_CONFIGS}"
LIBC = "glibc"
FEED_BASEPATH = "feeds/next/${ANGSTROM_PKG_FORMAT}/${LIBC}/"
GLIBC_GENERATE_LOCALES = "en_US.UTF-8"
ANGSTROMLIBC = "glibc"
KERNEL = "kernel26"
MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
LINUX_LIBC_HEADERS_VERSION = "2.6.37"
PREFERRED_VERSION_linux-libc-headers = "${LINUX_LIBC_HEADERS_VERSION}"
PREFERRED_VERSION_linux-libc-headers-native =
"${LINUX_LIBC_HEADERS_VERSION}"
require conf/distro/include/glibc-internal.inc
require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc
require conf/distro/include/arm-thumb.inc
require conf/distro/include/angstrom.inc
require conf/distro/include/sane-toolchain.inc
DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or
bb.fatal('Remove this line or set a dummy DISTRO_VERSION")
XSERVER = "xserver-xorg xf86-input-evdev xf86-input-keyboard
xf86-input-mouse xf86-video-fbdev"
INHERIT += "sanity"
INHERIT += "devshell"
USE_NLS = "yes"
USE_LDCONFIG = "0"
FULL_OPTIMIZATION = "-Os"
BUILD_OPTIMIZATION = "-Os"
DISTRO_EXTRA_RDEPENDS += "\
    angstrom-version \
    ${ANGSTROM_FEED_CONFIGS} \
    util-linux-ng-mount util-linux-ng-umount \
    angstrom-libc-fixup-hack \

"

DISTRO_EXTRA_RRECOMMENDS += " \
    kernel-module-vfat \
    kernel-module-ext2 \
    kernel-module-ext3 \
    kernel-module-af-packet \
    avahi-daemon \
    avahi-autoipd \
    openssh-sftp-server \

"

As I see in work directory, following versions of critical packages were picked:

binutils-cross-2.21.1a-r14.3
busybox-1.18.5-r43.0
gcc-cross-4.5-r38.1+svnr170880
gcc-cross-initial-4.5-r38.1+svnr170880
gcc-cross-intermediate-4.5-r38.1+svnr170880
glibc-2.10.1-r37.1
glibc-initial-2.10.1-r37.1
linux-libc-headers-2.6.37-r0

Unfortunately, it stopped at glibc-initial confgure script:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility attribute is

required
NOTE: package glibc-initial-2.10.1-r37.1: task do_configure: Failed

Looking at config.log file produced by this configure script, I've found that it contains a lot of errors like this (although I doubt this is the reason for the whole problem):

conftest.c:9:19: fatal error: stdio.h: No such file or directory compilation terminated.

I've checked that stdio.h is not present anywhere in tmp/sysroots (no glibc yet...)

the final one:

configure:8362: arm-oe-linux-gcc -march=armv4 -mtune=strongarm -mthumb-interwork -mno-thumb --sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux -c -g -O2 -I /home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux/usr/include conftest.c >&5
conftest.c:1:0: warning: target CPU does not support interworking conftest.c:21:19: fatal error: stdio.h: No such file or directory compilation terminated.
configure:8369: $? = 1
configure: failed program was:
| /* confdefs.h. */
...
| }
configure:8586: result: 0
configure:8618: result: running configure fragment for ports/sysdeps/arm/elf configure:7: checking for ARM TLS support
configure:24: arm-oe-linux-gcc -march=armv4 -mtune=strongarm -mthumb-interwork -mno-thumb --sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux -c -g -O2 conf
test.s 1>&5
configure:27: $? = 0
configure:35: result: yes
configure:8618: result: running configure fragment for nptl/sysdeps/pthread configure:11: error: working compiler support for visibility attribute is required

I've tried with eglibc too, unfortunately, with the same result. Can you point me, what am I doing wrong?

Best regards,
Paul

#1 lore raw
Quoted 6 lines · Pawel Osmialowski

I'm trying to build Angstrom-derived distro for my handheld with customized set of software. It will be held in few-GB CF card, so I can use full-blown glibc for it.

I've prepared following distro configuration file:

Quoted 15 lines
# file-native version compatible with rpm tools:
PREFERRED_VERSION_file-native = "4.18"
DISTRO_NAME = "customized"
DISTRO_TYPE = "release"
DISTRO_VERSION = "0.1"
TOOLCHAIN_TYPE = "internal"
TOOLCHAIN_BRAND = ""
IMAGE_LINGUAS = "en-us"
IMAGE_FSTYPE = "tar.gz"
IMAGE_FSTYPES = "tar.gz"
IMAGE_PKGTYPE = "rpm"
IMAGE_PKGTYPES = "rpm"
PREFERRED_PKG_FORMAT = "rpm"
ANGSTROM_PKG_FORMAT = "rpm"
TARGET_OS = "linux"
               ^^^^^^

The above setting will make it use OABI which is long outdated in OE remove the above line and rebuild

Quoted 6 lines

ANGSTROM_FEED_CONFIGS = "angstrom-feed-configs" DISTRO_FEED_CONFIGS = "${ANGSTROM_FEED_CONFIGS}" LIBC = "glibc"
FEED_BASEPATH = "feeds/next/${ANGSTROM_PKG_FORMAT}/${LIBC}/" GLIBC_GENERATE_LOCALES = "en_US.UTF-8" ANGSTROMLIBC = "glibc"

While that might work you better use eglibc since
thats maintained

Quoted 14 lines

KERNEL = "kernel26"
MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
LINUX_LIBC_HEADERS_VERSION = "2.6.37" PREFERRED_VERSION_linux-libc-headers = "${LINUX_LIBC_HEADERS_VERSION}" PREFERRED_VERSION_linux-libc-headers-native = "${LINUX_LIBC_HEADERS_VERSION}"
require conf/distro/include/glibc-internal.inc
require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc require conf/distro/include/arm-thumb.inc
require conf/distro/include/angstrom.inc
require conf/distro/include/sane-toolchain.inc
DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION")

Quoted 8 lines

XSERVER = "xserver-xorg xf86-input-evdev xf86-input-keyboard xf86-input-mouse xf86-video-fbdev"
INHERIT += "sanity"
INHERIT += "devshell"
USE_NLS = "yes"
USE_LDCONFIG = "0"
FULL_OPTIMIZATION = "-Os"
BUILD_OPTIMIZATION = "-Os"

beaware compiling glibc with Os may not work but eglibc can be compiled using -Os

Quoted 91 lines

DISTRO_EXTRA_RDEPENDS += "\
   angstrom-version \
   ${ANGSTROM_FEED_CONFIGS} \
   util-linux-ng-mount util-linux-ng-umount \
   angstrom-libc-fixup-hack \
"

DISTRO_EXTRA_RRECOMMENDS += " \
   kernel-module-vfat \
   kernel-module-ext2 \
   kernel-module-ext3 \
   kernel-module-af-packet \
   avahi-daemon \
   avahi-autoipd \
   openssh-sftp-server \
"

As I see in work directory, following versions of critical packages were picked:

binutils-cross-2.21.1a-r14.3
busybox-1.18.5-r43.0
gcc-cross-4.5-r38.1+svnr170880
gcc-cross-initial-4.5-r38.1+svnr170880
gcc-cross-intermediate-4.5-r38.1+svnr170880
glibc-2.10.1-r37.1
glibc-initial-2.10.1-r37.1
linux-libc-headers-2.6.37-r0

Unfortunately, it stopped at glibc-initial confgure script:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility attribute is

required
NOTE: package glibc-initial-2.10.1-r37.1: task do_configure: Failed

Looking at config.log file produced by this configure script, I've found that it contains a lot of errors like this (although I doubt this is the reason for the whole problem):

conftest.c:9:19: fatal error: stdio.h: No such file or directory compilation terminated.

I've checked that stdio.h is not present anywhere in tmp/sysroots (no glibc yet...)

the final one:

configure:8362: arm-oe-linux-gcc -march=armv4 -mtune=strongarm

(quoted diff) +0 -3
-mthumb-interwork -mno-thumb
--sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux
-c -g -O2 -I

/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux/usr/include conftest.c >&5
conftest.c:1:0: warning: target CPU does not support interworking conftest.c:21:19: fatal error: stdio.h: No such file or directory compilation terminated.
configure:8369: $? = 1
configure: failed program was:
| /* confdefs.h.  */
...
| }
configure:8586: result: 0
configure:8618: result: running configure fragment for ports/sysdeps/arm/elf configure:7: checking for ARM TLS support
configure:24: arm-oe-linux-gcc -march=armv4 -mtune=strongarm

(quoted diff) +0 -3
-mthumb-interwork -mno-thumb
--sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux
-c -g -O2 conf

test.s 1>&5
configure:27: $? = 0
configure:35: result: yes
configure:8618: result: running configure fragment for nptl/sysdeps/pthread configure:11: error: working compiler support for visibility attribute is required

I've tried with eglibc too, unfortunately, with the same result. Can you point me, what am I doing wrong?

Best regards,
Paul

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#2 lore raw

Hi Khem,

Thanks for your answer.

Unfortunately, removing TARGET_OS and changing glibc to eglibc did not help:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility attribute is required

NOTE: package eglibc-initial-2.12-r21.8+svnr13230: task do_configure: Failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/pawelo/h3660/openembedded/h3660/../recipes/eglibc/eglibc-initial_2.12.bb do_configure failed

What else could be wrong?

Best regards,
Paul

W dniu 24.11.2011 04:03, Khem Raj pisze:

Quoted 156 lines · Pawel Osmialowski
Quoted 6 lines

I'm trying to build Angstrom-derived distro for my handheld with customized set of software. It will be held in few-GB CF card, so I can use full-blown glibc for it.

I've prepared following distro configuration file:

Quoted 15 lines
# file-native version compatible with rpm tools:
PREFERRED_VERSION_file-native = "4.18"
DISTRO_NAME = "customized"
DISTRO_TYPE = "release"
DISTRO_VERSION = "0.1"
TOOLCHAIN_TYPE = "internal"
TOOLCHAIN_BRAND = ""
IMAGE_LINGUAS = "en-us"
IMAGE_FSTYPE = "tar.gz"
IMAGE_FSTYPES = "tar.gz"
IMAGE_PKGTYPE = "rpm"
IMAGE_PKGTYPES = "rpm"
PREFERRED_PKG_FORMAT = "rpm"
ANGSTROM_PKG_FORMAT = "rpm"
TARGET_OS = "linux"
                ^^^^^^

The above setting will make it use OABI which is long outdated in OE remove the above line and rebuild

Quoted 6 lines

ANGSTROM_FEED_CONFIGS = "angstrom-feed-configs" DISTRO_FEED_CONFIGS = "${ANGSTROM_FEED_CONFIGS}" LIBC = "glibc"
FEED_BASEPATH = "feeds/next/${ANGSTROM_PKG_FORMAT}/${LIBC}/" GLIBC_GENERATE_LOCALES = "en_US.UTF-8" ANGSTROMLIBC = "glibc"

While that might work you better use eglibc since
thats maintained

Quoted 14 lines

KERNEL = "kernel26"
MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
LINUX_LIBC_HEADERS_VERSION = "2.6.37" PREFERRED_VERSION_linux-libc-headers = "${LINUX_LIBC_HEADERS_VERSION}" PREFERRED_VERSION_linux-libc-headers-native = "${LINUX_LIBC_HEADERS_VERSION}"
require conf/distro/include/glibc-internal.inc
require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc require conf/distro/include/arm-thumb.inc
require conf/distro/include/angstrom.inc
require conf/distro/include/sane-toolchain.inc
DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION")

Quoted 8 lines

XSERVER = "xserver-xorg xf86-input-evdev xf86-input-keyboard xf86-input-mouse xf86-video-fbdev"
INHERIT += "sanity"
INHERIT += "devshell"
USE_NLS = "yes"
USE_LDCONFIG = "0"
FULL_OPTIMIZATION = "-Os"
BUILD_OPTIMIZATION = "-Os"

beaware compiling glibc with Os may not work but eglibc can be compiled using -Os

Quoted 81 lines
DISTRO_EXTRA_RDEPENDS += "\
    angstrom-version \
    ${ANGSTROM_FEED_CONFIGS} \
    util-linux-ng-mount util-linux-ng-umount \
    angstrom-libc-fixup-hack \

"

DISTRO_EXTRA_RRECOMMENDS += " \
    kernel-module-vfat \
    kernel-module-ext2 \
    kernel-module-ext3 \
    kernel-module-af-packet \
    avahi-daemon \
    avahi-autoipd \
    openssh-sftp-server \

"

As I see in work directory, following versions of critical packages were picked:

binutils-cross-2.21.1a-r14.3
busybox-1.18.5-r43.0
gcc-cross-4.5-r38.1+svnr170880
gcc-cross-initial-4.5-r38.1+svnr170880
gcc-cross-intermediate-4.5-r38.1+svnr170880
glibc-2.10.1-r37.1
glibc-initial-2.10.1-r37.1
linux-libc-headers-2.6.37-r0

Unfortunately, it stopped at glibc-initial confgure script:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility attribute is

required
NOTE: package glibc-initial-2.10.1-r37.1: task do_configure: Failed

Looking at config.log file produced by this configure script, I've found that it contains a lot of errors like this (although I doubt this is the reason for the whole problem):

conftest.c:9:19: fatal error: stdio.h: No such file or directory compilation terminated.

I've checked that stdio.h is not present anywhere in tmp/sysroots (no glibc yet...)

the final one:

configure:8362: arm-oe-linux-gcc -march=armv4 -mtune=strongarm

(quoted diff) +0 -3
-mthumb-interwork -mno-thumb
--sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux
-c -g -O2 -I

/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux/usr/include conftest.c>&5
conftest.c:1:0: warning: target CPU does not support interworking conftest.c:21:19: fatal error: stdio.h: No such file or directory compilation terminated.
configure:8369: $? = 1
configure: failed program was:
| /* confdefs.h. */
...
| }
configure:8586: result: 0
configure:8618: result: running configure fragment for ports/sysdeps/arm/elf configure:7: checking for ARM TLS support
configure:24: arm-oe-linux-gcc -march=armv4 -mtune=strongarm

(quoted diff) +0 -3
-mthumb-interwork -mno-thumb
--sysroot=/home/pawelo/h3660/openembedded/h3660/tmp/sysroots/arm-oabi-oe-linux
-c -g -O2 conf

test.s 1>&5
configure:27: $? = 0
configure:35: result: yes
configure:8618: result: running configure fragment for nptl/sysdeps/pthread configure:11: error: working compiler support for visibility attribute is required

I've tried with eglibc too, unfortunately, with the same result. Can you point me, what am I doing wrong?

Quoted 9 lines

Best regards,
Paul

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
Quoted 10 lines · Pawel Osmialowski

Hi Khem,

Thanks for your answer.

Unfortunately, removing TARGET_OS and changing glibc to eglibc did not help:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility
Quoted 5 lines

attribute is required
NOTE: package eglibc-initial-2.12-r21.8+svnr13230: task do_configure: Failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/pawelo/h3660/openembedded/h3660/../recipes/eglibc/eglibc-initial_2.12.bb do_configure failed

can you post the config.log that you will find in glibc-initial build tree

#4 lore raw

Hi Khem,

I've found that it still tried to build long outdated OABI and therefore nothing new could be found in config.log (it looked the same as the one pasted in my previous messages). So I tried something different. At the end of my distro config file, I've added following:

TARGET_OS = "linux-gnueabi"

DISTRO_FEATURES += "eabi wifi"

And now eglibc built is completed!

Best regards,
Paul

P. S.
To be able to produce RPMs I had to apply two my small patches, one on createrepo, one on fakechroot, they won't build as native tools otherwise. Shall I upload these patches somewhere?

W dniu 24.11.2011 18:53, Khem Raj pisze:

Quoted 23 lines · Pawel Osmialowski
Quoted 10 lines

Hi Khem,

Thanks for your answer.

Unfortunately, removing TARGET_OS and changing glibc to eglibc did not help:

| running configure fragment for ports/sysdeps/arm/elf
| checking for ARM TLS support... yes
| running configure fragment for nptl/sysdeps/pthread
| configure: error: working compiler support for visibility
Quoted 5 lines

attribute is required
NOTE: package eglibc-initial-2.12-r21.8+svnr13230: task do_configure: Failed
ERROR: TaskFailed event exception, aborting
ERROR: Build of /home/pawelo/h3660/openembedded/h3660/../recipes/eglibc/eglibc-initial_2.12.bb do_configure failed

can you post the config.log that you will find in glibc-initial build tree

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel