Friday, January 29, 2021

cmake doesn't like xrdp

For two weeks I have been trying to build a new module/block on 3.9 without much success. You can see some of the pain here:

I finally discovered the cause of the problem and a workaround.
If you are running a remote session via xrdp, then the cmake step of gr_modtool, or building 3.9 from source, or just about any cmake involving gnuradio-runtime, will NOT work. You get error messages about a non-existent "/include" directory. 

I discovered this by accident. I was getting frustrated with trying different things, so I created a virtual machine (using VMware Player), and kept a copy of the virtual machine with just the OS installed, updated, and configured the way I like it. Then I could try different things and go back to the base if it didn't work out. Yesterday I found that I could build the 3.9 maint branch from source on the vm, without the cmake errors. I also used gr_modtool to make a trivial block, and that worked too. Encouraged by this result, I went back to the laptop via xrdp and tried it there, and got the same old errors. In desperation, I tried the procedure on the laptop directly (which is a nuisance because it is in the basement, in a cold room, and not readily accessible), and it worked! Still haven't figured out what the difference is. So now, I have a development environment in a vm. I'm hoping I can do the code/test/edit/rebuild cycle on the target machine using xrdp, but we'll see what happens.

Also, here are a few other things that I learned:
"gr_modtool add" will complain about clang-format, so install that along with the prerequisites
"gr_modtool makeyaml" is not worth the trouble, it's easier to edit the file that was created by "gr_modtool add" 
the in-tree blocks on github are not great examples for beginners, the example on the wiki is better

Hope that helps someone.


No comments:

Post a Comment