pkgsrc-Users archive

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

Re: php73 build failure



On Tue, Oct 15, 2019 at 12:48:48PM +0200, Thomas Klausner wrote:
> On Sun, Sep 22, 2019 at 05:00:09PM +0200, Thomas Klausner wrote:
> > On Sun, Sep 22, 2019 at 09:26:04PM +0900, Takahiro Kambe wrote:
> > > In message <20190922073223.gurwh533lmefcwtk@danbala>
> > > 	on Sun, 22 Sep 2019 09:32:23 +0200,
> > > 	Thomas Klausner <wiz%NetBSD.org@localhost> wrote:
> > > > I see a repeatable build failure in php73 on 9.99.x/amd64 (currently
> > > > x=12). It seems that e.g. mef and taca can build it fine.
> > > > 
> > > > It looks like this for me:
> > > Is there php73 installed?
> > 
> > No, it's in an empty sandbox with just the noted dependencies
> > installed (pbulk and manual try).
> 
> Ok, I found out the difference. It breaks for me when I set
> PKGSRC_USE_RELRO=yes. If that is not set, it builds fine.
> Can you please try if you can reproduce this?
> 
> I wonder why this breaks php73 but not the other phps.
>  Thomas

Hi wiz, here's a standalone repro.
Not many packages use ifuncs.

#!/bin/sh

cat << EOF > ifunc.c
#include <stdio.h>
#include <stdlib.h>
void php_base64_encode(void);
__ifunc(php_base64_encode, resolve_base64_encode);
void php_base64_encode_avx2(void);
void php_base64_encode_sse3(void);

static void *resolve_base64_encode() {
	if (getenv("AVX"))
		return php_base64_encode_avx2;
	else
		return php_base64_encode_sse3;
}

void php_base64_encode_sse3() {
	printf("sse3\n");
}


void php_base64_encode_avx2() {
	printf("avx2\n");
}

int main() { php_base64_encode(); return 0; }
EOF
gcc -Wl,-z,relro -Wl,-z,now ifunc.c -o ifunc
./ifunc



Home | Main Index | Thread Index | Old Index