azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-apps, https://github.com/azonenberg/scopehal, https://github.com/azonenberg/scopehal-docs | Logs: https://freenode.irclog.whitequark.org/scopehal
_whitelogger has joined #scopehal
Kenley has joined #scopehal
<Kenley> Any updates on the Windows build issue?
<azonenberg> Kenley: No. I commented on there trying to get katharina or bvernoux to look into it
<azonenberg> i haven't touched it myself
<azonenberg> Did you look at my unit test example?
<azonenberg> i was just talking to Bird|otherbox about it
<Kenley> Yes.
<azonenberg> Any thoughts? does this seem like the right way to go about it?
<Kenley> I'm less familiar with unit test frameworks for C/C++ code. I'm looking at the space.
<Kenley> There's GoogleTest: https://github.com/google/googletest
<Bird|otherbox> yeah, GoogleTest is a bit older/clunkier than Catch2 though
<Bird|otherbox> the big thing Catch2 has going for it is that it's basically stupidly simple to use while still being highly informative about test failures
<Kenley> Not a C/C++ ecosystem expert here, so I will defe to someone with more hands-on experience.
Degi has quit [Ping timeout: 256 seconds]
Degi has joined #scopehal
<azonenberg> Kenley, Bird|otherbox: well, between the two of you hopefully you can figure it out
<azonenberg> again feel free to experiment with refactoring of the test case that i have there now, i formatted that for the CTest methodology which is one binary per test case
<azonenberg> if there's other frameworks that work differently, play around
Pretzel4Ever has joined #scopehal
Pretzel4Life has quit [Ping timeout: 260 seconds]
electronic_eel has joined #scopehal
electronic_eel_ has quit [Ping timeout: 264 seconds]
Kenley has left #scopehal [#scopehal]
juli966 has quit [Quit: Nettalk6 - www.ntalk.de]
_whitelogger has joined #scopehal
juli966 has joined #scopehal
juli966 has quit [Quit: Nettalk6 - www.ntalk.de]
bvernoux has joined #scopehal
hlzr has joined #scopehal
<bvernoux> I have just received my Rigol MSO5074
<azonenberg> bvernoux: :)
<azonenberg> oh, did you see the ticket i pinged you on re the windows build issues for the CI server?
<azonenberg> any thoughts?
<azonenberg> i'm not really a windows guy so no idea what's causing that
<bvernoux> I have not seen the ticket
<azonenberg> scopehal-apps:#239 is the ticket for CI setup in general
<azonenberg> i commented there wit ha link to a build failure from Kenley's staging environment
<azonenberg> any time he tries to do a CI build on windows it fails with a bunch of errors
<azonenberg> So we're trying to diagnose, i was hoping you and/or katharina could help
<bvernoux> I have never used CI before
<bvernoux> it seems the error is
<bvernoux> shell: bash
<bvernoux> as it does not exist on windows
<azonenberg> this is supposed to be building in mingw
<bvernoux> I do not know if a bash is emulated with MSYS2 MinGW64
<bvernoux> becareful Msys2 is Cygwin but Mingw64 is not cygwin
<bvernoux> it is native
<azonenberg> The error appears to be an out-of-memory issue
<bvernoux> ha ok found
<azonenberg> so the question is why the build is oom'ing
<azonenberg> there are also a bunch of warnings and other issues to address
<bvernoux> mingw32-make[1]: *** [CMakeFiles\Makefile2:250: lib/scopehal/CMakeFiles/scopehal.dir/all] Error 2
<bvernoux> Error: Process completed with exit code 2.
<bvernoux> mingw32-make: *** [Makefile:148: all] Error 2
<bvernoux> yes if you go before
<bvernoux> cc1plus.exe: out of memory allocating 67112959 bytes
<azonenberg> Yep
<bvernoux> tons of out of memory
<bvernoux> maybe because it build with -j ?
<azonenberg> is it?
<azonenberg> if so that is probably the problem. Look into it
<bvernoux> haha yes
<bvernoux> Run mkdir build && cd build && cmake -G"MinGW Makefiles" -DLIBFFTS_INCLUDE_DIR=/mingw64/include/ -DLIBFFTS_LIBRARIES=/mingw64/lib/libffts_static.a ./.. && mingw32-make -j
<bvernoux> it is the issue ;)
<azonenberg> That... would explain it
<bvernoux> NEVER use -j ;)
<bvernoux> let's change that to -j 8 maybe
<bvernoux> I do not know how many core there is with CI ...
<_whitenotifier-f> [scopehal-apps] azonenberg commented on issue #239: Continuous integration setup - https://git.io/JTgPS
<azonenberg> bvernoux: I can "make -j" kicad on a clean tree on my workstation
<azonenberg> But i also have 192GB of RAM...
<bvernoux> yes
<bvernoux> I doubt the CI stuff provide so much free RAM
<azonenberg> oh i'm sure
<bvernoux> especially as it is free service ;)
<azonenberg> anyway thanks. Not sure how i missed that
<bvernoux> It is first time I discover CI stuff ;)
<bvernoux> the hard part was to click on the right things ;)
<azonenberg> My long term plan is to have automated linux/windows builds including unit tests
<azonenberg> did you see the unit test i wrote for the frequency filter?
<bvernoux> good things is now I could test on my Rigol MSO5000 ;)
<azonenberg> i'm just experimenting right now
<bvernoux> to understand why it freeze
<azonenberg> i think scopeprotocols can be unit tested easily (ish), while scopehal and scopehal-apps will be harder
<bvernoux> why do you not use CppUnit ?
<bvernoux> it will simplify things for unit test
<azonenberg> We havent decided on a test framework yet
<bvernoux> I was using it in paste
<azonenberg> several have been suggested
<azonenberg> I wrote this test assuming CTest
<bvernoux> it is quite easy to use with C++ or C code mixed
<azonenberg> the CTest model is one binary runs one test case
<azonenberg> and just uses the exit code to check pass/fail
<bvernoux> I do not know CTest
<azonenberg> then i wrote a simple wrapper class for unit testing of scopehal filters that handles some of the initialization and randomness
<azonenberg> It's part of the cmake ecosystem so it integrates nicely
<azonenberg> which is why i was thinking of using it
<bvernoux> ha ok
<azonenberg> But i have not made a final decision and am still collecting suggestions
<azonenberg> If you have feedback or suggestions, comment on scopehal-apps:#241
<bvernoux> what will be great is to check the code with Valgrind too
<bvernoux> it find amazing things ;)
<azonenberg> We have static analysis now
<azonenberg> it's slow, so not part of the regular build
<azonenberg> but for CI builds i want to run static analysis on everything
<bvernoux> with latest CppCheck ?
<azonenberg> cppcheck and clang-analyzer
<bvernoux> ha great
<azonenberg> still working out some false positives and other little tweaks
<azonenberg> I also want to enable asan on the CI builds
<azonenberg> Which is already there if you do -DCMAKE_BUILD_TYPE=DEBUG
<bvernoux> I have never used asan but I have read very good things about it
<_whitenotifier-f> [scopehal-apps] azonenberg opened issue #243: CI builds should set -DCMAKE_BUILD_TYPE=DEBUG - https://git.io/JTgXC
<_whitenotifier-f> [scopehal-apps] azonenberg assigned issue #243: CI builds should set -DCMAKE_BUILD_TYPE=DEBUG - https://git.io/JTgXC
<azonenberg> Valgrind and asan are somewhat complementary tools, they have a lot of overlap but some find certain bugs better than the other
<azonenberg> i slightly prefer asan
<azonenberg> but i use both
<bvernoux> On other stuff I'm very happy with my EEZ BB3 Advanced Power Supply
<_whitenotifier-f> [scopehal-apps] azonenberg labeled issue #243: CI builds should set -DCMAKE_BUILD_TYPE=DEBUG - https://git.io/JTgXC
<bvernoux> I have a failure on a Mean Well AC/DC +5V converter
<bvernoux> I have replaced it by external 5V and all work fine ;)
<bvernoux> Very fast feedback from the team behind mainly Denis for the HW
<bvernoux> and tons of amazing open source new boards are coming too
<bvernoux> The best is I think it is the world 1st open source/open hardware PSU with such quality
<bvernoux> A bit like in old days where you have schematics and everything to repair or mod it ;)
<bvernoux> I have already bought a new LCD Touch Screen which is brighter to replace it ;)
<bvernoux> I have also soldered the SWD to plug a STLINK-V3MINI If I need to debug it one day ;)
<bvernoux> THe interesting point is to add a new module to have a very accurate "Multimeter"
<bvernoux> They are working on it
<azonenberg> Btw i have a 4 GHz active diff probe on the wayh now
<azonenberg> way now*
<azonenberg> Forget if i mentioned
<azonenberg> the order went through
<azonenberg> then the WL-PBUS i ordered from the guy on ebay in tel aviv came in
<bvernoux> ha great
juli966 has joined #scopehal
bvernoux has quit [Quit: Leaving]
<_whitenotifier-f> [scopehal-apps] kench commented on issue #239: Continuous integration setup - https://git.io/JTghV
<Bird|otherbox> azonenberg: it'd probably be easier if you tucked the -D__GNUC__ in, I'm going to need to rework a bunch of stuff here and don't want to do it with changes in-flight
<Bird|otherbox> or I suppose I could put a commit and pull request together through the old pipeline if you'd rather, but I'm not 100% sure if that change fixes it either so I wasn't comfortable committing to it myself
<_whitenotifier-f> [scopehal-docs] azonenberg pushed 2 commits to master [+0/-0/±2] https://git.io/JTghM
<_whitenotifier-f> [scopehal-docs] azonenberg 549cf1e - Build instructions now specify "make -j4" rather than no limit, which should be reasonable on most systems.
<_whitenotifier-f> [scopehal-docs] azonenberg 9fbd7f4 - Documented "demo" scope driver
Kenley has joined #scopehal
<_whitenotifier-f> [scopehal-apps] azonenberg commented on issue #239: Continuous integration setup - https://git.io/JTghy
<azonenberg> ok no problem
<azonenberg> i'll do it
<Kenley> I laughed when I saw your comment.
<azonenberg> lol
<azonenberg> I didnt write the windows build instructions
<azonenberg> so i guess that means we now know katharina has a buttload of ram too :p
<_whitenotifier-f> [scopehal-apps] tarunik commented on issue #241: Unit testing - https://git.io/JTgjT
<Kenley> For https://github.com/azonenberg/scopehal-apps/issues/243 - which command do I need to update in the script? Is it the cmake command?
<azonenberg> Yes
<azonenberg> cmake .. -DFOO=BAR
<azonenberg> We will likely be adding other special arguments there in the future, for example -DANALYZE to enable static analysis once it's fully debugged and we work out some performance problems
<azonenberg> right now, though, setting build type to debug will enable asan. Which will be important once we start running unit tests
<Kenley> D:\a\scopehal-apps\scopehal-apps\lib\scopehal\DemoOscilloscope.h:40:10: fatal error: ffts.h: No such file or directory 84
<Kenley> Only on Windows, not Linux.
<azonenberg> Interesting
<azonenberg> Bird|otherbox: any ideas? we have LIBFFTS_INCLUDE_DIRS in scopehal specified as public
<azonenberg> so the apps should be using that
<Kenley> I think the directories might be wrong.
<azonenberg> Kenley: did the cmake configure output correctly find ffts?
<Bird|otherbox> yeah, I'd want to see what got tucked in to the CMakeCache for that
<azonenberg> it's possible FindFFTS has to be updated for windows
<Kenley> -- Checking for module 'ffts' 26-- No package 'ffts' found 27-- Found libffts: D:/a/_temp/msys/msys64/mingw64/include, D:/a/_temp/msys/msys64/mingw64/lib/libffts_static.a
<azonenberg> so i think on top of that you have another issue
<Kenley> Install the project... 105-- Install configuration: "Release" 106-- Installing: C:/Program Files (x86)/ffts/lib/libffts_static.a 107-- Installing: C:/Program Files (x86)/ffts/include/ffts/ffts.h
<azonenberg> scopehal-apps:#139
<azonenberg> I dont think that is the cause of your issue
<azonenberg> but you will likely hit it soon
<Kenley> What's FindFFTS?
<azonenberg> cmake/FindFFTS.cmake, a cmake script for locating ffts
<azonenberg> it's what produces that otuput on lines 26-27
<azonenberg> but it seems to have found it
<_whitenotifier-f> [scopehal-docs] azonenberg pushed 1 commit to master [+0/-0/±1] https://git.io/JTgjM
<_whitenotifier-f> [scopehal-docs] azonenberg e88bbb6 - Updated build instructions to set up FFTS as shared
<_whitenotifier-f> [scopehal-apps] azonenberg closed issue #139: build instructions for ffts need to produce a shared library - https://git.io/JJObF
<_whitenotifier-f> [scopehal-apps] azonenberg commented on issue #139: build instructions for ffts need to produce a shared library - https://git.io/JTgjS
<Kenley> I'm going to need help with the FFTS issue.
<Kenley> @azonenberg - The instructions for shared library are wrong. I just tried it.
<azonenberg> There shouldn't be a slash after it
<azonenberg> just -DENABLE_SHARED