* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
@ 2010-01-06 23:43 Grant Edwards
2010-01-07 6:08 ` Grant Edwards
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Grant Edwards @ 2010-01-06 23:43 UTC (permalink / raw)
To: buildroot
The u-boot-env-tools-on-target build was failing because mtd.h
wasn't found, so in an attempt to fix that I tried selecting
BR2_PACKAGE_MTD and BR2_PACKAGE_MTD_UTILS. Now that's failing
to build because of undefined references to bcopy, bcmp, bzero
(make output below).
Is there a trick to get mtd stuff to build?
Is BR2_PACKAGE_MTD/BR2_PACKAGE_MTD_UTILS actually what I need
to provide mtd.h for building the u-boot env set/get target
tools, or does mtd.h come from somewhere else?
[...]
/usr/bin/make -j2 CFLAGS="-I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/" \
LDFLAGS="--sysroot /home/nextgen/buildroot/buildroot/output/staging/" \
BUILDDIR=/home/nextgen/buildroot/buildroot/output/build/mtd_orig \
CROSS=/home/nextgen/buildroot/toolchain/usr/bin/arm-linux- CC=/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc LINUXDIR=/home/nextgen/buildroot/buildroot/output/build/linux-2.6.28.2 WITHOUT_XATTR=1 -C /home/nextgen/buildroot/buildroot/output/build/mtd_orig
make[1]: Entering directory `/home/nextgen/buildroot/buildroot/output/build/mtd_orig'
mkdir -p /home/nextgen/buildroot/buildroot/output/build/mtd_orig
[...]
mkdir -p /home/nextgen/buildroot/buildroot/output/build/mtd_orig
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I./include -DWITHOUT_XATTR -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -c -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/serve_image.o serve_image.c -g -Wp,-MD,/home/nextgen/buildroot/buildroot/output/build/mtd_orig/.serve_image.c.dep
mkdir -p /home/nextgen/buildroot/buildroot/output/build/mtd_orig
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I./include -DWITHOUT_XATTR -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -c -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o fec.c -g -Wp,-MD,/home/nextgen/buildroot/buildroot/output/build/mtd_orig/.fec.c.dep
fec.c: In function 'invert_mat':
fec.c:436: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c: In function 'fec_new':
fec.c:707: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c: In function 'fec_encode':
fec.c:734: warning: incompatible implicit declaration of built-in function 'bcopy'
fec.c:737: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c: In function 'fec_encode_linear':
fec.c:754: warning: incompatible implicit declaration of built-in function 'bcopy'
fec.c:757: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c: In function 'build_decode_matrix':
fec.c:817: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c:822: warning: incompatible implicit declaration of built-in function 'bcopy'
fec.c: In function 'fec_decode':
fec.c:873: warning: incompatible implicit declaration of built-in function 'bzero'
fec.c:883: warning: incompatible implicit declaration of built-in function 'bcopy'
mkdir -p /home/nextgen/buildroot/buildroot/output/build/mtd_orig
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I./include -DWITHOUT_XATTR -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -c -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/recv_image.o recv_image.c -g -Wp,-MD,/home/nextgen/buildroot/buildroot/output/build/mtd_orig/.recv_image.c.dep
mkdir -p /home/nextgen/buildroot/buildroot/output/build/mtd_orig
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I./include -DWITHOUT_XATTR -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -c -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/sumtool.o sumtool.c -g -Wp,-MD,/home/nextgen/buildroot/buildroot/output/build/mtd_orig/.sumtool.c.dep
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -g -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/ftl_format /home/nextgen/buildroot/buildroot/output/build/mtd_orig/ftl_format.o
[...]
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc -I. -I./include -I/home/nextgen/buildroot/buildroot/output/toolchain/linux/include -I/home/nextgen/buildroot/buildroot/output/staging/usr/include -Os -pipe -O2 --sysroot /home/nextgen/buildroot/buildroot/output/staging/ --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -g -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/rfdformat /home/nextgen/buildroot/buildroot/output/build/mtd_orig/rfdformat.o
/home/nextgen/buildroot/toolchain/usr/bin/arm-linux-gcc --sysroot /home/nextgen/buildroot/buildroot/output/staging/ -o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/serve_image /home/nextgen/buildroot/buildroot/output/build/mtd_orig/serve_image.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/crc32.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o: In function `fec_encode_linear':
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.c:754: undefined reference to `bcopy'
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o: In function `fec_encode':
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.c:734: undefined reference to `bcopy'
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o: In function `build_decode_matrix':
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.c:822: undefined reference to `bcopy'
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o: In function `invert_mat':
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.c:516: undefined reference to `bcmp'
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.o: In function `fec_decode':
/home/nextgen/buildroot/buildroot/output/build/mtd_orig/fec.c:883: undefined reference to `bcopy'
collect2: ld returned 1 exit status
make[1]: *** [/home/nextgen/buildroot/buildroot/output/build/mtd_orig/serve_image] Error 1
make[1]: *** Waiting for unfinished jobs....
rm /home/nextgen/buildroot/buildroot/output/build/mtd_orig/nandwrite.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/mtd_debug.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/ftl_format.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_otp_dump.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/rfdformat.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/nftldump.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_unlock.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_lock.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flashcp.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/nftl_format.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/doc_loadbios.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_erase.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_otp_info.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/rfddump.o /home/nextgen/b
uildroot/buildroot/output/build/mtd_orig/nandtest.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/nanddump.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/docfdisk.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_info.o /home/nextgen/buildroot/buildroot/output/build/mtd_orig/ftl_check.o
make[1]: Leaving directory `/home/nextgen/buildroot/buildroot/output/build/mtd_orig'
make: *** [/home/nextgen/buildroot/buildroot/output/build/mtd_orig/flash_erase] Error 2
--
Grant Edwards grante Yow! Loni Anderson's hair
at should be LEGALIZED!!
visi.com
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-06 23:43 [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp Grant Edwards
@ 2010-01-07 6:08 ` Grant Edwards
2010-01-07 6:46 ` Grant Edwards
2010-01-07 17:02 ` Grant Edwards
2010-01-17 23:29 ` Peter Korsgaard
2 siblings, 1 reply; 9+ messages in thread
From: Grant Edwards @ 2010-01-07 6:08 UTC (permalink / raw)
To: buildroot
On 2010-01-06, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> The u-boot-env-tools-on-target build was failing because mtd.h
> wasn't found, so in an attempt to fix that I tried selecting
> BR2_PACKAGE_MTD and BR2_PACKAGE_MTD_UTILS. Now that's failing
> to build because of undefined references to bcopy, bcmp, bzero
> (make output below).
>
> Is there a trick to get mtd stuff to build?
Found it:
https://bugs.uclibc.org/show_bug.cgi?id=841
I'm getting the feeling tht I should have stuck with the last
release instead of using HEAD. So far the number of packages
that won't build cleanly is at 4 and counting.
> Is BR2_PACKAGE_MTD/BR2_PACKAGE_MTD_UTILS actually what I need
> to provide mtd.h for building the u-boot env set/get target
> tools, or does mtd.h come from somewhere else?
Still working on that one.
--
Grant
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-07 6:08 ` Grant Edwards
@ 2010-01-07 6:46 ` Grant Edwards
0 siblings, 0 replies; 9+ messages in thread
From: Grant Edwards @ 2010-01-07 6:46 UTC (permalink / raw)
To: buildroot
On 2010-01-07, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>
>> Is BR2_PACKAGE_MTD/BR2_PACKAGE_MTD_UTILS actually what I need
>> to provide mtd.h for building the u-boot env set/get target
>> tools, or does mtd.h come from somewhere else?
It's actually mtd/mtd-user.h that's missing. It looks like it
should come from the kernel headers. It's there in the kernel
source tree (and in /usr/include on my development hosts), but
it's missing from the toolchain's usr/include directory.
How do you get mtd/*.h header files included in /usr/include
when the toolchain is built?
--
Grant
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-06 23:43 [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp Grant Edwards
2010-01-07 6:08 ` Grant Edwards
@ 2010-01-07 17:02 ` Grant Edwards
2010-01-07 17:37 ` Thomas Petazzoni
2010-01-17 23:29 ` Peter Korsgaard
2 siblings, 1 reply; 9+ messages in thread
From: Grant Edwards @ 2010-01-07 17:02 UTC (permalink / raw)
To: buildroot
On 2010-01-06, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> The u-boot-env-tools-on-target build was failing because mtd.h
> wasn't found, so in an attempt to fix that I tried selecting
> BR2_PACKAGE_MTD and BR2_PACKAGE_MTD_UTILS. Now that's failing
> to build because of undefined references to bcopy, bcmp, bzero
> (make output below).
>
> Is there a trick to get mtd stuff to build?
I patched the bug in the mtd package so it's now building, but
it won't run:
# flash_info
flash_info: can't load library 'libgcc_s.so.1'
libgcc_s.so.1 appears in the staging directory,
$ find . -name libgcc_s*
./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so
./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so.1
but it's not present in the target filesystem.
Am I having all of these problem becuase I shouldn't be using
HEAD, or am I doing something else wrong?
--
Grant Edwards grante Yow! There's enough money
at here to buy 5000 cans of
visi.com Noodle-Roni!
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-07 17:02 ` Grant Edwards
@ 2010-01-07 17:37 ` Thomas Petazzoni
2010-01-07 17:57 ` Grant Edwards
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2010-01-07 17:37 UTC (permalink / raw)
To: buildroot
Le Thu, 7 Jan 2010 17:02:31 +0000 (UTC),
Grant Edwards <grant.b.edwards@gmail.com> a ?crit :
> I patched the bug in the mtd package so it's now building, but
> it won't run:
>
> # flash_info
> flash_info: can't load library 'libgcc_s.so.1'
>
> libgcc_s.so.1 appears in the staging directory,
>
> $ find . -name libgcc_s*
> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so
> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so.1
>
> but it's not present in the target filesystem.
Are you using a buildroot-generated toolchain or an external toolchain ?
> Am I having all of these problem becuase I shouldn't be using
> HEAD, or am I doing something else wrong?
The MTD utils package has very recently been updated into HEAD, which
might explain why you're encountering so many failures.
http://git.buildroot.net/buildroot/commit/?id=9400c73582326c543fae82120af3904836145655
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-07 17:37 ` Thomas Petazzoni
@ 2010-01-07 17:57 ` Grant Edwards
2010-01-07 22:30 ` Grant Edwards
0 siblings, 1 reply; 9+ messages in thread
From: Grant Edwards @ 2010-01-07 17:57 UTC (permalink / raw)
To: buildroot
On 2010-01-07, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
> Le Thu, 7 Jan 2010 17:02:31 +0000 (UTC),
> Grant Edwards <grant.b.edwards@gmail.com> a ??crit :
>
>> I patched the bug in the mtd package so it's now building, but
>> it won't run:
>>
>> # flash_info
>> flash_info: can't load library 'libgcc_s.so.1'
>>
>> libgcc_s.so.1 appears in the staging directory,
>>
>> $ find . -name libgcc_s*
>> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so
>> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so.1
>>
>> but it's not present in the target filesystem.
>
> Are you using a buildroot-generated toolchain or an external toolchain ?
Yes. :)
It's an external toolchain that was generated by buildtoot.
I can try using an "internal" toolchain, but that approach
really slows down work since each "guess" takes 40-50 minutes
instead of 10-12.
>> Am I having all of these problem becuase I shouldn't be using
>> HEAD, or am I doing something else wrong?
>
> The MTD utils package has very recently been updated into HEAD, which
> might explain why you're encountering so many failures.
>
> http://git.buildroot.net/buildroot/commit/?id=9400c73582326c543fae82120af3904836145655
>
> Thomas
--
Grant Edwards grante Yow! Gee, I feel kind of
at LIGHT in the head now,
visi.com knowing I can't make my
satellite dish PAYMENTS!
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-07 17:57 ` Grant Edwards
@ 2010-01-07 22:30 ` Grant Edwards
2010-01-08 7:57 ` Thomas Petazzoni
0 siblings, 1 reply; 9+ messages in thread
From: Grant Edwards @ 2010-01-07 22:30 UTC (permalink / raw)
To: buildroot
On 2010-01-07, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2010-01-07, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:
>> Le Thu, 7 Jan 2010 17:02:31 +0000 (UTC),
>> Grant Edwards <grant.b.edwards@gmail.com> a ??crit :
>>
>>> I patched the bug in the mtd package so it's now building, but
>>> it won't run:
>>>
>>> # flash_info
>>> flash_info: can't load library 'libgcc_s.so.1'
>>>
>>> libgcc_s.so.1 appears in the staging directory,
>>>
>>> $ find . -name libgcc_s*
>>> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so
>>> ./output/staging/usr/arm-linux-uclibc/lib/libgcc_s.so.1
>>>
>>> but it's not present in the target filesystem.
>>
>> Are you using a buildroot-generated toolchain or an external toolchain ?
>
> Yes. :)
>
> It's an external toolchain that was generated by buildtoot.
The problem is that buildroot expects to find libgcc,
libstdc++, et al in $(SYSROOT)/lib
That's not where buildroot puts them.
Buildroot puts them in $(SYSROOT)/usr/arm-linux-uclibc/lib
Apparently, toolchains built by Buildroot aren't suitable for
use as external toolchains without some post-build massaging.
--
Grant Edwards grante Yow! I brought my BOWLING
at BALL -- and some DRUGS!!
visi.com
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-07 22:30 ` Grant Edwards
@ 2010-01-08 7:57 ` Thomas Petazzoni
0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2010-01-08 7:57 UTC (permalink / raw)
To: buildroot
Le Thu, 7 Jan 2010 22:30:30 +0000 (UTC),
Grant Edwards <grant.b.edwards@gmail.com> a ?crit :
> The problem is that buildroot expects to find libgcc,
> libstdc++, et al in $(SYSROOT)/lib
Yes. I have a fix in one of my branches that fixes this. But it's part
of a set of fixes designed to get Codesourcery toolchains to work in
Buildroot, which doesn't work yet (see my mail on this topic a few days
ago).
See
http://git.buildroot.net/~tpetazzoni/git/buildroot/commit/?h=toolchain-fixes&id=27bd3ec803202f52c336254b276cbab3c6999a35
(but it's not ready for inclusion yet)
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp
2010-01-06 23:43 [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp Grant Edwards
2010-01-07 6:08 ` Grant Edwards
2010-01-07 17:02 ` Grant Edwards
@ 2010-01-17 23:29 ` Peter Korsgaard
2 siblings, 0 replies; 9+ messages in thread
From: Peter Korsgaard @ 2010-01-17 23:29 UTC (permalink / raw)
To: buildroot
>>>>> "Grant" == Grant Edwards <grant.b.edwards@gmail.com> writes:
Grant> The u-boot-env-tools-on-target build was failing because mtd.h
Grant> wasn't found, so in an attempt to fix that I tried selecting
Grant> BR2_PACKAGE_MTD and BR2_PACKAGE_MTD_UTILS. Now that's failing
Grant> to build because of undefined references to bcopy, bcmp, bzero
Grant> (make output below).
Grant> Is there a trick to get mtd stuff to build?
Yes, we need a workaround similar to what we are doing for
mtd-utils.git. I've checked in a fix for this earlier tonight.
This broke when we updated to mtd-tuils 1.2.0. I'll update to 1.3.1
tomorrow after a bit of testing.
Grant> Is BR2_PACKAGE_MTD/BR2_PACKAGE_MTD_UTILS actually what I need
Grant> to provide mtd.h for building the u-boot env set/get target
Grant> tools, or does mtd.h come from somewhere else?
No, mtd.h normally comes from your kernel headers.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-01-17 23:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-06 23:43 [Buildroot] MTD build failing: undefined ref's to bcopy, bcmp Grant Edwards
2010-01-07 6:08 ` Grant Edwards
2010-01-07 6:46 ` Grant Edwards
2010-01-07 17:02 ` Grant Edwards
2010-01-07 17:37 ` Thomas Petazzoni
2010-01-07 17:57 ` Grant Edwards
2010-01-07 22:30 ` Grant Edwards
2010-01-08 7:57 ` Thomas Petazzoni
2010-01-17 23:29 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox