2009-09-29 15:16:01     A couple of basic build questions

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

2009-09-29 15:16:01     A couple of basic build questions

Jay Ku (UNITED STATES)

Message: 80650   

 

Sorry if this is covered in docs someplace - I couldn't find it.

 

When I'm building the fbdirect demo programs, it looks like I need to set the DATADIR include var (to, for example, /usr/share/directfb-examples).  What's the best way to do this?

 

Also, when building any library or app that's part of the distro (i.e. directfb libs, demos), how do I have them built with debugging info enabled?

 

Thanks

QuoteReplyEditDelete

 

 

2009-09-29 17:06:07     Re: A couple of basic build questions

Mike Frysinger (UNITED STATES)

Message: 80657   

 

you shouldnt have to set any DATADIR paths if you're building with the uclinux-dist system

 

debugging is handled in the uclinux-dist config menu under "Debug Builds" and "Blackfin build options"

QuoteReplyEditDelete

 

 

2009-09-29 17:34:42     Re: A couple of basic build questions

Jay Ku (UNITED STATES)

Message: 80659   

 

I built the demos by enabling DirectFB Examples in Blackfin app programs, but when I run df_andi (for example) I get an error message with something about ...ImageProvider( dfb, DATADIR"/wood_andi.jpg", &providbrf)... I assumed it was a problem with DATADIR, but it could be something else going on.

QuoteReplyEditDelete

 

 

2009-09-29 17:37:43     Re: A couple of basic build questions

Mike Frysinger (UNITED STATES)

Message: 80660   

 

did you copy over just the binary and try to run it ?

 

also, i vaguely recall that you have to `cd /usr/bin` first ...

QuoteReplyEditDelete

 

 

2009-09-29 18:11:19     Re: A couple of basic build questions

Jay Ku (UNITED STATES)

Message: 80661   

 

I copied it over, and tried running out of /usr/bin... still same problem.  Other demos (like df_dok) work ok.

 

I see that the df_andi executable in romfs/usr/bin is 16556 bytes long while df_andi in /user/DirectFB-examples/build-DirectFB-examples-1.0.1/src/ is 114009 bytes (in my 2009R1-RC6 distro).  They both run (and both fail with the same error), but I don't understand why these are different.  I thought the exe in user/DirectFB-examples/build-... was the one created during the build and that it was just copied over into romfs/usr/bin, but it looks like it's not that simple.  Where does romfs/usr/bin/df_andi come from?

QuoteReplyEditDelete

 

 

2009-09-29 18:34:40     Re: A couple of basic build questions

Mike Frysinger (UNITED STATES)

Message: 80662   

 

if you're copying things by hand, it's up to you to copy all files, not just the executables.  this is why the uclinux-dist and romfs target exist -- to automate installing *all* necessary files.

 

files installed into the romfs/ are automatically stripped.  i doubt you ran `strip` yourself on the binary before transferring it over.

QuoteReplyEditDelete

 

 

2009-09-29 18:44:32     Re: A couple of basic build questions

Jay Ku (UNITED STATES)

Message: 80663   

 

I didn't copy those over by myself (not initially)... I thought you were asking if I had tried copying them because the one that came over with the image didn't work.  All I'm doing is selecting the package in menuconfig, running make, and then running what shows up in /usr/bin.

 

Thanks for the info on strip.

QuoteReplyEditDelete

 

 

2009-09-30 01:56:07     Re: A couple of basic build questions

Mike Frysinger (UNITED STATES)

Message: 80675   

 

what is the *actual* error you see ?  the directfb code automatically displays "DATADIR" rather than expanding it to /usr/share/directfb-examples/ as it makes things easier to read.  if you run `strings` on the binary in question, then you'll see that it is looking in the right place for the file.

 

$ strings romfs/usr/bin/df_andi | grep jpg

/usr/share/directfb-examples/wood_andi.jpg

dfb->CreateImageProvider( dfb, DATADIR"/wood_andi.jpg", &provider )

Attachments

    Outcomes