Syllable Forum Index Syllable
Syllable Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DirectFB
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Syllable Forum Index -> Syllable Desktop
View previous topic :: View next topic  
Author Message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Wed Feb 15, 2012 2:24 pm    Post subject: Reply with quote

Cool. Many interesting things can be built on DirectFB. You do know that Builder has a recipe for DirectFB 1.4.3?
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Thu Feb 16, 2012 4:13 am    Post subject: Reply with quote

Yes, I've downloaded almost all recipes. Precisely, the version v1.0.0 is the first which supports SDL and apparently works a bit but not completely ("rc" versions don't work very well). There are still some bugs in the tests especially for "dfbscreen" which takes all system resources. I even started to compile a version of GTK2 but with many errors during compilation.
Newer versions of DirectFB give an error about the "thread" just after the initialization of SDL.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Thu Feb 16, 2012 1:40 pm    Post subject: Reply with quote

You can download all recipes at once simply by doing

build update
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Thu Feb 16, 2012 2:35 pm    Post subject: Reply with quote

You may want to try on the new development release to see if that works better.
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Mon May 07, 2012 2:18 pm    Post subject: Reply with quote

Did you get DirectFB to display any window or graphics? I have been able to compile DirectFB versions up to 1.2.1 but couldn't get any graphics output.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Tue May 08, 2012 9:31 am    Post subject: Reply with quote

In fact, the only version which apparently works is version 1.0.0. But the SDL window hangs after a test. SDL support must be still experimental.
I have not tried all versions but I have problems with "glibc" and "pthread" for the latest versions. Indeed, it seemed that "pthread.h" is not complete in Syllable Desktop.
Back to top
View user's profile Send private message
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Tue May 08, 2012 9:42 am    Post subject: Reply with quote

No version, including 1.0.0, opens a window for me. Do you get any graphics in it?

PThreads is a fairly broad specification. Many implementations, including Syllable's, are incomplete. Software should check what functions are available, and DirectFB warns for deadlocks because of a missing part, so I suppose that's what's happening.
Back to top
View user's profile Send private message Visit poster's website
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Tue May 08, 2012 10:10 am    Post subject: Reply with quote

No and that's the problem. But I also noticed problems on Linux with SDL. Normally, the window should open and close very quickly and then give some informations about DirectFB (depending on the test), but not on Syllable. Sad
Back to top
View user's profile Send private message
Bogomips



Joined: 23 Feb 2011
Posts: 307
Location: France

PostPosted: Wed May 09, 2012 4:50 am    Post subject: Reply with quote

Well, this morning I managed to launch two animations in a SDL window with DirectFB-1.0.0. I compiled DirectFB-examples-1.0.0. The animations "df_knuckles" and "df_fire" work. But if I use the mouse in the window, the animation stops.
I created a file ".directfbrc" in "/home/root" and I added:
system=sdl
wm=unique
Back to top
View user's profile Send private message
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Fri May 18, 2012 1:56 pm    Post subject: Reply with quote

Which bits of libpthread does DirectFB warn about?
Back to top
View user's profile Send private message Send e-mail
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Fri May 18, 2012 4:18 pm    Post subject: Reply with quote

It says:

configure: WARNING:
*** PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is not defined! Dead locks might occur!

Versions up to 1.2.1 only warn for it during configure, but later versions refuse to run with a similar runtime error. There are also other runtime symptoms in versions after 1.0.0, but this must be the leading cause.
Back to top
View user's profile Send private message Visit poster's website
Vanders
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 849

PostPosted: Sun May 27, 2012 4:02 pm    Post subject: Reply with quote

Oh fancy that, yet another broken source that assume Linux. It might be worth checking that _GNU_SOURCE is not defined, which *might* make DirectFB behave and not ass-u-me that it's running on top of NPTL, but you know what Linux developers are like...
Back to top
View user's profile Send private message Send e-mail
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Sun May 27, 2012 6:40 pm    Post subject: Reply with quote

We have recursive mutexes, but no PTHREAD_RECURSIVE_MUTEX_INITIALIZER. Wouldn't that be needed to replace PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP? Maybe DirectFB tries to use the Linux version because it can't find the standard version.

I can't see if PTHREAD_MUTEX_INITIALIZER would be a sufficient initialiser for PTHREAD_RECURSIVE_MUTEX_INITIALIZER. However, isn't there a bug in the definition? It's this:

#define PTHREAD_MUTEX_INITIALIZER \
{ 0, 0, 0, NULL }

A mutex is defined like this:

typedef struct __pthread_mutex_s
{
sem_id __mutex;
pthread_t __owner;
unsigned long __count;
pthread_mutexattr_t *__attr;
pthread_mutexattr_t __def_attr;
} pthread_mutex_t;

A pthread is this:

struct __pthread_s
{
thread_id id;
pthread_attr_t *attr;
};
typedef struct __pthread_s * pthread_t;

Since a pthread is a pointer, it seems to me that the second initialiser should be NULL instead of 0?

#define PTHREAD_MUTEX_INITIALIZER \
{ 0, NULL, 0, NULL }
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Sun May 27, 2012 7:07 pm    Post subject: Reply with quote

If our PTHREAD_MUTEX_RECURSIVE conforms to the latest standard, my understanding is that it should be possible to replace PTHREAD_MUTEX_RECURSIVE_NP with it. The NP (Non-Portable) versions in Linux were introduced before the standard, so there is a problem with some software using the NP versions to support old Linux versions.
Back to top
View user's profile Send private message Visit poster's website
Kaj
The Knights of Syllable


Joined: 14 Sep 2007
Posts: 2202
Location: Friesland

PostPosted: Sun May 27, 2012 8:20 pm    Post subject: Reply with quote

It seems suspect to me that PTHREAD_MUTEX_INITIALIZER doesn't initialise the mutex fully. Shouldn't it be:

#define PTHREAD_MUTEX_INITIALIZER \
{ 0, NULL, 0, NULL, NULL, PTHREAD_MUTEX_DEFAULT, PTHREAD_PROCESS_PRIVATE }

And then PTHREAD_RECURSIVE_MUTEX_INITIALIZER would be:

#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
{ 0, NULL, 0, NULL, NULL, PTHREAD_MUTEX_RECURSIVE, PTHREAD_PROCESS_PRIVATE }
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Syllable Forum Index -> Syllable Desktop All times are GMT - 6 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group