Re: RPI3 - clang 3.9.0 issues

2016-10-18 Thread Shawn Webb
On Mon, Oct 17, 2016 at 09:40:53PM -0400, Shawn Webb wrote:
> On Mon, Oct 17, 2016 at 05:11:43PM -0400, Shawn Webb wrote:
> >
> > I'm tracking down a potential issue with jemalloc compiled with clang
> > 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in
> > addition to HardenedBSD. Most of my testing has been done with
> > HardenedBSD to-date.
> 
> The jemalloc issue exists with vanilla FreeBSD with clang 3.9.0 + lld:
> 
> ===>   Registering installation for pkg-1.9.1
> : 
> /scratch/arm64/fbsd-clang390/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/tcache.h:346:
>  Failed assertion: "binind < nhbins"
> 
> With pkg failing to install, it seems building ports/packages directly
> on the rpi3 won't be viable until this bug is fixed.

I was able to work around this issue by disabling tcache via
malloc.conf:

ln -s 'tcache:false' /etc/malloc.conf

pkg would install, but /usr/local/sbin/pkg was mislinked:
http://ix.io/1xlt

So as a workaround to that, I just mv'd /usr/local/sbin/pkg to
/usr/local/sbin/pkg.bak and replaced it with a symlink to
/usr/local/sbin/pkg-static.

I've now successfully compiled and installed a few ports. I've also
updated the wiki to document the two workarounds described above.

https://wiki.freebsd.org/arm64/rpi3

Thanks,

-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature


Re: RPI3 - clang 3.9.0 issues

2016-10-18 Thread Shawn Webb
On Tue, Oct 18, 2016 at 03:27:43PM -0400, Shawn Webb wrote:
> On Mon, Oct 17, 2016 at 09:40:53PM -0400, Shawn Webb wrote:
> > On Mon, Oct 17, 2016 at 05:11:43PM -0400, Shawn Webb wrote:
> > >
> > > I'm tracking down a potential issue with jemalloc compiled with clang
> > > 3.9.0, but I need to verify that the issue exists in vanilla FreeBSD in
> > > addition to HardenedBSD. Most of my testing has been done with
> > > HardenedBSD to-date.
> > 
> > The jemalloc issue exists with vanilla FreeBSD with clang 3.9.0 + lld:
> > 
> > ===>   Registering installation for pkg-1.9.1
> > : 
> > /scratch/arm64/fbsd-clang390/lib/libc/../../contrib/jemalloc/include/jemalloc/internal/tcache.h:346:
> >  Failed assertion: "binind < nhbins"
> > 
> > With pkg failing to install, it seems building ports/packages directly
> > on the rpi3 won't be viable until this bug is fixed.
> 
> I was able to work around this issue by disabling tcache via
> malloc.conf:
> 
> ln -s 'tcache:false' /etc/malloc.conf
> 
> pkg would install, but /usr/local/sbin/pkg was mislinked:
> http://ix.io/1xlt

It seems this type of mislinking happens with more than just pkg:

(pkgconf-1.0.1) /usr/ports/devel/pkgconf/work/stage//usr/local/bin/pkgconf - 
required shared library ./.libs/libpkgconf.so not found

So I wonder if it's happening with all dynamically-linked executables
in the ports tree.


-- 
Shawn Webb
Cofounder and Security Engineer
HardenedBSD

GPG Key ID:  0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE


signature.asc
Description: PGP signature