Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails with fatal error: 'torch/script.h' file not found #2

Open
leoauri opened this issue Aug 23, 2021 · 5 comments
Open

Build fails with fatal error: 'torch/script.h' file not found #2

leoauri opened this issue Aug 23, 2021 · 5 comments

Comments

@leoauri
Copy link

leoauri commented Aug 23, 2021

Hi there,
Following the instructions in the README results in a CMakeLists.txt without the lines:

find_package(Torch REQUIRED)

and

target_link_libraries(ncomp_AU PRIVATE torch)
target_link_libraries(ncomp_VST3 PRIVATE torch)
target_link_libraries(ncomp_Shared_Code PRIVATE torch)

Then the build fails with:

fatal error:
      'torch/script.h' file not found
#include <torch/script.h>
         ^~~~~~~~~~~~~~~~
1 error generated.

** BUILD FAILED **

Is there something missing?
Cheers
Leo

@leoauri
Copy link
Author

leoauri commented Aug 23, 2021

I tried adding these lines back into the CMakeLists.txt manually.

The build then failed with the weird error:

** BUILD FAILED **


The following build commands failed:
	PhaseScriptExecution Generate\ ncomp.rsrc .../micro-tcn/realtime/plugin/build/ncomp.build/Debug/ncomp_AU.build/Script-112338EA987B059F32058B61.sh
(1 failure)

In amongst the compiler output I found:

PhaseScriptExecution Generate\ ncomp.rsrc .../micro-tcn/realtime/plugin/build/ncomp.build/Debug/ncomp_AU.build/Script-112338EA987B059F32058B61.sh (in target 'ncomp_AU' from project 'ncomp')
    cd .../micro-tcn/realtime/plugin
    /bin/sh -c .../micro-tcn/realtime/plugin/build/ncomp.build/Debug/ncomp_AU.build/Script-112338EA987B059F32058B61.sh
.../JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r:36: ### Rez - noErr (0) during open of "JucePluginDefines.h".
Fatal Error!
.../JUCE/modules/juce_audio_plugin_client/juce_audio_plugin_client_AU.r:36: ### Rez - Fatal Error, can't recover.
JucePluginDefines.h: ### Rez - Since errors occurred, .../micro-tcn/realtime/plugin/build/ncomp.rsrc's resource fork was not completely updated.
Command PhaseScriptExecution failed with a nonzero exit code

@leoauri
Copy link
Author

leoauri commented Aug 23, 2021

  • cmake version 3.20.5
  • FRUT 43e9f045
  • JUCE 0c56fa8fa

@leoauri
Copy link
Author

leoauri commented Aug 23, 2021

Which commits of FRUT & JUCE have you successfully compiled with?

@leoauri
Copy link
Author

leoauri commented Aug 24, 2021

The instructions don't say what to do with the downloaded traced models, perhaps that is missing?

@leoauri
Copy link
Author

leoauri commented Aug 24, 2021

I found a hardcoded path to traced model in micro-tcn/realtime/plugin/Source/PluginProcessor.cpp

        model = torch::jit::load(".../models/traced_1-uTCN-300__causal__4-10-13__fraction-0.01-bs32.pt");

which I replaced, but same error...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant