2009-07-09 20:29:33     Problem linking with libjpeg.

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

2009-07-09 20:29:33     Problem linking with libjpeg.

andy (UNITED STATES)

Message: 76984   

 

Am trying to link with the libjpeg library and am getting the following error:

 

/JPEG$ make

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg     -c -o camera_test.o camera_test.c

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg     -c -o ovt_setup.o ovt_setup.c

ovt_setup.c: In function ‘camera_init’:

ovt_setup.c:356: warning: comparison is always false due to limited range of data type

ovt_setup.c:747:2: warning: no newline at end of file

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg     -c -o CAMdefault.o CAMdefault.c

CAMdefault.c:512:3: warning: no newline at end of file

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg     -c -o gpio.o gpio.c

gpio.c:120:2: warning: no newline at end of file

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg     -c -o motion.o motion.c

motion.c:59:2: warning: no newline at end of file

bfin-uclinux-gcc -I ~/uclinux2008/lib/libjpeg  -Wl,-elf2flt -o camera_test camera_test.o ovt_setup.o CAMdefault.o gpio.o motion.o  -Wl,../../uclinux2008/lib/libjpeg/libjpeg.a

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/../../../../bfin-uclinux/bin/ld.real: jcapimin.o: cannot link fdpic object file into non-fdpic executable

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/../../../../bfin-uclinux/bin/ld.real: failed to merge target specific data of file ../../uclinux2008/lib/libjpeg/libjpeg.a(jcapimin.o)

/opt/uClinux/bfin-uclinux/lib/gcc/bfin-uclinux/4.1.2/../../../../bfin-uclinux/bin/ld.real: jcapistd.o: cannot link fdpic object file into non-fdpic executable

........

 

.......

 

and it goes on complaining in the same way for all the libjpeg related files. Am using -Wl,-elf2flt compiler options. I have been using the 2006 uClinux distribution earlier and have compiled the same files using the same options without errors. What has gone wrong here?

 

QuoteReplyEditDelete

 

 

2009-07-09 20:31:19     Re: Problem linking with libjpeg.

Mike Frysinger (UNITED STATES)

Message: 76985   

 

you need to clean compiled code when switching object formats.  FDPIC and FLAT do not mix.

QuoteReplyEditDelete

 

 

2009-07-10 00:41:10     Re: Problem linking with libjpeg.

andy (UNITED STATES)

Message: 76992   

 

Ok, I had to change the build options in menuconfig to FLAT from FDPIC. It works fine now.

Attachments

    Outcomes