pkgsrc-Users archive

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

Re: mongodb4 on aarch64



On Mon, Sep 23, 2024 at 09:04:55PM -0400, Greg Troxel wrote:
> mongodb4 (needed for unifi) fails to build on aarch64 (as one would run
> on RPI4) under NetBSD 10.
> 
> It seems there is a way for programs to find out cache line size, and a
> way to tell the compiler, and then warnings (errors) if this feature is
> used in a way that might end up in an ABI.
> 
> The package has:
> 
> .if ${MACHINE_ARCH} == "aarch64"
> CXXFLAGS+=             --param=destructive-interference-size=64
> .endif
> 
> which was needed for one person, but that flag is unknown on netbsd10
> and the build fails.
> 
> My theory is that the compiler in current has more warnings, and this
> setting fixes them.
> 
> Removing the CXXFLAGS+= line, it builds and packages on netbsd-10.  I do
> not yet know if it works ok.  (It is fine on amd64, unsurprisingly, as
> evidenced by unifi working.)
> 
> If you are using mongodb4 on aarch64, please let me know if 9, 10, or
> current, and if it builds now, and once built, if it works.
> 
> I am inclined to drop this flag addition because building on 10 is more
> important than current (at least for the branch), and we can add it back
> based on gcc version or somehow, for systems that need it, once we
> understand more about what's going on.

For now, wrap it in

.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109900
.endif

?
 Thomas


Home | Main Index | Thread Index | Old Index