2008-01-11 08:19:03     mapping framebuffer in DirectFB fails

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

2008-01-11 08:19:03     mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49502    Hi all,

 

I try to run a directFB programm on a BF-548EzKit Board. I use directFB 1.1.1-release and compiled it for the blackfin without jpeg-, png-image provider and freetype.

I also build a uclinux-kernel with framebuffer support and the bf54x-lq043 driver (e.g. nano-X works fine).

After invoking a directFB Programm I get a: Could not mmap frambuffer ---> no such device error.

In directFB I found the lines:

 

     /* Map the framebuffer */

     dfb_fbdev->framebuffer_base = mmap( NULL, shared->fix.smem_len,

                                         PROT_READ | PROT_WRITE, MAP_SHARED,

                                         dfb_fbdev->fd, 0 );

 

     if (dfb_fbdev->framebuffer_base == MAP_FAILED) {

          D_PERROR( "DirectFB/FBDev: "

                    "Could not mmap the framebuffer!\n");

 

I then searched a little bit in the mmap-sources and found the reason for the mmap to fail in /mm/nommu.c:

        if (!file->f_op->get_unmapped_area)

             capabilities &= ~BDI_CAP_MAP_DIRECT;

and

        if (!(capabilities & BDI_CAP_MAP_DIRECT))

              return -ENODEV;          

 

Has anybody experiences with this stuff or can give me a hint weather it might be a problem in the driver, the kernel or in directFB(...) ?

 

Thanks a lot

-joachim-

TranslateQuoteReplyEditDelete

 

 

2008-01-11 13:02:33     Re: mapping framebuffer in DirectFB fails

Kris Dickie (CANADA)

Message: 49510    Joachim, I am using nano-X myself without a problem, I would really like to goto directFB soon, I believe it will be faster than the less than exciting XLib protocols that seem to cause such a slow down.

 

Anyhow, I have written some external test programs, and also needed to patch nano-X to get the FB to work properly.

 

This is the call I make:

fb_handle  = (unsigned short *)mmap(0, height * width * (bpp >> 3), PROT_READ | PROT_WRITE, MAP_FILE | MAP_PRIVATE, screenHandle, 0);

 

I have tried MAP_SHARED, and it always fails, so try MAP_FILE | MAP_PRIVATE, I believe I took this from the video_test program when I was working with the BF537 EZKIT, I now work with the BF548 EZKIT and the LQ043 It works pretty great.

 

It would be great to exchange information on a regular basis if we find anything new, since it sounds like we are both working with the display on the 548. In any case, let me know how directFB goes, and what the footprint is. I don't use any widgets library, but rather create some basic ones myself under nano-X. As I mentioned, I want to move to directFB, and possibly use wxWidgets, as there is a new port for directFB (there is also one for nano-X).

QuoteReplyEditDelete

 

 

2008-01-11 13:33:06     Re: mapping framebuffer in DirectFB fails

Cyril HAENEL (FRANCE)

Message: 49512    Hi Joachim and Kris,

 

I also use the LQ043 (an equivalent in fact, but in extended temperature version), but under bf537.

I plan to use nano-X, without windows manager or widget toolkits, because everything will be done "at hand".

What you say about directFB interrest me too if it is faster than nano-X.

It is complicated to compile it and integrate it in the uClinux dist ?

 

Regards,

Cyril

TranslateQuoteReplyEditDelete

 

 

2008-01-11 14:16:19     Re: mapping framebuffer in DirectFB fails

Kris Dickie (CANADA)

Message: 49514    It shouldn't be too complicated, just need to add some basic patches for the configuration. I may have a go at it later on if nobody else has gotten around to it.

QuoteReplyEditDelete

 

 

2008-01-12 01:03:41     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49519    as Kris indicated, this is merely the MAP_SHARED issue again

 

ive fixed it and added DirectFB-1.1.1 to the dist ... feel free to test it.  the bundled test programs seemed to run fine on my BF548-EZKIT.

QuoteReplyEditDelete

 

 

2008-01-14 05:19:33     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49541    good news, thank you very much. I'll try as soon as my svn is working again...

 

Kris:

It would be fine to exchange experiences about directFB and the display. But I must admit I'm just at the very beginning...

TranslateQuoteReplyEditDelete

 

 

2008-01-17 06:09:51     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49733    Mike:

sorry, it toolk me quite a while to start testing... I made a complete download of the toolchain, the dist, the kernel and u-boot yesterday (started from scratch). I tried to build directfb via menuconfig (build libraries), but  got a compilation error : "dlfcn.h missing". I found it in the toolchain sources and copied it (and /bits/dlfcn.h) from

toolchain/uclibc/include and

toolchain/uclibc/libc/sysdeps/linux/common/bits.

Now compilation worked and the tools are build, too.

I tried to run them on the board and got :

 

(*) DirectFB/Core: Single Application Core. (200-01-16 15:34)

DirectFB/core/system: No system found!

Tools/Screen: DirectFBCreate() failed!

    --> No (suitable) implementation found!

 

"strace" does not really help me out of this, so do you have an idea what i have done wrong (maybe the dlfcn.h files)?

TranslateQuoteReplyEditDelete

 

 

2008-01-17 10:28:59     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49750    make sure you do `svn up` first as i originally forgot to actually commit the mmap fix ... i added the patch, but didnt apply it

 

dont go copying arbitrary header files for the toolchain ... if a header wasnt found, then hacking around the toolchain is rarely the solution.  dlfcn.h only works for FDPIC ELF, not FLAT.  i tested FDPIC ELF, not FLAT.  i'll check out FLAT today to see if it's possible.

QuoteReplyEditDelete

 

 

2008-01-17 14:53:32     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49758    i just fixed building for FLAT, so if you `svn up`, you'll get the fixes

 

i wasnt able to test it though as i dont have a BF548-EZKIT on me at the moment

QuoteReplyEditDelete

 

 

2008-01-22 06:44:10     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49951    Building the DirectFB Lib seems to work. But I've got still a problem building the DirectFB Examples. Make breaks with an undefined reference error to 'pthread_mutex_unlock' in function direct_log_unlock. I also tried to run the dfbinfo program which was build in /staging/usr/bin and got the same error as above (No system found!). I use the latest toolchain and the dist and kernel from yesterday.  I hope you can help me out,

thanks

-joachim-

TranslateQuoteReplyEditDelete

 

 

2008-01-22 07:05:15     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49952    i dont know what examples you're referring to ... all of the binaries that are in lib/DirectFB/ build/run fine for me

QuoteReplyEditDelete

 

 

2008-01-22 07:24:57     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49953    when i do the following:

 

> make menuconfig

--> Customize Vendor/User Settings

--> Blackfin app Programs

(*) DirectFB Examples

 

make fails with the above error.

Is there something wrong with this procedure?

TranslateQuoteReplyEditDelete

 

 

2008-01-22 08:27:49     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49955    please post an actual build error ... i just tested over here and it's building for me as FLAT without any troubles

QuoteReplyEditDelete

 

 

2008-01-22 11:11:26     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49957    mike:

this is what I get after make (actually the lines just before the error). If you need the complete log I'll post it:

regards

-joachim-

 

bfin-uclinux-gcc -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration  -Wl,-elf2flt      -mcpu=bf548-0.0 -o df_texture df_texture.o ve.o -L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect   -lm

bfin-uclinux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"DirectFB-examples\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -I. -I../../DirectFB-examples-1.0.1/src  -DDATADIR=\"/usr/share/directfb-examples\" -DFONT=\"/usr/share/directfb-examples/fonts/decker.ttf\" -DEMBED -D__uClinux__ -I/home/joachims/uclinux/uclinux-dist     -mcpu=bf548-0.0 -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration -MT df_window.o -MD -MP -MF .deps/df_window.Tpo -c -o df_window.o ../../DirectFB-examples-1.0.1/src/df_window.c

mv -f .deps/df_window.Tpo .deps/df_window.Po

bfin-uclinux-gcc -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration  -Wl,-elf2flt      -mcpu=bf548-0.0 -o df_window df_window.o -L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect   -lm

bfin-uclinux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"DirectFB-examples\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -I. -I../../DirectFB-examples-1.0.1/src  -DDATADIR=\"/usr/share/directfb-examples\" -DFONT=\"/usr/share/directfb-examples/fonts/decker.ttf\" -DEMBED -D__uClinux__ -I/home/joachims/uclinux/uclinux-dist     -mcpu=bf548-0.0 -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration -MT pss.o -MD -MP -MF .deps/pss.Tpo -c -o pss.o ../../DirectFB-examples-1.0.1/src/pss.c

mv -f .deps/pss.Tpo .deps/pss.Po

bfin-uclinux-gcc -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration  -Wl,-elf2flt      -mcpu=bf548-0.0 -o pss pss.o -L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect   -lm

bfin-uclinux-gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"DirectFB-examples\" -DVERSION=\"1.0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDBOOL_H=1 -I. -I../../DirectFB-examples-1.0.1/src  -DDATADIR=\"/usr/share/directfb-examples\" -DFONT=\"/usr/share/directfb-examples/fonts/decker.ttf\" -DEMBED -D__uClinux__ -I/home/joachims/uclinux/uclinux-dist     -mcpu=bf548-0.0 -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration -MT ve_test.o -MD -MP -MF .deps/ve_test.Tpo -c -o ve_test.o ../../DirectFB-examples-1.0.1/src/ve_test.c

mv -f .deps/ve_test.Tpo .deps/ve_test.Po

bfin-uclinux-gcc -D_REENTRANT -I/home/joachims/uclinux/uclinux-dist/staging/usr/include/directfb   -D_GNU_SOURCE -Wall -O3 -pipe -pipe -Wall -g -O2       -mcpu=bf548-0.0 -Werror-implicit-function-declaration  -Wl,-elf2flt      -mcpu=bf548-0.0 -o ve_test ve_test.o ve.o -L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect   -lm

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(log.o): In function `direct_log_unlock':

../../../DirectFB-1.1.1/lib/direct/log.c:213: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(log.o): In function `direct_log_lock':

../../../DirectFB-1.1.1/lib/direct/log.c:197: undefined reference to `_pthread_mutex_lock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(log.o): In function `direct_log_printf':

../../../DirectFB-1.1.1/lib/direct/log.c:163: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/log.c:167: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(util.o): In function `direct_util_recursive_pthread_mutex_init':

../../../DirectFB-1.1.1/lib/direct/util.c:233: undefined reference to `_pthread_mutexattr_init'

../../../DirectFB-1.1.1/lib/direct/util.c:235: undefined reference to `_pthread_mutexattr_settype'

../../../DirectFB-1.1.1/lib/direct/util.c:237: undefined reference to `_pthread_mutex_init'

../../../DirectFB-1.1.1/lib/direct/util.c:241: undefined reference to `_pthread_mutexattr_destroy'

../../../DirectFB-1.1.1/lib/direct/util.c:241: undefined reference to `_pthread_mutexattr_destroy'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(debug.o): In function `trap':

../../../DirectFB-1.1.1/lib/direct/debug.c:325: undefined reference to `_pthread_exit'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(debug.o): In function `direct_debug_enter':

../../../DirectFB-1.1.1/lib/direct/debug.c:223: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/debug.c:227: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(debug.o): In function `direct_debug_config_domain':

../../../DirectFB-1.1.1/lib/direct/debug.c:121: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/debug.c:142: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(debug.o): In function `direct_debug_at':

../../../DirectFB-1.1.1/lib/direct/debug.c:175: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/debug.c:179: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(debug.o): In function `direct_debug_exit':

../../../DirectFB-1.1.1/lib/direct/debug.c:272: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/debug.c:276: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_detach':

../../../DirectFB-1.1.1/lib/direct/thread.c:353: undefined reference to `_pthread_detach'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_cancel':

../../../DirectFB-1.1.1/lib/direct/thread.c:329: undefined reference to `_pthread_cancel'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_destroy':

../../../DirectFB-1.1.1/lib/direct/thread.c:423: undefined reference to `_pthread_self'

../../../DirectFB-1.1.1/lib/direct/thread.c:423: undefined reference to `_pthread_equal'

../../../DirectFB-1.1.1/lib/direct/thread.c:438: undefined reference to `_pthread_detach'

../../../DirectFB-1.1.1/lib/direct/thread.c:439: undefined reference to `_pthread_cancel'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_join':

../../../DirectFB-1.1.1/lib/direct/thread.c:390: undefined reference to `_pthread_self'

../../../DirectFB-1.1.1/lib/direct/thread.c:390: undefined reference to `_pthread_equal'

../../../DirectFB-1.1.1/lib/direct/thread.c:395: undefined reference to `_pthread_join'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_testcancel':

../../../DirectFB-1.1.1/lib/direct/thread.c:373: undefined reference to `_pthread_testcancel'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_self_name':

../../../DirectFB-1.1.1/lib/direct/thread.c:262: undefined reference to `_pthread_getspecific'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_self':

../../../DirectFB-1.1.1/lib/direct/thread.c:233: undefined reference to `_pthread_getspecific'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_remove_init_handler':

../../../DirectFB-1.1.1/lib/direct/thread.c:137: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:141: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_add_init_handler':

../../../DirectFB-1.1.1/lib/direct/thread.c:123: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:127: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_set_name':

../../../DirectFB-1.1.1/lib/direct/thread.c:276: undefined reference to `_pthread_getspecific'

../../../DirectFB-1.1.1/lib/direct/thread.c:281: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:286: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/thread.c:295: undefined reference to `_pthread_self'

../../../DirectFB-1.1.1/lib/direct/thread.c:298: undefined reference to `_pthread_setspecific'

../../../DirectFB-1.1.1/lib/direct/thread.c:284: undefined reference to `_pthread_key_create'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_create':

../../../DirectFB-1.1.1/lib/direct/thread.c:170: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:175: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/thread.c:196: undefined reference to `_pthread_cond_init'

../../../DirectFB-1.1.1/lib/direct/thread.c:202: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:206: undefined reference to `_pthread_create'

../../../DirectFB-1.1.1/lib/direct/thread.c:212: undefined reference to `_pthread_cond_wait'

../../../DirectFB-1.1.1/lib/direct/thread.c:220: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/thread.c:173: undefined reference to `_pthread_key_create'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(thread.o): In function `direct_thread_main':

../../../DirectFB-1.1.1/lib/direct/thread.c:514: undefined reference to `__pthread_cleanup_push'

../../../DirectFB-1.1.1/lib/direct/thread.c:517: undefined reference to `_pthread_setspecific'

../../../DirectFB-1.1.1/lib/direct/thread.c:523: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:528: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/thread.c:552: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/thread.c:559: undefined reference to `_pthread_cond_signal'

../../../DirectFB-1.1.1/lib/direct/thread.c:564: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/thread.c:582: undefined reference to `__pthread_cleanup_pop'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(signals.o): In function `direct_signal_handler_add':

../../../DirectFB-1.1.1/lib/direct/signals.c:153: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/signals.c:155: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(signals.o): In function `direct_signals_block_all':

../../../DirectFB-1.1.1/lib/direct/signals.c:123: undefined reference to `_pthread_sigmask'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(signals.o): In function `direct_signals_shutdown':

../../../DirectFB-1.1.1/lib/direct/signals.c:109: undefined reference to `_pthread_mutex_destroy'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(signals.o): In function `signal_handler':

../../../DirectFB-1.1.1/lib/direct/signals.c:369: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/signals.c:392: undefined reference to `_pthread_mutex_unlock'

../../../DirectFB-1.1.1/lib/direct/signals.c:401: undefined reference to `_pthread_mutex_unlock'

/home/joachims/uclinux/uclinux-dist/staging/usr/lib/libdirect.a(signals.o): In function `direct_signal_handler_remove':

../../../DirectFB-1.1.1/lib/direct/signals.c:170: undefined reference to `_pthread_mutex_lock'

../../../DirectFB-1.1.1/lib/direct/signals.c:172: undefined reference to `_pthread_mutex_unlock'

collect2: ld returned 1 exit status

make[6]: *** [ve_test] Error 1

make[6]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user/DirectFB-examples/build-DirectFB-examples-1.0.1/src'

make[5]: *** [all-recursive] Error 1

make[5]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user/DirectFB-examples/build-DirectFB-examples-1.0.1/src'

make[4]: *** [all-recursive] Error 1

make[4]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user/DirectFB-examples/build-DirectFB-examples-1.0.1'

make[3]: *** [all] Error 2

make[3]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user/DirectFB-examples'

make[2]: *** [DirectFB-examples] Error 2

make[2]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user'

make[1]: *** [all] Error 2

make[1]: Leaving directory `/home/joachims/uclinux/uclinux-dist/user'

make: *** [subdirs] Error 1

TranslateQuoteReplyEditDelete

 

 

2008-01-22 18:35:51     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49977    for whatever reason, the library order on your system is incorrect ... this part:

... -ldirectfb -lfusion -lpthread -ldirect ...

should actually read:

... -ldirectfb -lfusion -ldirect -lpthread ...

which is how it is on my system right now

 

run this command and post the output:

grep ^Libs staging/usr/lib/pkgconfig/*.pc

QuoteReplyEditDelete

 

 

2008-01-23 03:18:03     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 49989    joachims@rd:~/uclinux/uclinux-dist> grep ^Libs staging/usr/lib/pkgconfig/*.pc

staging/usr/lib/pkgconfig/directfb.pc:Libs: -L${libdir} -ldirectfb -lpthread

staging/usr/lib/pkgconfig/directfb.pc:Libs.private: -L${libdir}

staging/usr/lib/pkgconfig/direct.pc:Libs: -L${libdir} -ldirect -lpthread

staging/usr/lib/pkgconfig/direct.pc:Libs.private: -L${libdir}

staging/usr/lib/pkgconfig/freetype2.pc:Libs: -L${libdir} -lfreetype -lz

staging/usr/lib/pkgconfig/fusion.pc:Libs: -L${libdir} -lfusion

staging/usr/lib/pkgconfig/libpng12.pc:Libs: -L${libdir} -lpng12 -lz -lm

staging/usr/lib/pkgconfig/libpng.pc:Libs: -L${libdir} -lpng12 -lz -lm

joachims@rd:~/uclinux/uclinux-dist>

TranslateQuoteReplyEditDelete

 

 

2008-01-23 03:51:53     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 49993    so go into the user/DirectFB-examples/build-DirectFB-examples-1.0.1/ and make sure the directfb variables are recorded properly in config.log and the makefiles

QuoteReplyEditDelete

 

 

2008-01-23 08:26:57     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50025    I guess you refering to the DIRECTFB_LIBS variable, so it is

DIRECTFB_LIBS='-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect  ' in config.log and

DIRECTFB_LIBS = -L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect in the Makefile.

 

I attach both files so you might be able to take a quick look if you want...

 

 

Makefile

config.log

TranslateQuoteReplyEditDelete

 

 

2008-01-23 10:09:36     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 50028    so try running in the top level:

STAGEDIR=$PWD/staging ./tools/staging-pkg-config directfb --libs

 

it should show:

-L/............/staging/usr/lib -ldirectfb -lfusion -ldirect -lpthread

QuoteReplyEditDelete

 

 

2008-01-23 10:37:12     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50032    here I also get the wrong order:

 

joachims@rd:~/uclinux/uclinux-dist> STAGEDIR=$PWD/staging ./tools/staging-pkg-config directfb --libs

-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect

 

TranslateQuoteReplyEditDelete

 

 

2008-01-23 11:35:03     Re: mapping framebuffer in DirectFB fails

Mike Frysinger (UNITED STATES)

Message: 50040    export LC_ALL=C

 

then re-run the command with --debug

 

also what version of pkg-config do you have:

pkg-config --version

QuoteReplyEditDelete

 

 

2008-01-24 04:07:36     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50072    joachims@rd:~/uclinux/uclinux-dist> export LC_ALL=C

joachims@rd:~/uclinux/uclinux-dist> STAGEDIR=$PWD/staging ./tools/staging-pkg-config directfb --libs --debug

Option --debug seen

Error printing enabled by default due to use of --version, --libs, --cflags, --libs-only-l, --libs-only-L, --libs-only-other, --cflags-only-I, --cflags-only-other or --list. Value of --silence-errors: 0

Error printing enabled

Adding virtual 'pkg-config' package to list of known packages

Scanning directory '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig'

Ignoring file '.' in search directory; not a .pc file

Ignoring file '..' in search directory; not a .pc file

File 'freetype2.pc' appears to be a .pc file

Will find package 'freetype2' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/freetype2.pc'

File 'libpng.pc' appears to be a .pc file

Will find package 'libpng' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/libpng.pc'

File 'fusion.pc' appears to be a .pc file

Will find package 'fusion' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/fusion.pc'

File 'libpng12.pc' appears to be a .pc file

Will find package 'libpng12' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/libpng12.pc'

File 'directfb-internal.pc' appears to be a .pc file

Will find package 'directfb-internal' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/directfb-internal.pc'

File 'direct.pc' appears to be a .pc file

Will find package 'direct' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/direct.pc'

File 'directfb.pc' appears to be a .pc file

Will find package 'directfb' in file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/directfb.pc'

Looking for package 'directfb'

Looking for package 'directfb-uninstalled'

Reading 'directfb' from file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/directfb.pc'

Parsing package file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/directfb.pc'

  line>prefix='/home/joachims/uclinux/uclinux-dist/staging/usr'

Variable declaration, 'prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>exec_prefix=${prefix}

Variable declaration, 'exec_prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>libdir=${exec_prefix}/lib

Variable declaration, 'libdir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/lib'

  line>includedir=${prefix}/include

Variable declaration, 'includedir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/include'

  line>

  line>Name: DirectFB

  line>Description: Graphics and windowing library for the Linux frame buffer device

  line>Version: 1.1.1

  line>Requires: fusion direct

Looking for package 'fusion'

Looking for package 'fusion-uninstalled'

Reading 'fusion' from file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/fusion.pc'

Parsing package file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/fusion.pc'

  line>prefix='/home/joachims/uclinux/uclinux-dist/staging/usr'

Variable declaration, 'prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>exec_prefix=${prefix}

Variable declaration, 'exec_prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>libdir=${exec_prefix}/lib

Variable declaration, 'libdir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/lib'

  line>includedir=${prefix}/include

Variable declaration, 'includedir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/include'

  line>

  line>Name: Fusion IPC

  line>Description: High Level IPC Mechanisms

  line>Version: 1.1.1

  line>Requires: direct

Looking for package 'direct'

Looking for package 'direct-uninstalled'

Reading 'direct' from file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/direct.pc'

Parsing package file '/home/joachims/uclinux/uclinux-dist/staging/usr/lib/pkgconfig/direct.pc'

  line>prefix='/home/joachims/uclinux/uclinux-dist/staging/usr'

Variable declaration, 'prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>exec_prefix=${prefix}

Variable declaration, 'exec_prefix' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr''

  line>libdir=${exec_prefix}/lib

Variable declaration, 'libdir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/lib'

  line>includedir=${prefix}/include

Variable declaration, 'includedir' has value ''/home/joachims/uclinux/uclinux-dist/staging/usr'/include'

  line>

  line>Name: Direct

  line>Description: DirectFB base development library

  line>Version: 1.1.1

  line>Libs: -L${libdir} -ldirect -lpthread

  line>Libs.private: -L${libdir}

  line>Cflags: -D_REENTRANT -I${prefix}/include/directfb

Path position of 'Direct' is 1

Adding 'direct' to list of known packages, returning as package 'direct'

  line>Libs: -L${libdir} -lfusion

  line>Cflags: -I${prefix}/include/directfb

Path position of 'Fusion IPC' is 1

Adding 'fusion' to list of known packages, returning as package 'fusion'

  line>Libs: -L${libdir} -ldirectfb -lpthread

  line>Libs.private: -L${libdir}

  line>Cflags: -D_REENTRANT -I${prefix}/include/directfb

Path position of 'DirectFB' is 1

Adding 'directfb' to list of known packages, returning as package 'directfb'

original:  DirectFB  Fusion IPC  Direct  Direct

sorted:  DirectFB  Fusion IPC  Direct  Direct

original:  DirectFB  Fusion IPC  Direct  Direct

sorted:  DirectFB  Fusion IPC  Direct  Direct

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate "-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib"

removing duplicate (from back) "-ldirect"

removing duplicate (from back) "-lpthread"

removing duplicate (from back) "-lpthread"

-L/home/joachims/uclinux/uclinux-dist/staging/usr/lib -ldirectfb -lfusion -lpthread -ldirect

joachims@rd:~/uclinux/uclinux-dist>

 

pkg-config Version:

joachims@rd:~/uclinux/uclinux-dist> pkg-config --version

0.20

joachims@rd:~/uclinux/uclinux-dist>

 

regards

joachim

TranslateQuoteReplyEditDelete

 

 

2008-01-29 09:47:45     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50308    mike:

 

Thanks a lot for her help.

I made an update of my pkg-config to version 0.23 and now the order of the libs is correct. After that I just had a little Problem with the 'fonts' directory which was not build by make unless I created it by hand in uclinux-dist/user/DirectFB-examples. After that make worked fine... I wonder if this is an old problem and allready solved or not.

 

-regards-

joachim

TranslateQuoteReplyEditDelete

 

 

2008-01-29 10:30:49     Re: mapping framebuffer in DirectFB fails

Robin Getz (UNITED STATES)

Message: 50314    Joachim:

 

Yeah - I think that is my fault - it isn't fixed yet in svn. I will do something tonight.

 

After you created the directory by hand - did all the examples run OK? (some don't for me).

 

-Robin

QuoteReplyEditDelete

 

 

2008-01-29 10:58:36     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50317    -Robin-

 

Too sad, I still have a problem with all of the examples. e.g. I get the following error message:

 

DirectFB/core/system: No system found!

../../DirectFB-examples-1.0.1/src/df_andi.c

        (#) DirectFBError [DirectFBCreate(&dfb)]: No (suitable) implementation found!

 

Maybe there is still something wrong with my configuration?

 

-joachim-

TranslateQuoteReplyEditDelete

 

 

2008-01-29 16:47:12     Re: mapping framebuffer in DirectFB fails

Robin Getz (UNITED STATES)

Message: 50335    Joachim:

 

Hmm -- I think you are missing a lib somewhere.

 

Let me poke around, and see what lib I have configured...

 

CONFIG_LIB_ALSA_LIB=y

CONFIG_LIB_CONFUSE_FORCE=y

CONFIG_LIB_DIRECTFB_FORCE=y

CONFIG_LIB_DIRECTFB=y

CONFIG_LIB_EXPAT=y

CONFIG_LIB_FAAD2=y

CONFIG_LIB_FLAC=y

CONFIG_LIB_FREETYPE_FORCE=y

CONFIG_LIB_FREETYPE=y

CONFIG_LIB_LIBAUDIO=y

CONFIG_LIB_LIBBZ2=y

CONFIG_LIB_LIBCURL=y

CONFIG_LIB_LIBG=y

CONFIG_LIB_LIBID3TAG=y

CONFIG_LIB_LIBIDN=y

CONFIG_LIB_LIBJPEG_FORCE=y

CONFIG_LIB_LIBJPEG=y

CONFIG_LIB_LIBMAD=y

CONFIG_LIB_LIBPNG_FORCE=y

CONFIG_LIB_LIBPNG=y

CONFIG_LIB_LIBSDL_FORCE=y

CONFIG_LIB_LIBSDL=y

CONFIG_LIB_LIBSSL=y

CONFIG_LIB_LIBUSB=y

CONFIG_LIB_NCURSES=y

CONFIG_LIB_SDL_GFX_FORCE=y

CONFIG_LIB_SDL_IMAGE=y

CONFIG_LIB_SDL_MIXER=y

CONFIG_LIB_SDL_NET=y

CONFIG_LIB_SDL_TTF=y

CONFIG_LIB_TREMOR=y

CONFIG_LIB_TSLIB=y

CONFIG_LIB_ZLIB_FORCE=y

CONFIG_LIB_ZLIB=y

 

Can you check what you have, and see if any differences pop out? You may need to force some of the libs, so the directfb build knows it really wants to build with that library...

 

-Robin

QuoteReplyEditDelete

 

 

2008-01-31 10:01:18     Re: mapping framebuffer in DirectFB fails

joachim stahlhacke (GERMANY)

Message: 50473    -Robin-

sorry for bothering you again...

 

- now, after a 'make clean' I have to create a ' fonts'  directory in /romfs/usr/share/directfb-examples to make 'make' working.

- I checked the libs, and I forced the build of the missing ones (expat, faad2, flac, libaudio, libcurl, libid3tag, libidn, libmad, libssl, libusb, SDL_Image, SDL_mixer, SDL_net, SDL_ttf, tremor, tslib). Now I get an other error message:

 

(*) Direct/Thread: Running 'VT Switcher' (CRITICAL, 246)...

[  242:   0.000] --> Caught Signal 4 (at 0xd35fb4, illegal opcode) <--

Illegal Instruction

 

I tried strace and found the line just before this error message.

open("/proc/bus/pci/device ", O_READONLY) = -1 ENOENT (No such file or directory)

Do you have any Idea what might be the problem? Or could you post me your configuration file, so that I can try it out?

 

best regards

-joachim-

Attachments

    Outcomes