On Tue, Jan 27, 2026 at 04:17:33PM +0000, Stuart Henderson wrote:
> On 2026/01/27 14:31, Claudio Jeker wrote:
> > On my sparc64 bulks ngspice fails constantly because it detects the fftw3
> > lib but not the headers and so the compile fails trying to use fftw3.
> > 
> > We can either disable fftw3 (which is trivial) or maybe it would be better
> > to depend on fftw3 (since ngspice documentation mentions that the fall
> > back code is not very good).
> > 
> > Here is a diff disabling fftw3
> > -- 
> > :wq Claudio
> > 
> > Index: cad/ngspice/ngspice/Makefile
> > ===================================================================
> > RCS file: /cvs/ports/cad/ngspice/ngspice/Makefile,v
> > diff -u -p -r1.6 Makefile
> > --- cad/ngspice/ngspice/Makefile    27 Feb 2025 12:49:43 -0000      1.6
> > +++ cad/ngspice/ngspice/Makefile    26 Jan 2026 13:48:01 -0000
> > @@ -4,6 +4,6 @@ WANTLIB += ${COMPILER_LIBCXX} ICE SM X11
> >  WANTLIB += Xmu Xpm Xrender Xt c curses expat fontconfig freetype
> >  WANTLIB += m readline xcb z
> >  
> > -CONFIGURE_ARGS +=  --with-x
> > +CONFIGURE_ARGS +=  --with-x --with-fftw3=no
> >  
> >  .include <bsd.port.mk>
> > 
> 
> 
> does this work on sparc64? (linking to the standard c++ library seems
> a bit messed up in their configure script and it was failing to link
> properly on amd64 with COMPILER=ports-gcc but I'm hoping it might be
> alright on an arch which is not base-clang).
> 
> (also checked to make sure it doesn't pick up fftw3f).
> 
> Index: Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/cad/ngspice/Makefile.inc,v
> diff -u -p -r1.8 Makefile.inc
> --- Makefile.inc      9 Jun 2025 20:30:16 -0000       1.8
> +++ Makefile.inc      27 Jan 2026 16:14:53 -0000
> @@ -29,3 +29,6 @@ CONFIGURE_ARGS +=   --enable-cider \
>                       --with-readline=yes
>  
>  CONFIGURE_ARGS +=    --disable-openmp
> +
> +CONFIGURE_ENV =              CPPFLAGS=-I${LOCALBASE}/include \
> +                     LDFLAGS=-L${LOCALBASE}/lib
> Index: libngspice/Makefile
> ===================================================================
> RCS file: /cvs/ports/cad/ngspice/libngspice/Makefile,v
> diff -u -p -r1.8 Makefile
> --- libngspice/Makefile       9 Jun 2025 20:30:16 -0000       1.8
> +++ libngspice/Makefile       27 Jan 2026 16:14:53 -0000
> @@ -1,14 +1,16 @@
>  COMMENT =    ngspice shared library, based on Berkeley SPICE
>  
>  PKGNAME =    libngspice-${V}
> -REVISION =   0
> +REVISION =   1
>  
>  SHARED_LIBS +=  ngspice                0.0 # 0.0
>  
> -WANTLIB += ${COMPILER_LIBCXX} m pthread
> +WANTLIB += ${COMPILER_LIBCXX} fftw3 m pthread
>  
>  CONFIGURE_ARGS +=    --with-ngshared \
>                       --enable-shared
> +
> +LIB_DEPENDS =        math/fftw3
>  
>  # same tests as cad/ngspice/ngspice, but they assume you've built a binary
>  NO_TEST =    Yes
> Index: ngspice/Makefile
> ===================================================================
> RCS file: /cvs/ports/cad/ngspice/ngspice/Makefile,v
> diff -u -p -r1.6 Makefile
> --- ngspice/Makefile  27 Feb 2025 12:49:43 -0000      1.6
> +++ ngspice/Makefile  27 Jan 2026 16:14:53 -0000
> @@ -1,9 +1,13 @@
> +REVISION =   0
> +
>  COMMENT =    circuit simulator, based on Berkeley SPICE
>  
>  WANTLIB += ${COMPILER_LIBCXX} ICE SM X11 Xau Xaw Xdmcp Xext Xft
> -WANTLIB += Xmu Xpm Xrender Xt c curses expat fontconfig freetype
> -WANTLIB += m readline xcb z
> +WANTLIB += Xmu Xpm Xrender Xt c curses expat fftw3 fontconfig
> +WANTLIB += freetype m readline xcb z
>  
>  CONFIGURE_ARGS +=    --with-x
> +
> +LIB_DEPENDS =        math/fftw3
>  
>  .include <bsd.port.mk>
> 

This built on sparc64 fine. OK claudio@
-- 
:wq Claudio

Reply via email to