Skip site navigation (1)Skip section navigation (2)
Date:      19 Apr 2010 18:53:00 -0000
From:      John Levine <johnl@iecc.com>
To:        freebsd-questions@freebsd.org
Cc:        glarkin@FreeBSD.org
Subject:   Re: Questions about port revision numbers, portsnap, csup
Message-ID:  <20100419185300.55218.qmail@joyce.lan>
In-Reply-To: <4BCC9E65.20904@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I have the same problem, recently upgraded to PHP 5.3.2 and Apache
was crashing whenever I tried to use a mediawiki page until I commented
out the apc library.  (Apache is 2.0, Freebsd is still 7.0, if that
matters.)

>cd /usr/ports
>fetch http://people.freebsd.org/~glarkin/diffs/pecl-APC-3.1.3p1.diff
>patch < pecl-APC-3.1.3p1.diff

Didn't work, because pecl-APC is www/pecl-APC, not devel/pecl-APC.  I
edited the patch to be www/ rather than devel/ at which point the
patch applied but make failed due to one of the other patches:

===>  Patching for pecl-APC-3.1.3.p1
===>  Applying FreeBSD patches for pecl-APC-3.1.3.p1
1 out of 2 hunks failed--saving rejects to apc_sem.c.rej
=> Patch patch-apc_sem.c failed to apply cleanly.
*** Error code 1


Here's what's in apc_sem.c.rej


***************
*** 82,93 ****
          }
      }
      
-     if ((semid = semget(key, 1, IPC_CREAT | IPC_EXCL | perms)) >= 0) {
          /* sempahore created for the first time, initialize now */
          arg.val = initval;
          if (semctl(semid, 0, SETVAL, arg) < 0) {
              apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
          }
      }
      else if (errno == EEXIST) {
          /* sempahore already exists, don't initialize */
--- 82,97 ----
          }
      }
      
+     if ((semid = semget(key, 2, IPC_CREAT | IPC_EXCL | perms)) >= 0) {
          /* sempahore created for the first time, initialize now */
          arg.val = initval;
          if (semctl(semid, 0, SETVAL, arg) < 0) {
              apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
          }
+         arg.val = getpid();
+         if (semctl(semid, 1, SETVAL, arg) < 0) {
+             apc_eprint("apc_sem_create: semctl(%d,...) failed:", semid);
+         }
      }
      else if (errno == EEXIST) {
          /* sempahore already exists, don't initialize */




R's,
John



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