tech-pkg archive

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

Re: pkgsrc is frozen for the 2025Q2 branch



Am Wed, 18 Jun 2025 09:48:20 +0000
schrieb "Orgis, Dr. Thomas" <thomas.orgis%uni-hamburg.de@localhost>:

> Regarding opencv ...
> 
> > Am 16.06.2025 um 10:26 schrieb Benny Siegert <bsiegert%gmail.com@localhost>:
> > 
> > opencv: undefined reference to `cblas_sgemm'
> > (https://releng.netbsd.org/bulktracker/pkg/54574152)  
> 
> Opencv cmake needs to ask for cblas, too. Right now broken for netlib
> blas, should work with openblas. Pkgsrc defaults to netlib.

Just a note that I am unable to work on this. My normal scripted build
environment is within a messy merge of patches from the last branch to
CVS head that I just don't have the time for, I don't have a normal
pbulk set up yet, and my other working copy on an Ubuntu box now
refuses to build x11/gtk3 as a dependency. I get

[710/1650] Linking target gtk/libgtk-3.so.0.2411.32
FAILED: gtk/libgtk-3.so.0.2411.32 
cc  -o gtk/libgtk-3.so.0.2411.32 […] -Wl,-R/data/pkg/lib /data/pkg/lib/libXinerama.so -Wl,--end-group
/usr/bin/ld: gtk/libgtk-3.so.0.2411.32.p/meson-generated_.._gtkdbusgenerated.c.o: in function `_gtk_mount_operation_handler_skeleton_dbus_interface_get_properties':
gtkdbusgenerated.c:(.text+0x6e7): undefined reference to `g_variant_builder_init_static'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
*** Error code 1


Beats we why I have so much trouble building things with pkgsrc on the
Ubuntu 22.04 install … I don't see me being able to invest the time to
fix these recent issues in time for the branch. I hope to get up some
more regular build pipeline set up on our Debian servers in the time
frame after that.

The build failure with the cblas symbols seems straightforward enough,
as I wrote before. One needs to make the CMake machinery aware of
libcblas as separate lib is a thing. AFAIR, this is a blind spot in the
standard FindBLAS of CMake which doesn't really know/care about the C
interface aspect … though I faintly remember something about code
adding libcblas if netlib blas is detected. That was NumPy's own meson
thing … I think … the correct way would be to also add FindCBLAS and
FindLAPACKE to CMake and provide to that the pkg-config names from
blas.mk with the -DBLA_PREFER_PKGCONFIG logic.

But then you also need to make upstreams care about the fact that they
use the C APIs (when not providing their own wrappers or possibly
non-matching headers) and that they cannot assume that these are part
of libblas or liblapack. But for any (optimized) case they care about,
they are …

Either someone hacks opencv build scripts or switches default BLAS for
pkgsrc to openblas … which sucks, as the reference should work. But I
also of course install the software for our users using an optimized
(C)BLAS library.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index