NetBSD-Users archive

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

Re: Trying to compile QUCS-S under NetBSD




El 19/11/25 a las 21:53, Greg Troxel escribió:
Ramiro Aceves <ea1abz%gmail.com@localhost> writes:

Anyway, I have been able to compile QUCS-S. Instead of git cloning this:

https://github.com/ra3xdh/qucs_s.git

I downloaded a stable release:

https://github.com/ra3xdh/qucs_s/releases/download/25.2.0/qucs-s-25.2.0.tar.gz

I compiled with:

$cmake .. \
   -DBISON_DIR=/usr/pkg/bin \
   -DCMAKE_INSTALL_PREFIX=/home/ramiro/qucs-s \
   -DCMAKE_PREFIX_PATH=/usr/pkg/qt6 \
   -DCMAKE_INCLUDE_PATH=/usr/pkg/include \
   -DCMAKE_LIBRARY_PATH=/usr/pkg/lib \
   -DCMAKE_CXX_FLAGS="-I/usr/pkg/include" \
   -DCMAKE_EXE_LINKER_FLAGS="-L/usr/pkg/lib"

$make -j8
Yes, you are close.  Look for a package that has ".include" of
..../cmake/build.mk
It is possible url2pkg will even do this for you.

$make install

netbsd-nuc$ ./qucs-s
./qucs-s: Shared object "libQt6SvgWidgets.so.6" not found
netbsd-nuc$

netbsd-nuc$ ldd qucs-s
qucs-s:
	-lQt6SvgWidgets.6 => not found
	-lQt6Xml.6 => not found
	-lQt6PrintSupport.6 => not found
	-lQt6Svg.6 => not found
	-lQt6Widgets.6 => not found
	-lQt6Gui.6 => not found
	-lGL.1 => not found
	-lQt6Core.6 => not found
	-lstdc++.9 => /usr/lib/libstdc++.so.9
	-lm.0 => /usr/lib/libm.so.0
	-lc.12 => /usr/lib/libc.so.12
	-lgcc_s.1 => /usr/lib/libgcc_s.so.1
	-lpthread.1 => /usr/lib/libpthread.so.1

I think I am close.
You are.  Likely the pkgsrc build will not have those 'not found' as it
sets up rpath correctly.


Hello Greg,

I’ve started reading the pkgsrc guide again in my small amount of free time (I haven’t finished it yet, nor fully understood everything), and I managed to create a preliminary package for QUCS-S. I’m not entirely sure how the internal magic worked or why it worked. I used url2pkg and then added some dependencies to the Makefile until the Qt6 compilation errors disappeared.

The package now compiles and installs. QUCS-S starts and can even simulate an example circuit. I’m sure it’s not fully correct, but for me it’s a good and encouraging starting point. I’m not sure about the dependency list, I’m not sure whether it will work on another computer, and I don’t know whether I just got lucky because all the dependencies happened to be present on my system—meaning it might fail elsewhere.

I still need to read the guide and keep learning how all of this works…


netbsd-nuc# cat Makefile
# $NetBSD$

DISTNAME=    qucs-s-25.2.0
CATEGORIES=    cad
MASTER_SITES=    ${MASTER_SITE_GITHUB:=ra3xdh/}
GITHUB_PROJECT=    qucs_s
GITHUB_RELEASE=    25.2.0
DIST_SUBDIR=    ${GITHUB_PROJECT}

MAINTAINER=    INSERT_YOUR_MAIL_ADDRESS_HERE # or use pkgsrc-users%NetBSD.org@localhost
HOMEPAGE=    https://github.com/ra3xdh/qucs_s/
COMMENT=    Qucs-S is a circuit simulation program based on Qucs circuit simulator.
#LICENSE=    # TODO: (see mk/license.mk)

USE_LANGUAGES=    bison c c++


CMAKE_CONFIGURE_ARGS+= -DBISON_DIR=${PREFIX}/bin
#CMAKE_CONFIGURE_ARGS+= -DCMAKE_PREFIX_PATH=/usr/pkg/qt6




.include "../../devel/cmake/build.mk"
.include "../../devel/qt6-qttools/buildlink3.mk"
.include "../../x11/qt6-qtbase/buildlink3.mk"
.include "../../graphics/qt6-qtsvg/buildlink3.mk"
.include "../../graphics/qt6-qtcharts/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

netbsd-nuc#

I will continue learning. Not sure about bison CMAKE_CONFIGURE_ARGS, sure it can be avoided...

Regards.

Ramiro.







Home | Main Index | Thread Index | Old Index