Chowdhury-DSP / BYOD

Build-your-own guitar distortion!
GNU General Public License v3.0
427 stars 22 forks source link

[BUG] Compile error #349

Closed magillos closed 7 months ago

magillos commented 7 months ago

I'm having this error on Linux when I try to compile BYOD with the recent commits:

[ 63%] Linking CXX static library libjuce_plugin_modules.a
[ 63%] Built target juce_plugin_modules
[ 63%] Generating BYOD_artefacts/JuceLibraryCode/JuceHeader.h
make[2]: *** No rule to make target 'CMakeFiles/BYOD.dir/cmake_pch.hxx.gch', needed by 'CMakeFiles/BYOD.dir/Unity/unity_17_cxx.cxx.o'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:434: CMakeFiles/BYOD.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
==> ERROR: A failure occurred in build().
jatinchowdhury18 commented 7 months ago

Hello! Would it be possible to share some more information about the compiler that you're using, and which version of CMake you're using? It's possible that whetever combination of CMake+compiler you're working with doesn't support pre-compiled headers, which I imagine would lead to that error.

In the meantime, you can disable pre-compiled headers by commenting out this line in the CMake configuration. You may also need to turn off unity builds.

Please let me know if this helps... unfortunately the combined complexity of CMake along with the variety of compilers that are available on each platform make it difficult to support every possible configuration out-of-the-box.

magillos commented 7 months ago

My is CMake is in version 3.28.2 and as of compiler I'm guessing you are asking about gcc which is in version 13.2.1 on my machine. They are both standard as shipped by Arch.

Disabling pre-compiled headers alone in CMakeLists.txt helped and BYOD now builds so thank for the tip.

jatinchowdhury18 commented 7 months ago

No problem! Glad you were able to get a build.

Kind of curious that your combination of CMake + GCC wasn't able to compile the pre-complied header... both versions are fairly recent, so I would expect them to be able to handle that sort of thing.