Skip to contentSkip to conversation

GD Library on MIPS Processor

DISCUSSION Inpreet Singh 3 participants 4 messages Apr 28, 2005 – Apr 29, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Sir I am using gd library on Linux intel processor sucessfully but now I want to do same on MIPS. I don't know to how install, configure and test gd library on MIPS. Sir please give me some clue or link to study for the same.

I tried to configure gd library compilation using following command from linux intel processor:

./configure --host=mips
and it makes Makefile with some differences
***************************************************
host_triplet = mips-unknown-elf
host = mips-unknown-elf
host_alias = mips
host_cpu = mips
***************************************************
Now I tried to build a example using this Makefile "make gddemo". What I expect that it will create gddemo binary that will output in correctly on MIPS processor. But when I run this binary on MIPS it is showing errors.
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected
**************************************************************
Also I have downloaded debian packages for gd library on MIPS processor but don't know how to install them. I tried dpkg command but it shows no such command. So sir please help me out.
So please help me how should I proceed.
Regards

Inpreet singh

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay, before I start... can you please turn off HTML message composition? Some users here don't take kindly to HTML email. ;-)

Quoted 9 lines

Sir I am using gd library on Linux intel processor sucessfully but now I want to do same on MIPS. I don't know to how install, configure and test gd library on MIPS. Sir please give me some clue or link to study for the same.

I tried to configure gd library compilation using following command from linux intel processor:

./configure --host=mips

Try ./configure --host=mips-unknown-linux-gnu (or mips-unknown-linux-uclibc if you use µClibc). Setting --build and --target may help too.

Quoted 7 lines

and it makes Makefile with some differences
***************************************************
host_triplet = mips-unknown-elf
host = mips-unknown-elf
host_alias = mips
host_cpu = mips
***************************************************

Quoted 8 lines

Now I tried to build a example using this Makefile "make gddemo". What I expect that it will create gddemo binary that will output in correctly on MIPS processor. But when I run this binary on MIPS it is showing errors.
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected
**************************************************************

I'm not sure what's going on there... but I'd presume it's related to the wrong host option being set.

Also, make sure you run the compiled binaries on the MIPS machine... they won't work on x86 (you'll get a "cannot execute binary file" error message).

Quoted 4 lines

Also I have downloaded debian packages for gd library on MIPS processor but don't know how to install them. I tried dpkg command but it shows no such command. So sir please help me out.
So please help me how should I proceed.

That's odd. Do you have Debian installed correctly on the MIPS machine? What version/distribution did you install?

- --

+-------------------------------------------------------------+
| Stuart Longland -oOo- http://stuartl.longlandclan.hopto.org |
| Atomic Linux Project     -oOo-    http://atomicl.berlios.de |
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |
| I haven't lost my mind - it's backed up on a tape somewhere |
+-------------------------------------------------------------+

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCcdkpuarJ1mMmSrkRAlt0AJ97SkR+SDtpVXiU1KzhWvSLFLTJIgCfQyFO n8aKAVeZBTUPKhHm8NAvxAY=
=1oRI
-----END PGP SIGNATURE-----

#2 lore raw

I want to use gd library on MIPS processor. Due to limited memory on mips, I cannot compile gd library on it. So I need to compile it on linux intel processor and transfer executable files on MIPS. I have compiled gd library on intel linux and successfully tested it. But how to compile gd library for MIPS processor? I tried to configure it with these commands
1. ./configure --host=mips-unknown-linux-gnu
2. ./configure --host=mips-linux
3. ./configure --host=mips-linux --build=mips-linux --target=mips-linux
4. ./configure --host=mips-linux --build=mips-linux

but none of them had worked for me. Whenever after compiling I place my executables and try to test them, they fails to return results.

gd library after configure command dynamically generates Makefile. Now method to test your application which you have to write in a c program is so make this program with this Makefile. Lets suppose you make an example and name it as test.c so what you have to do is enter test.c in this dynamically generated Makefile and write command make test this will outputs in test executable file. Which we can run using command ./test on our command prompt.

Whenever I perform this task it always shows errors:
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected
**************************************************************
eval: 1: gcc: not found
**************************************************************
I have used Source-Navigator and tried to compile my project using mips compiling option but doesn't workout. So please help me. please tell me what is best procedure to compile and test gd library on MIPS processor when due to memory limitation I cannot compile project on MIPS itself, on my MIPS processor I have installed linux with very limited command set.
_____________________________________________________________________
Regards
Inpreet Singh

#3 lore raw
Quoted 9 lines · Inpreet Singh

I want to use gd library on MIPS processor. Due to limited memory on mips, I cannot compile gd library on it. So I need to compile it on linux intel processor and transfer executable files on MIPS. I have compiled gd library on intel linux and successfully tested it. But how to compile gd library for MIPS processor? I tried to configure it with these commands
1. ./configure --host=mips-unknown-linux-gnu
2. ./configure --host=mips-linux
3. ./configure --host=mips-linux --build=mips-linux --target=mips-linux
4. ./configure --host=mips-linux --build=mips-linux

If you're building on Linux/x86, using '--build=mips-linux' is obviously completely bogus.

Quoted 2 lines

but none of them had worked for me. Whenever after compiling I place my executables and try to test them, they fails to return results.

This could have another reason, see below...

Quoted 8 lines

gd library after configure command dynamically generates Makefile. Now method to test your application which you have to write in a c program is so make this program with this Makefile. Lets suppose you make an example and name it as test.c so what you have to do is enter test.c in this dynamically generated Makefile and write command make test this will outputs in test executable file. Which we can run using command ./test on our command prompt.

Quoted 4 lines

Whenever I perform this task it always shows errors:
**************************************************************
/launchpad # ./gddemo
./gddemo: 1: Syntax error: "(" unexpected

If this program gives this message, then it is running. Why it gives it is a totally unrelated thing.

Now, what could also be the case is that you didn't grab the executable but a
script. Autotools usually generate a script in the builddir that setup the runtime linker so it finds the (not yet installed) libraries and then calls the executable inside the hidden .lib directory.

If this all fails, create a minimal hello-world and compile it with 'mips-linux-gcc -Wall -o hw hello.c' and try that on the host machine.

Uli