Menu

#200 [CYGWIN] Strange issue when building.

v3.1.0
closed-out-of-date
nobody
None
5
2021-10-24
2020-07-11
No

Hello, after commit b9be43b, ZynAddSubFx can be compiled on CYGWIN (thank you!), but there is still a minor issue that I cannot understand.
You can clone, configure with CMake and start to compile, but at a certain point it prints this message:

[ 82%] Linking CXX shared library ZynDynamicFilter.dll
/bin/sh: line 0: cd: /home/carlo/z/src/Plugin/DynamicFilter/lv2: No such file or directory
make[2]: *** [src/Plugin/DynamicFilter/CMakeFiles/ZynDynamicFilter_lv2.dir/build.make:124: src/Plugin/DynamicFilter/ZynDynamicFilter.dll] Error 1

So, I typed these commands:

mkdir src/Plugin/DynamicFilter/lv2
mkdir src/Plugin/Echo/lv2
mkdir src/Plugin/Phaser/lv2
mkdir src/Plugin/Reverb/lv2
mkdir src/Plugin/ZynAddSubFX/lv2

for creating those missing "lv2" directories.
Then, I launched again "make" and the build process completed successfully.
I have not understood very well why this thing happens, perhaps the "CYGWIN" platform just needs to be added somewhere together with other platforms or something like that.
Have you an idea about the cause?
I can test it and push a fix on GITHUB for solving the issue.

Sincerely.

Discussion

  • Mark McCurry

    Mark McCurry - 2020-07-12

    Have you an idea about the cause?

    Odd, the only two differences I can observe are that you're using cygwin
    and you're doing an in-source build (as opposed to doing:
    (cd project && mkdir build && cd build && cmake .. && make))

    Setting LIBRARY_OUTPUT_DIRECTORY inside the
    src/Plugin//.CMakeLists.txt files should be enough to get cmake to
    make the directories itself.

    Usually when I run into these sorts of issues I just run 'VERBOSE=1 make -j1' and
    see what ends up being the last command that the build can run.
    The most likely scenario that I can think of is either it tries to make
    the folder and fails or it makes the folder in the wrong location.
    A less likely possibility is that it somehow would create the folder
    later in the build process, but that seems like too big of a cmake bug
    to have gotten in unnoticed.

     
  • Mark McCurry

    Mark McCurry - 2021-06-20
    • status: open --> closed-out-of-date
     
  • Carlo Bramini

    Carlo Bramini - 2021-10-24

    Hello,
    I have finally found the cause of the problem and I got a solution.
    The explanation of the defect is described into this page:
    https://cmake.org/cmake/help/v3.9/manual/cmake-buildsystem.7.html

    In short:
    - All versions of Windows are "DLL platforms", and DLL are targets for "bin" directory.
    - On all other "non-DLL platforms", the shared libraries are targets for "lib" directory.

    This means that:
    - On DLL platforms: RUNTIME_OUTPUT_DIRECTORY and RUNTIME_OUTPUT_NAME target properties are used.
    - On non-DLL platforms: LIBRARY_OUTPUT_DIRECTORY and LIBRARY_OUTPUT_NAME target properties are used.

    So, I did this change to all CMakeLists.txt file into the 'src/Plugin' directory (I reported here only AlienWah for simplicity):

    index 85b5768f..50bef9dc 100644
    --- a/src/Plugin/AlienWah/CMakeLists.txt
    +++ b/src/Plugin/AlienWah/CMakeLists.txt
    @@ -6,11 +6,13 @@ add_library(ZynAlienWah_vst SHARED ${CMAKE_SOURCE_DIR}/DPF/distrho/DistrhoPlugin
    
     set_target_properties(ZynAlienWah_lv2 PROPERTIES COMPILE_DEFINITIONS "DISTRHO_PLUGIN_TARGET_LV2")
     set_target_properties(ZynAlienWah_lv2 PROPERTIES LIBRARY_OUTPUT_DIRECTORY "lv2")
    +set_target_properties(ZynAlienWah_lv2 PROPERTIES RUNTIME_OUTPUT_DIRECTORY "lv2")
     set_target_properties(ZynAlienWah_lv2 PROPERTIES OUTPUT_NAME "ZynAlienWah")
     set_target_properties(ZynAlienWah_lv2 PROPERTIES PREFIX "")
    
     set_target_properties(ZynAlienWah_vst PROPERTIES COMPILE_DEFINITIONS "DISTRHO_PLUGIN_TARGET_VST2")
     set_target_properties(ZynAlienWah_vst PROPERTIES LIBRARY_OUTPUT_DIRECTORY "vst")
    +set_target_properties(ZynAlienWah_vst PROPERTIES RUNTIME_OUTPUT_DIRECTORY "vst")
     set_target_properties(ZynAlienWah_vst PROPERTIES OUTPUT_NAME "ZynAlienWah")
     set_target_properties(ZynAlienWah_vst PROPERTIES PREFIX "")
    

    and everything was solved.
    If this change looks correct to you, I can do a PR with this fix.

    Sincerely.

     

    Last edit: Carlo Bramini 2021-10-24

Log in to post a comment.