mldonkey-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-bugs] [bug #37075] mldonkey fails to compile upnp libraries on


From: Thruth Wang
Subject: [Mldonkey-bugs] [bug #37075] mldonkey fails to compile upnp libraries on Mac OSX due to pthread_mutex_timedlock()
Date: Sat, 11 Aug 2012 14:34:40 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.75 Safari/537.1

URL:
  <http://savannah.nongnu.org/bugs/?37075>

                 Summary: mldonkey fails to compile upnp libraries on Mac OSX
due to pthread_mutex_timedlock() 
                 Project: mldonkey, a multi-networks file-sharing client
            Submitted by: thruth
            Submitted on: Sat 11 Aug 2012 02:34:40 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: Compilation problem
                  Status: None
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 
                 Release: 3.1.2
        Operating System: None
         Binaries Origin: CVS / Self compiled
                CPU type: x86_64

    _______________________________________________________

Details:

With '--enable-force-upnp-natpmp' present when ./configure, mldonkey will
report no error in the configure phase but will fail in building mlnet
binary:

{{{
Compile time error:
Undefined symbols for architecture x86_64:
  "_pthread_mutex_timedlock", referenced from:
      _upnpNatpmpThread in upnp_stubs.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
File "caml_startup", line 1:
Error: Error during linking
make: *** [mlnet] Error 2
}}}

This is because of the use of pthread_mutex_timedlock() in
src/utils/net/upnp_stubs.c line 874, plus that Mac OSX has not implemented
pthread_mutex_timedlock() from 10.4 (or even earlier) to the latest 10.8. Here
is a somewhat complete explanation of the situation:
http://lists.apple.com/archives/Unix-porting/2008/Jan/msg00014.html

What mldonkey might want to do is that:

Detecting support for pthread_mutex_timedlock() in configure scripts, when the
support is not available, removing the only call for pthread_mutex_timedlock()
in "src/utils/net/upnp_stubs.c". 

Specifically from LINE 871:
                if ( g_running ){
                        deltatime.tv_sec = time(NULL) + 30;
                        deltatime.tv_nsec = 0;
                        dbg_printf("%d seconds timedlock, running...\n", 
deltatime.tv_sec);

I am not even a developer so I have no idea how to achieve above logic... But
in such a way, Mac OSX users get a build success for mldonkey with upnp libs.
The only compromise is the absence of a number in debug log.

If there is anything I can do please let me know. Thanks.

btw. Seems that Android has no  pthread_mutex_timedlock() implementation
either.





    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?37075>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]