lang/perl5.12 segfault (amd64 - 8-STABLE)

Scott Sanbeg ssanbeg at gmail.com
Tue Jul 20 15:04:46 UTC 2010


The patch could possibly solve my challenge, but if it works then why do I
get this?

root at anchorage:/usr/ports/lang/perl5.12# patch < my.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- files/patch-freebsd.sh     2009-01-13 21:38:50.000000000 +0000
|+++ files/patch-freebsd.sh     2010-07-16 21:46:31.000000000 +0100
--------------------------
Patching file files/patch-freebsd.sh using Plan A...
patch: **** malformed patch at line 8: @@ -88,6 +88,8 @@

Scott

-----Original Message-----
From: owner-freebsd-ports at freebsd.org
[mailto:owner-freebsd-ports at freebsd.org] On Behalf Of Christopher Key
Sent: Sunday, July 18, 2010 8:46 PM
To: ports at freebsd.org
Subject: Re: lang/perl5.12 segfault (amd64 - 8-STABLE)

cjk32 at cam.ac.uk wrote:
> Someone who understands the perl threading internals needs to figure
> this out.
>
>   
Simple solution, there was a missing -lpthread, patch available from:

http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/148648


For some reason, linking binaries without -lpthread succeeds, but the
pthread calls in the resulting binary do nothing.

#v+
# cat pthread.c
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>

int main(void) {

  int i;
  pthread_key_t k;

  k = 1234;
  i = pthread_key_create(&k, NULL);
  fprintf(stderr, "%d %d\n", i, (int) k);

  return 0;

}
# gcc pthread.c -o pt1
# gcc pthread.c -lpthread -o pt2
# ./pt1
0 1234
# ./pt2
0 0
#v-

_______________________________________________
freebsd-ports at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe at freebsd.org"



More information about the freebsd-ports mailing list