Discussion:
[mad-user] Some make problems
Ming Chi Tsai
2004-05-29 16:35:20 UTC
Permalink
Hi:

I have a project that port madplay into embedded system(CPU:ARM,
OS:uclinux).
I know madplay can be build on uclinux using uclibc and arm cpu using
arm-linux-gcc respectively.
But, when I port madplay to embedded system with ARM and uclinux using
arm-elf-gcc,
I encountered some problems.
The following is my make step:

I use cygwin and arm-elf-gcc to build my project.

export CPPFLAGS='-I/usr/local/include/'
export LDFLAGS='-I/usr/local/lib/'

$cd zlib-1.1.4
modify configure
AR=$(AR-"ar rc") ---> AR="arm-elf-ar rc"
RANLIB=$(RANLIB-"ranlib") ---> RANLIB=arm-elf-ranlib
$./configure
---------------->down

$cd libid3tag-0.15.1b
$./configure CC=arm-elf-gcc --host=arm-elf --build=arm
$make
$make install
---------------->down

$cd libmad-0.15.1b
$./configure CC=arm-elf-gcc --host=arm-elf --build=arm
$make
$make install
---------------->down

$cd madplay-0.15.2b
$./configure CC=arm-elf-gcc --host=arm-elf --build=arm
---------------->error, because it can not find libmad and libid3tag. But I
am sure the lib path is correct.

Where am I wrong with the configure setting??
Whether madplay can't be ported to embedded system with ARM and uclinux
or I should use anyother corse compiler.

thanks for any reply.

Tsaimc
Rob Leslie
2004-05-29 16:48:10 UTC
Permalink
Post by Ming Chi Tsai
I have a project that port madplay into embedded system(CPU:ARM,
OS:uclinux).
I know madplay can be build on uclinux using uclibc and arm cpu using
arm-linux-gcc respectively.
But, when I port madplay to embedded system with ARM and uclinux using
arm-elf-gcc,
I encountered some problems.
I use cygwin and arm-elf-gcc to build my project.
export CPPFLAGS='-I/usr/local/include/'
export LDFLAGS='-I/usr/local/lib/'
Try LDFLAGS='-L/usr/local/lib' instead (note -L not -I).
Post by Ming Chi Tsai
Where am I wrong with the configure setting??
Whether madplay can't be ported to embedded system with ARM and uclinux
or I should use anyother corse compiler.
It should be able to work.
--
Rob Leslie
***@mars.org
Ming Chi Tsai
2004-05-29 17:43:47 UTC
Permalink
Sorry for my typing error.
It is really " export LDFLAGS='-L/usr/local/lib/' ".

I try many ways to assign lib path, but it is also can not find library.
I am sure the lib path is correct, because I use uclibc to build madplay has
not any error.
So, I guess this problen might be related to configure setting.

----- Original Message -----
From: "Rob Leslie" <***@mars.org>
To: <mad-***@lists.mars.org>
Sent: Sunday, May 30, 2004 12:48 AM
Subject: Re: [mad-user] Some make problems
Post by Rob Leslie
Post by Ming Chi Tsai
I have a project that port madplay into embedded system(CPU:ARM,
OS:uclinux).
I know madplay can be build on uclinux using uclibc and arm cpu using
arm-linux-gcc respectively.
But, when I port madplay to embedded system with ARM and uclinux using
arm-elf-gcc,
I encountered some problems.
I use cygwin and arm-elf-gcc to build my project.
export CPPFLAGS='-I/usr/local/include/'
export LDFLAGS='-I/usr/local/lib/'
Try LDFLAGS='-L/usr/local/lib' instead (note -L not -I).
Post by Ming Chi Tsai
Where am I wrong with the configure setting??
Whether madplay can't be ported to embedded system with ARM and uclinux
or I should use anyother corse compiler.
It should be able to work.
--
Rob Leslie
Ming Chi Tsai
2004-06-05 15:11:58 UTC
Permalink
Hi:

I have built madplay successfully.
The following is building steps

libid3tag:
./configure --disable-debugging --host=arm-elf --build=arm
CC=arm-elf-gcc RANLIB=/usr/local/bin/arm-elf-ranlib
LD=/usr/local/bin/arm-elf-ld
make
make install

libmad:
./configure --enable-speed --disable-debugging --enable-aso --enable-fpm=arm
--host=arm-elf --build=arm CC=arm-elf-gcc
RANLIB=/usr/local/bin/arm-elf-ranlib LD=/usr/local/bin/arm-elf-ld
make
make install

madplay:
./configure --disable-debugging --disable-mmap --host=arm-elf --build=arm
CC=arm-elf-gcc RANLIB=/usr/local/bin/arm-elf-ranlib
LD=/usr/local/bin/arm-elf-ld
(modify HAVE_DECL_FEOF_UNLOCKED form 1 to 0 in config.h, because 1 will lead
to make error)
make

Following above steps can build madplay execution file, but when putting to
embedded system, it can't run.

error message on emabedded system:
$>BINFMT_FLAT: bad magic/rev (0x1010161, need 0x4)
$>BINFMT_FLAT: bad magic/rev (0x1010161, need 0x4)
$>madplay: Exec format error

Who can tell me where I made a mistake??
Whether my building steps is right??

Thanks for any reply.

best regards,
TsaiMC


----- Original Message -----
From: "Ming Chi Tsai" <***@locust.csie.ncku.edu.tw>
To: <mad-***@lists.mars.org>
Sent: Sunday, May 30, 2004 1:43 AM
Subject: Re: [mad-user] Some make problems
Post by Ming Chi Tsai
Sorry for my typing error.
It is really " export LDFLAGS='-L/usr/local/lib/' ".
I try many ways to assign lib path, but it is also can not find library.
I am sure the lib path is correct, because I use uclibc to build madplay has
not any error.
So, I guess this problen might be related to configure setting.
----- Original Message -----
Sent: Sunday, May 30, 2004 12:48 AM
Subject: Re: [mad-user] Some make problems
Post by Rob Leslie
Post by Ming Chi Tsai
I have a project that port madplay into embedded system(CPU:ARM,
OS:uclinux).
I know madplay can be build on uclinux using uclibc and arm cpu using
arm-linux-gcc respectively.
But, when I port madplay to embedded system with ARM and uclinux using
arm-elf-gcc,
I encountered some problems.
I use cygwin and arm-elf-gcc to build my project.
export CPPFLAGS='-I/usr/local/include/'
export LDFLAGS='-I/usr/local/lib/'
Try LDFLAGS='-L/usr/local/lib' instead (note -L not -I).
Post by Ming Chi Tsai
Where am I wrong with the configure setting??
Whether madplay can't be ported to embedded system with ARM and uclinux
or I should use anyother corse compiler.
It should be able to work.
--
Rob Leslie
Rob Leslie
2004-06-05 23:55:00 UTC
Permalink
Post by Ming Chi Tsai
I have built madplay successfully.
[...]
Post by Ming Chi Tsai
Following above steps can build madplay execution file, but when putting to
embedded system, it can't run.
$>BINFMT_FLAT: bad magic/rev (0x1010161, need 0x4)
$>BINFMT_FLAT: bad magic/rev (0x1010161, need 0x4)
$>madplay: Exec format error
Who can tell me where I made a mistake??
According to information gleaned via Google, you may need to add
LDFLAGS="-Wl,-elf2flt" to get a flat binary.
--
Rob Leslie
***@mars.org
Loading...