[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running radioconda with MSYS2
From: |
Price, Rodney D. |
Subject: |
Re: Running radioconda with MSYS2 |
Date: |
Mon, 24 Jul 2023 16:40:10 +0000 |
I'm sorry to pester people on the list this way, but my employer's (buggy) spam
filter apparently caught a reply to the message below, but then seems to have
lost the actual email. I checked the list archive at
https://lists.gnu.org/archive/html/discuss-gnuradio/2023-07/index.html, but
nothing appears there. (Perhaps there's a bit of a lag there -- the archive
says that the email below was sent on Saturday.)
At any rate, if anyone replied to this message on the list, could they repost
their reply, or alternatively, just email me directly?
Thanks, and apologies for the noise,
-Rod
-----Original Message-----
From: discuss-gnuradio-bounces+price-rodney=zai.com@gnu.org
<discuss-gnuradio-bounces+price-rodney=zai.com@gnu.org> On Behalf Of Price,
Rodney D.
Sent: Friday, July 21, 2023 6:35 PM
To: discuss-gnuradio@gnu.org
Subject: EXTERNAL: Re: Running radioconda with MSYS2
I've decided to try to compile gnuradio under MSYS2 directly, without using
anything from radioconda. I'm starting out with libvolk. I've adapted the
PKGBUILD file from the Arch Linux AUR repo, here:
https://gitlab.archlinux.org/archlinux/packaging/packages/libvolk following the
instructions for MSYS2 given here: https://www.msys2.org/dev/new-package/.
(MSYS2 uses the same package manager as Arch Linux, pacman.) I've included my
new PKGBUILD at the end of this email for reference. The relevant part for
cmake is
-----
build() {
local cmake_options=(
-B build
-G "MinGW Makefiles"
-D PYTHON_EXECUTABLE=/mingw64/bin/python.exe
-D CMAKE_C_COMPILER=/mingw64/bin/gcc.exe
-D CMAKE_CXX_COMPILER=/mingw64/bin/g++.exe
-D CMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
-D CMAKE_INSTALL_PREFIX=/usr/local
-W no-dev
-S volk-3.0.0
)
export PYTHON_EXECUTABLE=/mingw64/bin/python.exe
cmake "${cmake_options[@]}"
cmake --build build --verbose
}
-----
This is a bash function that pacman runs. Everything goes just fine until the
tests are run, when I get
-----
...
99% tests passed, 1 tests failed out of 139
Total Test time (real) = 36.76 sec
The following tests FAILED:
101 - qa_volk_32fc_x2_conjugate_dot_prod_32fc (Failed) Errors while
running CTest
-----
Is this anything to worry about? One test failing? I'm running
-- python 3.10.12
-- gcc/g++ 13.1.0
-- cmake 3.27.0
Thanks,
-Rod
-----Original Message-----
From: Ryan Volz <ryan.volz@gmail.com>
Sent: Tuesday, July 11, 2023 1:20 PM
To: Price, Rodney D. <Price-Rodney@zai.com>; discuss-gnuradio@gnu.org
Subject: EXTERNAL: Re: Running radioconda with MSYS2
Hi Rodney,
I don't have extensive experience with MSYS2, but I think it would be hard to
mix that and radioconda as you are discovering. But I don't think that you
would need to mix them, and you should be able to build an OOT module with
gr_modtool and all from just the Conda Prompt that comes with radioconda. (The
Conda Prompt is just a regular cmd.exe where the radioconda environment has
been activated, i.e. the environment is put first on the path when searching
for binaries.) You could even use gcc or clang if you must, although it would
be easiest to use MSVC, same as GNU Radio was built with.
The following Wiki entry is about building OOT modules, but similar
considerations will apply for development:
https://wiki.gnuradio.org/index.php/CondaInstall#Building_OOT_modules_to_use_with_conda-installed_GNU_Radio
Cheers,
Ryan
On 7/11/23 2:42 PM, Price, Rodney D. wrote:
> I’ve installed radioconda 3.10.6.0 on a Windows 10 box, along with
> MSYS2 <https://www.msys2.org/> to give me a bash prompt with all the
> usual tools. I’d like to develop OOT modules in both python (3.10) and
> C++ (either gcc or clang). However, I’m beginning to wonder if this is
> possible with radioconda, since
>
> $ gnuradio-config-info --cflags
>
> C:/Program Files/Microsoft Visual
> Studio/2022/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/c
>
> l.exe:::/MD /O2 /Ob2 /DNDEBUG /DWIN32 /D_WINDOWS /W3
>
> C:/Program Files/Microsoft Visual
> Studio/2022/Enterprise/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/c
>
> l.exe:::/MD /O2 /Ob2 /DNDEBUG -DHAVE_SNPRINTF /DWIN32 /D_WINDOWS /W3
> /GR /EHsc
>
> which seems to imply that I have to use MS Visual Studio for C++
> development. Is this true?
>
> What if I stick to python only? Can that be done?
>
> Second question: Running gr_modtool in the MSYS2 MINGW64 shell, I get
>
> $ gr_modtool newmod tmp
>
> ModToolException: Could not find gr-newmod source dir.
>
> So I look for the sources, by running
>
> $ gnuradio-config-info --prefix
>
> There’s no response. Then
>
> $ gnuradio-config-info –-sysconfdir
>
> etc
>
> This is not helpful. Which ‘etc’ are we talking about?
>
> Finally, after some digging, I find what appears to be the gr-newmod
> source directory, so I try
>
> $ gr_modtool newmod --srcdir
> /c/Users/rdprice/Apps/radioconda/Library/share/gnuradio/modtool/templa
> tes/gr-newmod temp
>
> Creating out-of-tree module in .\gr-temp...
>
> Failed to copy .clang-format: [Errno 2] No such file or directory:
> 'share\\gnuradio\\clang-format.conf'
>
> Done.
>
> Use 'gr_modtool add' to add a new block to this currently empty module.
>
> This is progress. Now I have a directory ‘gr-temp’ with subdirectories
> that look familiar. However, the fact that it can’t find
> clang-format.conf makes me think that I’m going to run into “No such
> file or directory” many more times. The file /is/ there, in the place
> stated.
>
> Suggestions? Should I give up on radioconda and try to compile
> gnuradio from source under mingw64 (shudder)?
>
> Thanks,
>
> -Rod
>
-----
# Maintainer:
# Contributor: Kyle Keen <keenerd@gmail.com>
_name=volk
_realname=libvolk
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
epoch=2
pkgver=3.0.0
_cpuver=0.6.0
pkgrel=2
pkgdesc="The Vector-Optimized Library of Kernels from Gnuradio (mingw-w64)"
# arch=('x86_64')
arch=('x86_64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32')
url="https://www.libvolk.org/"
license=('GPL3')
depends=(
gcc-libs
# ${MINGW_PACKAGE_PREFIX}-boost-libs
${MINGW_PACKAGE_PREFIX}-orc
${MINGW_PACKAGE_PREFIX}-python
${MINGW_PACKAGE_PREFIX}-python-six
)
makedepends=(
${MINGW_PACKAGE_PREFIX}-cmake
${MINGW_PACKAGE_PREFIX}-boost
${MINGW_PACKAGE_PREFIX}-python-mako
)
source=("volk-$pkgver.tgz::https://github.com/gnuradio/volk/archive/v$pkgver.tar.gz"
"cpufeatures-$_cpuver.tgz::https://github.com/google/cpu_features/archive/v$_cpuver.tar.gz")
sha256sums=('617c25a5a240e41e50d695851925541b19e011d516c3e0c288a5aeefb3ceb7fd'
'95a1cf6f24948031df114798a97eea2a71143bd38a4d07d9a758dda3924c1932')
validpgpkeys=('09E749D885FA881A7E84E823385323EE6402091D'
'D74F9F146E7F755783583158B343B2BA293E5174')
prepare() {
cd $_name-$pkgver
rmdir cpu_features
ln -sf "$srcdir/cpu_features-$_cpuver" cpu_features }
_builddir="build-${MSYSTEM}"
build() {
local cmake_options=(
-B ${_builddir}
-G "MinGW Makefiles"
-D PYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe
-D CMAKE_C_COMPILER=${MINGW_PREFIX}/bin/gcc.exe
-D CMAKE_CXX_COMPILER=${MINGW_PREFIX}/bin/g++.exe
-D CMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
-D CMAKE_INSTALL_PREFIX=${MINGW_PREFIX}
-W no-dev
-S $_name-$pkgver
)
export PYTHON_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe
cmake "${cmake_options[@]}"
cmake --build ${_builddir} --verbose
}
# build() {
# local cmake_options=(
# -B build
# -G "MinGW Makefiles"
# -D PYTHON_EXECUTABLE=/mingw64/bin/python.exe
# -D CMAKE_C_COMPILER=/mingw64/bin/gcc.exe
# -D CMAKE_CXX_COMPILER=/mingw64/bin/g++.exe
# -D CMAKE_C_FLAGS="$CFLAGS -ffat-lto-objects"
# -D CMAKE_INSTALL_PREFIX=/usr/local
# -W no-dev
# -S volk-3.0.0
# )
# export PYTHON_EXECUTABLE=/mingw64/bin/python.exe
# cmake "${cmake_options[@]}"
# cmake --build build --verbose
# }
check() {
ctest --test-dir ${_builddir} --output-on-failure -E 'check_lgpl'
}
package() {
DESTDIR="$pkgdir" cmake --install ${_builddir} }
-----
________________________________
This message is intended only for the use of the individual or entity to which
it is addressed and may contain ZETA Associates confidential or proprietary
information. If you are not the intended recipient, any use, dissemination, or
distribution of this communication is prohibited. If you have received this
communication in error, please notify the sender and delete all copies.
________________________________
This message is intended only for the use of the individual or entity to which
it is addressed and may contain ZETA Associates confidential or proprietary
information. If you are not the intended recipient, any use, dissemination, or
distribution of this communication is prohibited. If you have received this
communication in error, please notify the sender and delete all copies.