Skip to contentSkip to conversation

incompatible libmtd.a when compiling the mtd-utils

DISCUSSION wxzzzh 3 participants 4 messages Jan 26, 2011 – Jan 29, 2011 Memory technology devices (MTD)

lore
Share & tools
lore

wxzzzh

author
#0 lore raw

Hi,
I was trying to cross compile the mtd-utils-1.4.1, for ARM, using the arm-2009q3 version of arm-none-linux-gnueabi, following the instructions on http://elinux.org/CompilingMTDUtils

it always fail with saying: "/home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /home/zh/1808/mtd/mtd-utils-1.4.1/arm-none-linux-gnueabi/lib/libmtd.a when searching for -lmtd /home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lmtd
collect2: ld returned 1 exit status"

How this happened? and how to solve?
Any help appreciated.

Regards.
--------------
Zhu

2011-01-26

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"wxzzzh" == wxzzzh <[email protected]> writes:

wxzzzh> Hi,
wxzzzh> I was trying to cross compile the mtd-utils-1.4.1, for ARM, using the arm-2009q3 version of arm-none-linux-gnueabi, following the instructions on http://elinux.org/CompilingMTDUtils

wxzzzh> it always fail with saying: "/home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /home/zh/1808/mtd/mtd-utils-1.4.1/arm-none-linux-gnueabi/lib/libmtd.a when searching for -lmtd wxzzzh> /home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lmtd
wxzzzh> collect2: ld returned 1 exit status"

wxzzzh> How this happened? and how to solve?
wxzzzh> Any help appreciated.

Redownload the tarball or delete the lib*.a files. The first 1.4.1 tarball contained some build files (for 32bit x86), which confuses your cross compiler.

Artem, there has been quite some changes since mtd-utils-1.4.1, time for a new release?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw
Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"wxzzzh" == wxzzzh <[email protected]> writes:

wxzzzh> Hi,
wxzzzh> I was trying to cross compile the mtd-utils-1.4.1, for ARM, using the arm-2009q3 version of arm-none-linux-gnueabi, following the instructions on http://elinux.org/CompilingMTDUtils

wxzzzh> it always fail with saying: "/home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: skipping incompatible /home/zh/1808/mtd/mtd-utils-1.4.1/arm-none-linux-gnueabi/lib/libmtd.a when searching for -lmtd wxzzzh> /home/zh/1808/tool/arm-2009q3/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lmtd
wxzzzh> collect2: ld returned 1 exit status"

wxzzzh> How this happened? and how to solve?
wxzzzh> Any help appreciated.

Quoted 6 lines

Redownload the tarball or delete the lib*.a files. The first 1.4.1 tarball contained some build files (for 32bit x86), which confuses your cross compiler.

Artem, there has been quite some changes since mtd-utils-1.4.1, time for a new release?

Yes, I'll do this as soon as I can.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#3 lore raw
In reply to Peter Korsgaard
Quoted 2 lines · Peter Korsgaard

Artem, there has been quite some changes since mtd-utils-1.4.1, time for a new release?

Done.

ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.2.tar.bz2

Thanks for reminding.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)