Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 2010 07:37:37 -0700
From:      "Scott Sanbeg" <ssanbeg@gmail.com>
To:        "'Christopher Key'" <cjk32@cam.ac.uk>
Cc:        ports@freebsd.org
Subject:   RE: lang/perl5.12 segfault (amd64 - 8-STABLE)
Message-ID:  <34E328CA9DFF430C83108175DB941C79@sunrise>
In-Reply-To: <4C43CA8D.3090404@cam.ac.uk>
References:  <20100717041919.70411.qmail@exxodus.fedaykin.here>	<4C414AB5.1060305@gwdg.de>	<alpine.BSF.2.00.1007170744070.9805@tiktik.epipe.com><alpine.BSF.2.00.1007170911460.9805@tiktik.epipe.com> <4C43CA8D.3090404@cam.ac.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
The patch could possibly solve my challenge, but if it works then why do I
get this?

root@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@freebsd.org
[mailto:owner-freebsd-ports@freebsd.org] On Behalf Of Christopher Key
Sent: Sunday, July 18, 2010 8:46 PM
To: ports@freebsd.org
Subject: Re: lang/perl5.12 segfault (amd64 - 8-STABLE)

cjk32@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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34E328CA9DFF430C83108175DB941C79>