Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build instructions for Windows #224

Open
keck9939 opened this issue Jan 15, 2021 · 2 comments
Open

Build instructions for Windows #224

keck9939 opened this issue Jan 15, 2021 · 2 comments

Comments

@keck9939
Copy link

keck9939 commented Jan 15, 2021

The build instructions on the wiki for Windows seem to be somewhat incomplete. I have been able to get Pothos to build and install using the following:
cmake -DCMAKE_TOOLCHAIN_FILE=E:\Dev\vcpkg\scripts\buildsystems\vcpkg.cmake -DSoapySDR_DIR="E:\Program Files\PothosSDR\cmake" -Wno-dev .. -DCMAKE_INSTALL_PREFIX=E:\TEST

where I'm using vcpkg to provide the Qt5 dependency and defining SoapySDR_DIR this way is a cheat. The -Wno-dev is needed to avoid being overwhelmed by error messages that are not intended for the end user.

cmake --build . --config RelWithDebInfo

then works.

cmake --install . --config RelWithDebInfo

also works.

Trying to run pothosflow then fails due to missing dlls, but after copying them all from the vcpkg binary directory pothosflow starts, but puts up an error dialog with this message: "This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem."

I'm stuck here.

Since it may help, the output from pothosutil --info is:

PS E:\TEST\bin> .\PothosUtil.exe --system-info
Lib Version: 0.7.1-gdbef61e8
API Version: 0.7.0
ABI Version: 0.7-2
Root Path: E:\TEST
Data Path: E:\TEST\share\Pothos
User Data: C:\Users\keck.MyDomain\AppData\Roaming\Pothos
User Config: C:\Users\keck.MyDomain\AppData\Roaming\Pothos
Runtime Library: E:\TEST\bin\Pothos.dll
Util Executable: E:\TEST\bin\PothosUtil.exe
Dev Include Path: E:\TEST\include
Dev Library Path: E:\TEST\lib
Module Search Paths:

  • E:\TEST\lib\Pothos\modules0.7-2

I am not a cmake expert, but on the other hand, it does seem like it might be possible to update the wiki to provide instructions that allow one to build a working installation without being a guru.

Edit: after writing the above:
I got pothosflow to start after I copied the platforms directory from the vcpkg plugins\platforms directory to the ..bin\platforms at the install location. However, it appears a lot of blocks are missing and when I drop almost any of the listed blocks in, I get a bunch of dll "failed safe load" errors, so I've still got a problem. According to dependencies.exe, it is probable that these dlls cannot find some of the dlls that are in the bin directory, and I'm not sure how you straighten out the build so everything can find the dlls they need in the correct locations. On the other hand, the prebuilt version of pothos shows the same missing dependencies as my version, so I'm guessing these dependencies get satisfied because they have already been loaded by either pothosflow or pothosutil when these dlls get loaded, and hence they will be found at runtime. So I don't know what is going on.

@guruofquality
Copy link
Contributor

I totally get how much of a tasking building windows and herding DLLs can be. I have put a lot of work on this branch for msvc 2019 (https://github.com/pothosware/PothosSDR/tree/msvc_2019), and it should have way less required build dependencies. So if you are currently able to build PothosCore, you should be able to build the whole environment (without the optional dependencies too). It might go easier for you:

@keck9939
Copy link
Author

keck9939 commented Jan 16, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants