DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-11-01 02:16:14

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Questions for Fonz re:Undefined References

Hi Fonz,

I am having a rough time getting vlc 0.9.5 compiled.  I compiled 0.8.6i with no problems.  I am getting various undefined reference errors and would like to understand why...

1. VLC is trying to figure out which clock to use.  It checks the _POSIX_CLOCK_SELECTION global and it returns 200112L.  VLC interprets this as to use the NANOSLEEP clock.  But earlier, VLC tried to find clock_nanosleep in librt and received undefined reference to `clock_nanosleep'.  At this point VLC is confused and issues a colorful error: We have quite a situation here! Fix me if it ever happens. In the source code, I found this comment: /* Clock selection without clock in the first place, I don't think so. */  Is this supposed to be French humor? smile  I can hack the source to use the realtime clock but I'm wondering about this error.

2. VLC checks _POSIX_SPIN_LOCKS and it returns 200112L.  VLC interprets this as spinlocks are supported.  It then tries to access pthread_spin_init, pthread_spin_lock, pthread_spin_unlock, and pthread_spin_destroy.  I receive undefined references for all of these.


Thanks,
John

Offline

 

#2 2008-11-01 13:09:38

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Questions for Fonz re:Undefined References

boilerjt wrote:

I am getting various undefined reference errors and would like to understand why...

In some areas, uClibc is still incomplete. While some of the pthread functions are implemented, /ffp/include/pthread.h says spinlock are "Not yet implemented in uClibc!". Many projects don't test their stuff on uClibc, so it happens that the configure scripts and Makefiles make 'wrong' assumptions. You can either try to fix stuff yourself (and send a patch to the vlc people), or wait for someone else to to it.

Offline

 

#3 2008-11-01 15:01:43

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: Questions for Fonz re:Undefined References

fonz wrote:

boilerjt wrote:

I am getting various undefined reference errors and would like to understand why...

In some areas, uClibc is still incomplete. While some of the pthread functions are implemented, /ffp/include/pthread.h says spinlock are "Not yet implemented in uClibc!". Many projects don't test their stuff on uClibc, so it happens that the configure scripts and Makefiles make 'wrong' assumptions. You can either try to fix stuff yourself (and send a patch to the vlc people), or wait for someone else to to it.

This makes sense and that's the answer I was kind of expecting.  I can modify the vlc #if defined statements and config.h easily enough to get it to compile, but just wanted to know why it sometimes received incorrect answers from system globals.

Thanks smile

Offline

 

#4 2008-11-02 02:57:00

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Questions for Fonz re:Undefined References

Can you post your fixes here for future reference - since I am thinking of compiling vlc too one of these days.
Or better yet, contribute your funpackage...
Thanks

Offline

 

#5 2008-11-02 03:18:52

boilerjt
Member
From: Minnesota, USA
Registered: 2008-09-15
Posts: 122

Re: Questions for Fonz re:Undefined References

puterboy wrote:

Can you post your fixes here for future reference - since I am thinking of compiling vlc too one of these days.
Or better yet, contribute your funpackage...
Thanks

I'll try to document all of the changes (there were a lot of them) and package up the modified source code for you.  For now, here is a link to all of the ffp packages I've made (including vlc 0.95).  I haven't had much of a chance to test it yet.

Link:  http://www.box.net/shared/4lro749ze3

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB