Skip Menu |

This queue is for tickets about the threads-lite CPAN distribution.

Report information
The Basics
Id: 84607
Status: resolved
Priority: 0/
Queue: threads-lite

People
Owner: Nobody in particular
Requestors: hanenkamp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.032
Fixed in: (no value)



Subject: Does not install on OS X 10.8 64-bit and perl 5.16.3
The C code compiles (with warnings) but won't link. My architecture info: % uname -a Darwin weasley.hanenkamp 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct 18 12:13:47 PDT 2012; root:xnu-2050.20.9~1/RELEASE_X86_64 x86_64 Here's a transcript of the build failure: % perl Build.PL Created MYMETA.yml and MYMETA.json Creating new 'Build' script for 'threads-lite' version '0.032' % ./Build Building threads-lite cc -Isrc -I/Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -o src/message.o src/message.c cc -Isrc -I/Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -o src/mthread.o src/mthread.c src/mthread.c:75:2: warning: expression result unused [-Wunused-value] hv_store(PL_modglobal, "threads::lite::thread", 21, thread_sv, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE/hv.h:485:6: note: expanded from macro 'hv_store' ((SV**) hv_common_key_len((hv), (key), (klen), \ ^ src/mthread.c:79:2: warning: expression result unused [-Wunused-value] hv_store(PL_modglobal, "threads::lite::self", 19, self, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE/hv.h:485:6: note: expanded from macro 'hv_store' ((SV**) hv_common_key_len((hv), (key), (klen), \ ^ src/mthread.c:82:2: warning: expression result unused [-Wunused-value] hv_store(PL_modglobal, "threads::lite::message_cache", 28, (SV*)message_cache, 0); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE/hv.h:485:6: note: expanded from macro 'hv_store' ((SV**) hv_common_key_len((hv), (key), (klen), \ ^ src/mthread.c:121:4: warning: expression result unused [-Wunused-value] SvREFCNT_inc(list_ref); ^~~~~~~~~~~~~~~~~~~~~~ /Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE/sv.h:233:2: note: expanded from macro 'SvREFCNT_inc' _sv; \ ^~~ 4 warnings generated. cc -Isrc -I/Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -o src/queue.o src/queue.c cc -Isrc -I/Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -o src/resources.o src/resources.c src/resources.c:180:4: warning: expression result unused [-Wunused-value] } THREAD_CATCH( MUTEX_UNLOCK(&queues_lock) ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/resources.c:161:55: note: expanded from macro 'THREAD_CATCH' #define THREAD_CATCH(undo) THREAD_CATCH_FINALLY(undo, 0) ^ src/resources.c:158:2: note: expanded from macro 'THREAD_CATCH_FINALLY' finally;\ ^~~~~~~ src/resources.c:191:4: warning: expression result unused [-Wunused-value] } THREAD_CATCH( MUTEX_UNLOCK(&queues_lock) ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/resources.c:161:55: note: expanded from macro 'THREAD_CATCH' #define THREAD_CATCH(undo) THREAD_CATCH_FINALLY(undo, 0) ^ src/resources.c:158:2: note: expanded from macro 'THREAD_CATCH_FINALLY' finally;\ ^~~~~~~ src/resources.c:204:4: warning: expression result unused [-Wunused-value] } THREAD_CATCH( MUTEX_UNLOCK(&queues_lock) ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/resources.c:161:55: note: expanded from macro 'THREAD_CATCH' #define THREAD_CATCH(undo) THREAD_CATCH_FINALLY(undo, 0) ^ src/resources.c:158:2: note: expanded from macro 'THREAD_CATCH_FINALLY' finally;\ ^~~~~~~ src/resources.c:242:4: warning: expression result unused [-Wunused-value] } THREAD_FINALLY( MUTEX_UNLOCK(&thread->lock) ); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/resources.c:163:51: note: expanded from macro 'THREAD_FINALLY' #define THREAD_FINALLY(undo) THREAD_CATCH_FINALLY(0, undo) ^ src/resources.c:159:15: note: expanded from macro 'THREAD_CATCH_FINALLY' XCPT_CATCH { catch; XCPT_RETHROW; } ^~~~~ 4 warnings generated. cc -Isrc -I/Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/darwin-thread-multi-2level/CORE -DXS_VERSION="0.032" -DVERSION="0.032" -c -fno-common -DPERL_DARWIN -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/opt/local/include -O3 -o lib/threads/lite.o lib/threads/lite.c lib/threads/lite.xs:192:15: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] if (message = queue_receive_nb(queue_id)) { ~~~~~~~~^~~~~~~~~~~~~~~~~~ lib/threads/lite.xs:192:15: note: place parentheses around the assignment to silence this warning if (message = queue_receive_nb(queue_id)) { ^ ( ) lib/threads/lite.xs:192:15: note: use '==' to turn this assignment into an equality comparison if (message = queue_receive_nb(queue_id)) { ^ == 1 warning generated. ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/threads/lite/lite.bs') env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib -fstack-protector -o blib/arch/auto/threads/lite/lite.bundle lib/threads/lite.o src/message.o src/mthread.o src/queue.o src/resources.o ld: targeted OS version does not support use of thread local variables in _S_get_thread for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) error building blib/arch/auto/threads/lite/lite.bundle from lib/threads/lite.o src/message.o src/mthread.o src/queue.o src/resources.o at /Users/sterling/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/ExtUtils/CBuilder/Base.pm line 312.
On Sat Apr 13 12:16:04 2013, HANENKAMP wrote: Show quoted text
> The C code compiles (with warnings) but won't link. > > My architecture info: > > % uname -a > Darwin weasley.hanenkamp 12.2.1 Darwin Kernel Version 12.2.1: Thu Oct > 18 12:13:47 PDT 2012; root:xnu-2050.20.9~1/RELEASE_X86_64 x86_64 >
Show quoted text
> ExtUtils::Mkbootstrap::Mkbootstrap('blib/arch/auto/threads/lite/lite.bs') > env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bundle -undefined dynamic_lookup > -L/usr/local/lib -L/opt/local/lib -fstack-protector -o > blib/arch/auto/threads/lite/lite.bundle lib/threads/lite.o > src/message.o src/mthread.o src/queue.o src/resources.o > ld: targeted OS version does not support use of thread local variables > in _S_get_thread for architecture x86_64 > clang: error: linker command failed with exit code 1 (use -v to see > invocation)
Your cc value (env MACOSX_DEPLOYMENT_TARGET=10.3 cc) is outdated. This is sadly still the default value for self-compiled perls on darwin, but it disables essential feature that have been supported for quite some time. Compiling with cc=gcc or something similar should fix everything.