Issue compiling Pothos on Windows 10

170 views
Skip to first unread message

Dimitar Penev

unread,
Mar 4, 2017, 2:31:16 AM3/4/17
to Pothos Users
Hi All,

My first post here. 
I am waiting my LimeSDR and decide to give Pothos compilation under Win 10 a try. 

I have managed to compile it but if I run PothosGUI  I get "Exception: Unknown Exception" 
PothosUtil also didn't start. 
The rest of the executable starts properly and draws lines if I push the buttons,  

What I did:

1. Installed Visual Studio 2015 free edition 
2. Installed  Qt5.8.0 32b version (with 64bit version I got compilation target mismatch)
3. Installed  Python35-32b (with the 64bit version got target mismatch)
4. isnatlled numpy using pip
5. added Qt and Python into my path. 
6. I am building Pothos in Power shell console as it is closer to favorite Linix feel 
7. I cloned latest Pothos from the git
8. Crated build directory and in it:
     cmake ..   (here I get lot of workings like  "Policy CMP0020 is not set: Automatically link Qt executables to qtmain")
     cmake --build . --config Release
     cmake --build . --config Release  --target install (I needed administrator privilege of the console this to succeed)

9.When I started PothosGUI I got missing dll so I had to add "C:\Qt5.8.0\5.8\msvc2015\bin" in my path  

10. Now I get this exception. "Exception: Unknown Exception"  

Anyone can help? What information I can provide to narrow the issue. 

Thanks 
Dimitar

Josh Blum

unread,
Mar 5, 2017, 12:03:48 AM3/5/17
to pothos...@googlegroups.com


On 03/03/2017 11:31 PM, Dimitar Penev wrote:
> Hi All,
>
> My first post here.
> I am waiting my LimeSDR and decide to give Pothos compilation under Win 10
> a try.
>
> I have managed to compile it but if I run PothosGUI I get "Exception:
> Unknown Exception"
> PothosUtil also didn't start.
> The rest of the executable starts properly and draws lines if I push the
> buttons,
>
> What I did:
>
> 1. Installed Visual Studio 2015 free edition
> 2. Installed Qt5.8.0 32b version (with 64bit version I got compilation
> target mismatch)
> 3. Installed Python35-32b (with the 64bit version got target mismatch)
> 4. isnatlled numpy using pip
> 5. added Qt and Python into my path.

I have never built pothos stuff for 32-bit windows, but in principal it
should work. But make sure that everything you download for dependencies
is matching in ABI with the build; or else things will segfault.

* Same architecture (x84 vs amd64)
* Same build type (Release vs Debug)
* Same C++ API (MSVC 2015 vs 2013)

> 6. I am building Pothos in Power shell console as it is closer to favorite
> Linix feel
> 7. I cloned latest Pothos from the git
> 8. Crated build directory and in it:
> cmake .. (here I get lot of workings like "Policy CMP0020 is not
> set: Automatically link Qt executables to qtmain")
> cmake --build . --config Release
> cmake --build . --config Release --target install (I needed
> administrator privilege of the console this to succeed)
>
> 9.When I started PothosGUI I got missing dll so I had to add "
> C:\Qt5.8.0\5.8\msvc2015\bin" in my path
>
> 10. Now I get this exception. "Exception: Unknown Exception"
>
> Anyone can help? What information I can provide to narrow the issue.

I usually build on windows (windows 10 now) with this environment, it
might be able to give you some pointers, including which Qt dlls are
needed: https://github.com/pothosware/PothosSDR/blob/master/README.md

-josh

>
> Thanks
> Dimitar
>

Dimitar Penev

unread,
Mar 5, 2017, 6:35:31 AM3/5/17
to Pothos Users, jo...@joshknows.com
Hi Josh,

I have managed to compile Pothos for the 64bit target. My commands could be useful for cmake novice
Key thing is to specify Win64 as a target generator 

In comand prompt (powershell prompt in my case) 
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC> .\vcvarsall.bat x64 
cd C:\projects\LimeSDR\pothos
mkdir my_build_dir
cd my_build_dir
cmake .. -G "Visual Studio 14 2015 Win64"
cmake --build . --config Release
cmake --build . --config Release --target install  

BTW I got a compilation error 

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC>"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\CL.exe" /c /IC:\projects\LimeSDR\pothos\poco\Foundation\include /IC:\projects\LimeSDR\pothos\poco\Util\include /IC:\projects\LimeSDR\pothos\poco\XML\include /IC:\projects\LimeSDR\pothos\poco\Net\include /IC:\projects\LimeSDR\pothos\poco\JSON\include /IC:\projects\LimeSDR\pothos\spuce /IC:\Python36\include /nologo /W3 /WX /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /D "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MD /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"spuce_plot_cic.dir\Release\\" /Fd"spuce_plot_cic.dir\Release\vc140.pdb" /Gd /TP /errorReport:queue C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp test_cic.cpp
test_cic.cpp
C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp(23): error C2220: warning treated as error - no 'object' file generated
C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp(23): warning C4800: 'signed char': forcing value to bool 'true' or 'false' (performance warning)

I have fixed changing in .\pothos\spuce\test_spuce\test_cic.cpp 
        signed char dump = 1;
into 
        bool dump = 1;


No I have Pothos 64bit compiled and installed but still it doesn't work to me. 
Nor of the compiled executables works. 
For PothosGui I get:






What do you think may be wrong?

Thanks
Dimitar

Josh Blum

unread,
Mar 7, 2017, 3:08:40 AM3/7/17
to Dimitar Penev, Pothos Users

> /IC:\projects\LimeSDR\pothos\spuce /IC:\Python36\include /nologo /W3 /WX
> /O2 /Ob2 /D WIN32 /D _WINDOWS /D NDEBUG /D _CRT_SECURE_NO_WARNINGS /D
> "CMAKE_INTDIR=\"Release\"" /D _MBCS /Gm- /EHsc /MD /GS /fp:precise
> /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"spuce_plot_cic.dir\Release\\"
> /Fd"spuce_plot_cic.dir\Release\vc140.pdb" /Gd /TP /errorReport:queue
> C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp test_cic.cpp
> test_cic.cpp
> C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp(23): error C2220:
> warning treated as error - no 'object' file generated
> C:\projects\LimeSDR\pothos\spuce\test_spuce\test_cic.cpp(23): warning
> C4800: 'signed char': forcing value to bool 'true' or 'false' (performance
> warning)
>
> I have fixed changing in .\pothos\spuce\test_spuce\test_cic.cpp
> signed char dump = 1;
> into
> bool dump = 1;

I reported this FWIW: https://github.com/audiofilter/spuce/issues/3
Normally I disable the spuce tests, but its good to have that fixed.

>
>
> No I have Pothos 64bit compiled and installed but still it doesn't work to
> me.
> Nor of the compiled executables works.
> For PothosGui I get:
>
> <https://lh3.googleusercontent.com/-fiHbvj7TyqI/WLv32XFR9sI/AAAAAAAAAGU/0LrKF2BiQRE7hLi810WFXfkogy0K7nedQCLcB/s1600/err1.png>
>
>
>
> <https://lh3.googleusercontent.com/-o6ZUtpXHkms/WLv35_PrmuI/AAAAAAAAAGY/7oSp6zvrn409fB6JFHuui-p4O7jCaGwkgCLcB/s1600/err2.png>
>
>
> What do you think may be wrong?
>

No idea, looking on google it appears to be an general error with
mismatched or missing qt dlls.

My suggestion is to copy the following qt dlls and plugin directories
into the pothos install bin/ directory. Exactly like this:
https://github.com/pothosware/PothosSDR/blob/master/InstallPrebuilt.cmake#L59

-josh

Dimitar Penev

unread,
Mar 7, 2017, 6:02:31 AM3/7/17
to Pothos Users, dpe...@gmail.com, jo...@joshknows.com
Hi Josh, 

I have followed your suggestion of copying the QT DLLs and plugins.
It does help! And I have moved step forward I believe. 

Now  I get "Exception: Unknown Exception" error message. 
(I remember I got the same error when I compiled Pothos using 32 bit Qt and Python)
I see the Pothosware loading dialog and then this exception after "Creating block cache" or after  "Creating affinity panel" 
not sure which I get at the end. 

Does Pothos create some kind of log so I can see what is going wrong?
Or any other idea? 

On the same PC I have PothosSDR installed from binaries which is working (I did some tests with LimeSDR hardware)

Thanks
Dimitar

Josh Blum

unread,
Mar 9, 2017, 12:29:29 PM3/9/17
to Dimitar Penev, Pothos Users


On 03/07/2017 03:02 AM, Dimitar Penev wrote:
> Hi Josh,
>
> I have followed your suggestion of copying the QT DLLs and plugins.
> It does help! And I have moved step forward I believe.
>
> Now I get "Exception: Unknown Exception" error message.
> (I remember I got the same error when I compiled Pothos using 32 bit Qt and
> Python)
> I see the Pothosware loading dialog and then this exception after "Creating
> block cache" or after "Creating affinity panel"
> not sure which I get at the end.
>
> Does Pothos create some kind of log so I can see what is going wrong?
> Or any other idea?

With some environment variables set, you can change the log level or
direct a log to file. See the variables here:
https://github.com/pothosware/pothos/blob/master/lib/System/Logger.cpp#L201

You may find it helpful to run PothosUtil from the command line. Which
can print errors and also show some basic prints when loading modules if
something is going wrong.

dependency walker can help, especially if a DLL is missing from the PATH

>
> On the same PC I have PothosSDR installed from binaries which is working (I
> did some tests with LimeSDR hardware)

Cool, good to know!
-josh

Dimitar Penev

unread,
Mar 9, 2017, 2:46:22 PM3/9/17
to Pothos Users, dpe...@gmail.com, jo...@joshknows.com
Hi Josh,

Thank you for the help.

1. I started ".\PothosUtil.exe  --self-tests" and saw that some plugins from the binary PothosSDR are reffed.
2. I have changed the directory of my binary PothosSDR and got some error executing PothosUtil.exe  I have built
3. I made the root folder of my Pothos (built from sources) to "C:\Program Files\PothosSDR".
4.  .\PothosUtil.exe  --self-tests produces "All 131 tests passed!"
5. PothosGUI now starts OK. 

So I guess it is a conflict between the binary PothosSDR I have installed and the one I have compiled. 
In my environment I see 

POTHOS_ROOT=C:\Program Files\PothosSDR
SOAPY_SDR_ROOT=C:\Program Files\PothosSDR
UHD_PKG_PATH=C:\Program Files\PothosSDR
VOLK_PREFIX=C:\Program Files\PothosSDR 

How should I manage coexistence of different Pothos installations?

Thank you!
Dimitar 

Josh Blum

unread,
Mar 11, 2017, 12:55:11 AM3/11/17
to Dimitar Penev, Pothos Users


On 03/09/2017 11:46 AM, Dimitar Penev wrote:
> Hi Josh,
>
> Thank you for the help.
>
> 1. I started ".\PothosUtil.exe --self-tests" and saw that some plugins
> from the binary PothosSDR are reffed.
> 2. I have changed the directory of my binary PothosSDR and got some error
> executing PothosUtil.exe I have built
> 3. I made the root folder of my Pothos (built from sources) to "C:\Program
> Files\PothosSDR".
> 4. .\PothosUtil.exe --self-tests produces "All 131 tests passed!"
> 5. PothosGUI now starts OK.
>
> So I guess it is a conflict between the binary PothosSDR I have installed
> and the one I have compiled.
> In my environment I see
>
> POTHOS_ROOT=C:\Program Files\PothosSDR
> SOAPY_SDR_ROOT=C:\Program Files\PothosSDR
> UHD_PKG_PATH=C:\Program Files\PothosSDR
> VOLK_PREFIX=C:\Program Files\PothosSDR
>
> How should I manage coexistence of different Pothos installations?

It happens all of the time on unix/windows during development where I
have several complete sets of software packages installed into different
installation roots. And the official installation packages get all of
the system defaults like bin path and python search path.

So I just make a bash or batch script that set sets all of the necessary
environment variables. In this case, PATH, PYTHONPATH, and POTHOS_ROOT
will probably be important. I run the script first for the particular
installation I am interested in and then start the application.

-josh
Reply all
Reply to author
Forward
0 new messages