Help Needed: Python script check_syms.py not found error When building plugin

Hello everyone,

I’m Steve from Vector Modular. I’m new to VCV Rack development (and C++ compilation) and am working on porting my first module. I’ve been trying to follow along with the README on the SDK’s GitHub, but I’m hitting a roadblock during the build process, and I’m hoping someone can help me troubleshoot.

When I run cmake --build build, I get the following error:


[0/1] Running utility command for plugin
/usr/bin/python3.exe: can’t open file ‘/c/Users/steve/OneDrive/OneDriveRoot/DIY/Software/MetaModuleSDK/metamodule-plugin-sdk/C:\Users\steve\OneDrive\OneDriveRoot\DIY\Software\MetaModuleSDK\metamodule-plugin-sdk\scripts\check_syms.py’: [Errno 2] No such file or directory


The check_syms.py script is definitely located at:


C:\Users\steve\OneDrive\OneDriveRoot\DIY\Software\MetaModuleSDK\metamodule-plugin-sdk\scripts\check_syms.py


To troubleshoot, I tried defining and normalizing the path in my CMake file as follows:


# Define the path to the check_syms.py script
set(CHECK_SYMS_SCRIPT “${CMAKE_CURRENT_SOURCE_DIR}/…/metamodule-plugin-sdk/scripts/check_syms.py”)
# Normalize the path
file(TO_CMAKE_PATH “${CHECK_SYMS_SCRIPT}” CHECK_SYMS_SCRIPT)


Does anyone have any suggestions for resolving this issue? Thanks in advance for any advice or pointers you can share!

Best,
Steve

it would be better to see the error without the normalisation.

this should generally not be necessary, as the ‘set’ above is working with relative paths.

generally the idea is check_syms.py should be found relative the cmake source directory
${CMAKE_CURRENT_SOURCE_DIR}, so this is where your issues is.

Id need to see the actual project to know what the issue is, but I suspect CMAKE_CURRENT_SOURCE_DIR is not where you think it is
also I see in the set ‘…’ (3 dots) , do you mean two , or is that just the formatting here on the forum ?

thank you so much for taking the time to respond with your comment!

I will take a look at this and see if it helps.

if not, I will share more of the requested data

thank you again!

Hi, sorry I missed this message!
First, can you build the plugin example projects OK? That is, see if you can build one of the plugins from this repo:

If so, then that confirms your system is setup to build (cmake version is OK, msys/shell is setup OK, python version, etc…)

I just did a fresh install and build of that repo on windows (using msys/Mingw) and it worked without errors. So see if you can too.

Could be. In this case, it’s actually CMAKE_CURRENT_FUNCTION_LIST_DIR.

The relevant code is in plugin.cmake:

    add_custom_command(
        TARGET plugin
        POST_BUILD
        COMMAND scripts/check_syms.py 
            --plugin ${PLUGIN_FILE_TMP}
            --api ${FIRMWARE_SYMTAB_PATH}
            # -v
        WORKING_DIRECTORY ${CMAKE_CURRENT_FUNCTION_LIST_DIR}
        VERBATIM USES_TERMINAL
	)

It sets the WORKING_DIRECTORY to ${CMAKE_CURRENT_FUNCTION_LIST_DIR} before running the script, so perhaps that’s not returning the correct directory?

If you want to verify that’s where it’s happening, you could comment out the WORKING_DIRECTORY line and then type in the full path to check_syms.py in the COMMAND line above.

According to cmake’s site, CMAKE_CURRENT_FUNCTION_LIST_DIR was added in cmake v3.17 so if you aren’t running at least that, then that could be the issue. Add this to the top of your CMakeLists.txt file:

cmake_minimum_required(VERSION 3.22)

(I think there are other features we use that require 3.22)

Can you share your CMakeLists.txt file?

1 Like

ah, indeed I see what you are doing now ( * ) in the sdk - cool.

yeah, so as long as the include for plugin.cmake is correct - it should be ok, as its relative to that - and the include must be ok, otherwise you cannot get to this function at all :))


( * ) just built my own plugin on macOS without any issues :slight_smile:

1 Like

Hi everyone,

Thanks for your help so far. I’ve been trying to get the sample projects working, but I’m hitting a snag with access issues when trying to clone some of the submodules. I know that I have SSH access to GitHub, as I’ve confirmed that my authentication is successful.

However, I’m still encountering permission denied errors for several repositories during the cloning process.

I’m wondering if this happened when I cloned the SDK and if that’s causing issues too.

I’d appreciate any suggestions or insights into resolving this issue, especially regarding access rights for the submodules. Thank you!

Best,
Steve

Hmm… that looks like it’s not liking ssh access to the public repos. I’ve seen that before, I don’t remember the reason (some openssh version thing? I forget…)

I should change the submodules to use https by default instead, since it’s more widely supported.

OK, just made the change. Try pulling the latest, then do

git submodule sync --recursive
git submodule update --init --recursive --remote

Or just re-clone in a different directory.