2010-02-02 15:31:21     libjpeg for uclinux

Document created by Aaronwu Employee on Aug 20, 2013
Version 1Show Document
  • View in full screen mode

2010-02-02 15:31:21     libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85482   


Hello everybody,


I've just start to work with blackfin, uclinux and cross compile (so be patient ).


I'm working on a project where is involved a adsp-blackfin 526 with linux versione = 2.6.32.


I've written a software to grab a snapshot from a camera (the stored image is a ppm file), and I've used the package called motion-3.2.11 properly changed.


That proj has a configure script and so to build in on ubuntu I follow this chain:


$ ./configure


$ make


$ make install


and of course with ubuntu it works!




Then I tried to cross compile (I've the uclinux-gcc toolchain!) but firstly I'm not sure the command line I use is correct:


$ CC=bfin-uclinux-gcc ./configure --host=jupiter --target=bfin-uclinux



and so I've a couple of questions:


1) is correct call target as bfin-uclinux or I've to write something different?


2) host name is the pc I'm using with ubuntu, right?


3) the main problem I have is that it cannot find JPEGLIB: this is what I can read after I've type the command


checking for jupiter-gcc... bfin-uclinux-gcc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... yes

checking for suffix of executables...

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether bfin-uclinux-gcc accepts -g... yes

checking for bfin-uclinux-gcc option to accept ISO C89... none needed

checking threads... yes

checking for libjpeg-mmx... skipping

checking for libjpeg...

checking for jpeg_set_defaults in -ljpeg... no


You do not have libjpeg installed





      Configure status  

      motion ""



OS             :     Linux

pthread Support:     Yes

jpeg Support:        No


** Fatal Error YOU MUST HAVE jpeg Support  ***


V4L included:        Yes

V4L2 supported:      Yes

FFmpeg Support:      No

MYSQL Support:       No

PostgreSQL Support:  No



LIBS: -lm  -lpthread



Install prefix:       /home/cristiana/bfin-motion



Please, if someone can have any kind of hints let me know!!!


thank you very much!!!






2010-02-02 17:30:07     Re: libjpeg for uclinux

Mike Frysinger (UNITED STATES)

Message: 85483   


the CC= is not needed, and the --host/--target are incorrect.  --host is for where the code is going to be running.  i.e. the Blackfin system.


so you'd normally use: ./configure --host=bfin-uclinux


as for working with libraries compiled via uclinux-dist (like jpeg), please read the documentation:





2010-02-02 18:44:52     Re: libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85484   


Thank you for reply me.


But there are some things that I still don't understand.


1) why I don't have to use CC= ? how can I tell to use the compiler uclinux-gcc?


2) In my uclinux-dist I have jpeg library at /opt/uclinux/uclinux-dist/lib/libjpeg,


but I cannot link it with my configure script.




Thank you so much!!




2010-02-02 18:58:17     Re: libjpeg for uclinux

Mike Frysinger (UNITED STATES)

Message: 85485   


the configure script takes care of figuring out the right compiler/linker/etc... based on --host


the documentation explains how to leverage libraries in uclinux-dist.  please read it.




2010-02-02 19:01:55     Re: libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85486   


Ok, thanks!!!


Now I'm going to read that.


The last question: what does the documentation mean with "staging" folder?


Have I to put my_project folder inside of uclinux-dist one?






2010-02-02 19:07:48     Re: libjpeg for uclinux

Mike Frysinger (UNITED STATES)

Message: 85487   


when you compile libraries with uclinux-dist, they get installed into the toplevel staging directory.  it's a directory literally named "staging".


if you follow the directions in the wiki, you dont have to put your random apps in uclinux-dist.




2010-02-03 13:37:46     Re: libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85545   


I'm sorry but I don't understand.


I have the toolchain for uclinux already build on my ubuntu-pc (I didn't build that by myself), and I don't have the folder called "staging".


one other question: do the directions in the wiki deal with what I've to do only to compile my configure script or how to install the toolchain??




Sorry again!!!


and thank you very much!! If somebody can help me it would be really appraciated!!








2010-02-03 13:43:13     Re: libjpeg for uclinux


Message: 85548   




Do you have the uClinux-dist? if so - then you have a staging dir. If not - where are you getting the libjpeg from?






2010-02-03 14:08:19     Re: libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85551   


Thank you for your reply!


my library for jpeg is here: /opt/uclinux/uclinux-dist/lib/libjpeg/




Is not ok?


The kernel for my blackfin has been compiled on another pc (not on mine) , is it a problem?




thank you so much




2010-02-03 14:12:11     Re: libjpeg for uclinux

Mike Frysinger (UNITED STATES)

Message: 85552   


you need to compile the uclinux-dist with the libraries you want enabled




2010-02-03 18:59:51     Re: libjpeg for uclinux

cristiana tenti (UNITED STATES)

Message: 85562   


Thank you!!


now I've fixed my problem!!


thank you so much for your help!!