<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 8 Jul 2019 at 09:42, René J.V. Bertin <<a href="mailto:rjvbertin@gmail.com">rjvbertin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Steve the Fiddle wrote on 20190707::23:54:37 re: "Re: C++ header files and crash issue"<br>
<br>
<br>
>> >What do you mean "included via a compiler argument"?<br>
>><br>
>> The `-include foo.h` compiler option tells the compiler to include a<br>
>> headerfile before including the headerfiles from the #include statements in<br>
>> the source code.<br>
>><br>
><br>
>Where are you looking? Where will I see these compiler arguments that you<br>
>refer to?<br>
><br>
><br>
>><br>
>> >The compiler arguments that I use (successfully) are:<br>
>> >../configure --with-lib-preference="local system" --with-ffmpeg="system"<br>
>> >--disable-dynamic-loading --with-mod-script-pipe --with-mod-nyq-bench<br>
>> >--enable-debug<br>
>><br>
>> Those are not compiler arguments! They are configuration arguments that<br>
>> specify how you want the project to be built.<br>
<br>
<br>
Steve, no offense, but may I suggest that you read up on the basics of software development on Unix/Linux?<br>
<br>
The `-include AudacityHeaders.h` directive is added in src/CMakeLists.txt .<br></blockquote><div><br></div><div>OK, I think I see where we are getting our wires crossed. On Linux, Audacity is built with make, not cmake (apart from libsoxr if I recall correctly). Cmake is currently experimental for Audacity, and only worked on Windows last time I looked. As you noticed yourself, some of the includes in <br></div><div> src/CMakeLists.txt are hard wired for Windows.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>> >Interesting. Is there any documentation about custom defines in kDevelop?<br>
>> >How did you know to add those custom defines?<br>
<br>
Because I noticed what I mentioned earlier, that KDevelop's parser did not "see" certain parts of the code that were protected by #ifdefs.<br></blockquote><div><br></div><div>OK, got it.</div><div>I've also noticed that kDevelop does not "see" parts that are within</div><div>#if USE_SOUNDTOUCH</div><div>or <br></div><div>#if USE_SBSMS</div><div><br></div><div>so I added in "Configure language support > Defines"</div><div><br></div><span style="font-family:courier new,monospace"><b>Define:              Value:</b><br>USE_SOUNDTOUCH        1<br>USE_SBSMS             1</span></div><div class="gmail_quote"><br></div><div class="gmail_quote">and now it sees those parts.</div><div class="gmail_quote">That's a big help (cartoon lightbulb moment). Thanks René.</div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
>I don't see where it explains how to correctly set up include paths either.<br>
>Do I need to manually add every directory in the project?<br>
>Yes, I've seen where to add defines, but Audacity has hundreds of defines.<br>
>How did you know which defines needed to be added to kDevelop's<br>
>configuration?<br>
<br>
Maybe, maybe not. This will become clear when you edit files... I added the directories and defines that I discovered were missing. Maybe I'll discover others when I need to visit other parts of the code, maybe not.<br>
<br>
>Is there anyone in the kDevelop team that might be interested in, a) fixing<br>
>the crash bug, b) helping the Audacity team to document setting up kDevelop<br>
>for use with Audacity's code? Perhaps we can come to some arrangement that<br>
>gives mutual benefit.<br>
<br>
I think that the best thing the Audacity team could do at this point is to work out any remaining kinks with their CMake implementation and make sure it works on all platforms (Mac included), with all the same custom configuration options as the configure script offers. </blockquote><div><br></div><div>Unfortunately this is a bit of a catch 22. We are currently lacking in developers that use Linux as their primary OS. The build system is currently pretty  robust on Windows (using MSVS) and on macOS (using xcode). We previously had a Linux developer that was very keen on make / autotools, hence our reliance on that tool chain on Linux. Personally I would very much like us to use cmake on all platforms, but I don't have the knowledge or experience to do that (I'm mostly support + documentation, and only dabble in C++).<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Be sure to add some documentation for less evident feature such as how to indicate where wxWidgets is installed (I had to dig out CMake's FindwxWidgets file and scan through it to *guess* that I needed to add `-DwxWidgets_CONFIG_EXECUTABLE=/opt/local/libexec/wxWidgets/3.1/bin/wx-config` on my system).<br></blockquote><div><br></div><div>In most cases, when building from the command line, Audacity will build against a system installed wxWidgets without needing to specify where it is installed. <br></div><div><br></div><div>If using a local build of wxWidgets, the path is passed as a configure argument, for example:</div><div><span style="font-family:courier new,monospace">./configure WX_CONFIG=/home/user/dev/wxbuild/wx-config</span></div><div>as documented on this old page: <a href="https://wiki.audacityteam.org/wiki/Developing_On_Linux">https://wiki.audacityteam.org/wiki/Developing_On_Linux</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Once you have an exhaustive formal description of how Audacity has to be built in CMake language this "model" will also be available to KDevelop. If there are still probems then it may be more efficient to discuss them on the kdevelop-devel mailing list.<br>
But mind you, I too have had the impression that the KDevelop team has been less reactive (and development may even have slowed a bit). So the most efficient approach may still be to figure out a fix to your problem yourself and then present it for review. That generally works better here anyway, rather than asking to fix your problems for you...<br></blockquote><div><br></div><div>Thank you very much for your time René. I wasn't intending my comments to come across as asking someone to fix my problems. I'm more than happy to rtfm, but when the necessary documentation cannot be found, I have to ask. <br></div><div><br></div><div>Also, regardless of what's in the Audacity code, kDevelop shouldn't choke and crash. It might even be something that could be  leveraged into an<br>exploit against KDevelop. The crash is 100% repeatable for me with both the current kDevelop AppImage, and the previous 5.2 version. I'd be surprised if it is not repeatable for other users with that (Audacity) code and the kDevelop AppImage. If this email list is not the correct place to report crash problems, I'll be happy to repost this specific issue if you can point me to the correct place.</div><div><br></div><div>Thanks again.</div><div>Steve<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
R.<br>
</blockquote></div></div>