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

Almost to the end #32

Closed
arildnor opened this issue Jan 21, 2024 · 23 comments
Closed

Almost to the end #32

arildnor opened this issue Jan 21, 2024 · 23 comments

Comments

@arildnor
Copy link

Hi. I nearly managed to get it installed on my Linux Mint system. Since my mint is based on Ubuntu 22.04 I added linuxmint21.1 to the setup file where needed. But the last command :
cmake --build . --config Release --target mod-openvino failed.
gmake: *** No rule to make target 'mod-openvino'. Stop.
Probably something I forgot or did wrong
But I just take a break and redo all later.

The good thing is I got a build of the latest version of Audacity and ran it.
I have been working another route to do what the plugin do. I run Demucs, whisper and finding chords in python scripts. Then I import tracks, chords and lyrics from wav and label files generated directly from Python script. With the latest version of Audacity I can use the pipe and get Audacity populated from python direct. I am not able to run demucs and whisper / chord in the same Python run. A lot of issues pop up, not least GPU memory. So it is 3 separate runs with shared variables.

I have for the last year struggled with the Python package nightmare. Using miniconda I manage to get things running, but it takes a lot of different conda environments, and disk space.

@RyanMetcalfeInt8
Copy link
Contributor

Hi @arildnor,

Sounds like you were really close indeed!

cmake --build . --config Release --target mod-openvino failed.
gmake: *** No rule to make target 'mod-openvino'. Stop.

Hmm, it seems like it's not picking up that a new target was added to the build configuration. Can you double check that you copied mod-openvino folder to audacity/modules folder, and that you also added edited audacity/modules/CMakeLists.txt to add the line add_subdirectory(mod-openvino)? These steps are described here.

One trick for debugging CMake stuff, is that you can add print statements using 'message', and make sure that they show up when you execute the build. For example you can add this to audacity/modules/CMakeLists.txt:

message("ADDING OPENVINO MODULE TO THE BUILD!!!!!")
add_subdirectory(mod-openvino)

Let me know how it goes!
Ryan

@arildnor
Copy link
Author

arildnor commented Jan 22, 2024 via email

@sandoxy
Copy link

sandoxy commented Jan 27, 2024

"But the last command :
cmake --build . --config Release --target mod-openvino failed.
gmake: *** No rule to make target 'mod-openvino'. Stop."

I have the same error.

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jan 27, 2024

Hmm, weird. Another option, after adding add_subdirectory(mod-openvino) line to audacity\modules\CMakeLists.txt is to just build everything with the new module. The new build should pick up the new mod-openvino module.

# Create build directory
mkdir audacity-build-new
cd audacity-build-new

# Run cmake (grab a coffee & a snack... this takes a while)
cmake -G "Unix Makefiles" ../audacity -DCMAKE_BUILD_TYPE=Release

# build it 
make -j`nproc`

@sandoxy
Copy link

sandoxy commented Jan 27, 2024

Run cmake (grab a coffee & a snack... this takes a while)

cmake -G "Unix Makefiles" ../audacity -DCMAKE_BUILD_TYPE=Release

Thanks, but after running the above command(with the adjusted directory), I am gettung that:

"CMake Error at modules/mod-openvino/CMakeLists.txt:6 (find_package):
By not providing "FindOpenVINO.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "OpenVINO",
but CMake did not find one.

Could not find a package configuration file provided by "OpenVINO" with any
of the following names:

OpenVINOConfig.cmake
openvino-config.cmake

Add the installation prefix of "OpenVINO" to CMAKE_PREFIX_PATH or set
"OpenVINO_DIR" to a directory containing one of the above files. If
"OpenVINO" provides a separate development package or SDK, be sure it has
been installed.

-- Configuring incomplete, errors occurred!"

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jan 27, 2024

Hi @sandoxy,

It seems like it is having trouble finding OpenVINO. In the same terminal as you are running cmake -G "Unix Makefiles" ../audacity -DCMAKE_BUILD_TYPE=Release from, did you setup OpenVINO environment variables (i.e. source /path/to/l_openvino_toolkit_ubuntu22_2023.2.0.13089.cfd42bd2cb0_x86_64/setupvars.sh)?

Edit: In general, the environment setup in the terminal that you are building from should looks like this:

# OpenVINO
source /path/to/l_openvino_toolkit_ubuntu22_2023.2.0.13089.cfd42bd2cb0_x86_64/setupvars.sh

# Libtorch
export LIBTORCH_ROOTDIR=/path/to/libtorch

# Whisper.cpp
export WHISPERCPP_ROOTDIR=/path/to/whisper-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH

# CPP Stable Diffusion
export CPP_STABLE_DIFFUSION_OV_ROOTDIR=/path/to/stablediffusion-pipelines-cpp-build/installed
export LD_LIBRARY_PATH=${CPP_STABLE_DIFFUSION_OV_ROOTDIR}/lib:$LD_LIBRARY_PATH

@sandoxy
Copy link

sandoxy commented Jan 28, 2024

I did every step of the instructions, but in the meantime my terminal was closed. I repeted the last stets, but there is still an error. I will go all all the steps again, including your suggestion.

@sandoxy
Copy link

sandoxy commented Jan 28, 2024

After a you try i am still getting this error:

gmake: *** No rule to make target 'mod-openvino'. Stop."

I used also your suggestions.

@RyanMetcalfeInt8
Copy link
Contributor

@sandoxy, can you give full log of cmake commands? Thanks!

@sandoxy
Copy link

sandoxy commented Jan 28, 2024

Of course. Where do i find that log? Or do you mean just a list of commands i used?

@RyanMetcalfeInt8
Copy link
Contributor

Hi @sandoxy, sorry, I should have been more specific. When you execute:

cmake --build . --config Release --target mod-openvino

Or, if you're following my suggestion where you just build audacity again:

# Create build directory
mkdir audacity-build-new
cd audacity-build-new

cmake -G "Unix Makefiles" ../audacity -DCMAKE_BUILD_TYPE=Release

# build it 
make -j`nproc`

In either case, there is probably a bunch of stuff that is printed to the terminal after entering the commands. Can you just copy and paste this into a text file and share it, just so that I can take a look to see what the issue may be?

Thanks!

@sandoxy
Copy link

sandoxy commented Jan 29, 2024

log.txt

Here is the log.

@RyanMetcalfeInt8
Copy link
Contributor

Thanks @sandoxy,

Did you clone this repo, and copy the mod-openvino folder into /home/USER/Schreibtisch/OpenVino/audacity/modules directory? Also, did you add the line add_subdirectory(mod-openvino) to /home/USER/Schreibtisch/OpenVino/audacity/modules/CMakeLists.txt?

I didn't see these steps in the log that you sent, but maybe you did it outside of this terminal? Can you just confirm by sending printed output of these commands:

# first cmd
ls /home/USER/Schreibtisch/OpenVino/audacity/modules/mod-openvino

# 2nd cmd:
cat /home/USER/Schreibtisch/OpenVino/audacity/modules/CMakeLists.txt


@sandoxy
Copy link

sandoxy commented Jan 29, 2024

I did it outsider of the terminal

USER@PC:~/Schreibtisch/OpenVino/audacity/audacity-build$ ls /home/USER/Schreibtisch/OpenVino/audacity/modules/mod-openvino
CMakeLists.txt  htdemucs.h    OVMusicGeneration.cpp  OVMusicSeparation.cpp  OVMusicStyleRemix.cpp  OVNoiseSuppression.cpp  OVWhisperTranscription.cpp
htdemucs.cpp    OpenVINO.cpp  OVMusicGeneration.h    OVMusicSeparation.h    OVMusicStyleRemix.h    OVNoiseSuppression.h    OVWhisperTranscription.h
USER@PC:~/Schreibtisch/OpenVino/audacity/audacity-build$ cat /home/USER/Schreibtisch/OpenVino/audacity/modules/CMakeLists.txt
# Include the modules that we'll build

# The list of modules is ordered so that each module occurs after any others
# that it depends on
set( MODULES
   mod-script-pipe
   mod-mp3
   mod-pcm
   mod-cl
   mod-lof
   mod-aup
)
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
   list( APPEND MODULES
      mod-null
      mod-nyq-bench
   )
endif()

if ( USE_LIBOGG AND USE_LIBVORBIS )
   list( APPEND MODULES mod-ogg )
endif()

if ( USE_LIBFLAC )
   list( APPEND MODULES mod-flac )
endif()

if ( USE_LIBTWOLAME )
   list ( APPEND MODULES mod-mp2)
endif()

if ( USE_WAVPACK )
   list ( APPEND MODULES mod-wavpack )
endif()

if ( USE_LIBMPG123 )
   list ( APPEND MODULES mod-mpg123 )
endif()

if ( USE_FFMPEG )
   list ( APPEND MODULES mod-ffmpeg )
endif()

if ( USE_LIBOPUS AND USE_OPUSFILE AND USE_LIBOGG )
   list ( APPEND MODULES mod-opus )
endif()

foreach( MODULE ${MODULES} )
   add_subdirectory("${MODULE}")
endforeach()

add_subdirectory(mod-openvino)

#propagate collected edges up to root CMakeLists.txt
set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE )
USER@PC:~/Schreibtisch/OpenVino/audacity/audacity-build$

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jan 29, 2024

Hmm, okay those look correct.

Can you try running Audacity cmake / make step again from your terminal, and send me the output?

(from inside your existing audacity-build folder)

cmake -G "Unix Makefiles" ../audacity -DCMAKE_BUILD_TYPE=Release

# build it 
make -j`nproc`

@sandoxy
Copy link

sandoxy commented Jan 29, 2024

do i have to replace ../audacity with the actual audacity folder?

@RyanMetcalfeInt8
Copy link
Contributor

do i have to replace ../audacity with the actual audacity folder?

Oh, yes, sorry. You can run the same cmake command that I see in your log:

cmake -G "Unix Makefiles" /home/USER/Schreibtisch/OpenVino/audacity/ -DCMAKE_BUILD_TYPE=Release

@sandoxy
Copy link

sandoxy commented Jan 29, 2024

Of cource:

cmake -G "Unix Makefiles" /home/USER/Schreibtisch/OpenVino/audacity/ -DCMAKE_BUILD_TYPE=Release
-- The ASM_NASM compiler identification is unknown
-- Didn't find assembler
-- Build Info:
--   Host System: Linux-6.5.0-15-generic
--   Host System Name: Linux
--   Host System Processor: x86_64
--   Host System Version: 6.5.0-15-generic
--   Host System Architecture: 64-bit
-- 
--   Compiler: /usr/bin/c++
--   Compiler Version: 11.4.0
--   Compiler Standard: 17
--   Compiler Standard Required: ON
--   Compiler Extensions: 
-- 
--   Current Commit: 9dd60f25c
-- 
-- ========== Using Conan version of ZLIB ==========
-- ========== Using Conan version of PNG ==========
-- ========== Using Conan version of JPEG ==========
-- ========== Using Conan version of EXPAT ==========
-- ========== Using Conan version of wxWidgets ==========
-- ========== Using Conan version of libmp3lame ==========
-- ========== Using Conan version of mpg123 ==========
-- ========== Using Conan version of libid3tag ==========
-- ========== Using Conan version of WavPack ==========
-- ========== Using Conan version of Ogg ==========
-- ========== Using Conan version of FLAC ==========
-- ========== Using Conan version of Opus ==========
-- ========== Using Conan version of opusfile ==========
-- ========== Using Conan version of Vorbis ==========
-- ========== Using Conan version of SndFile ==========
-- ========== Using Conan version of PortAudio ==========
-- ========== Using Conan version of RapidJSON ==========
-- ========== Using Conan version of PortMidi ==========
-- ========== Using Conan version of vst3sdk ==========
-- ========== Using Conan version of Catch2 ==========
-- Found libuuid: 
	libuuid_INCLUDE_DIR: /usr/include
	libuuid_LIBRARIES: /usr/lib/x86_64-linux-gnu/libuuid.so
'/usr/bin/python3.10' '/home/USER/Schreibtisch/OpenVino/audacity/conan/conan_runner.py' '--build-dir' '/home/USER/Schreibtisch/OpenVino/audacity/audacity-build' '--compiler' 'GNU' '--compiler-version' '11.4.0' '--build-types' 'Release' '--target-arch' 'x86_64' '--build-arch' 'x86_64' '--lib-dir' 'lib/audacity' '-o' 'use_zlib=True' 'use_libpng=True' 'use_libjpeg-turbo=True' 'use_expat=True' 'use_wxwidgets=True' 'use_libmp3lame=True' 'use_mpg123=True' 'use_libid3tag=True' 'use_wavpack=True' 'use_ogg=True' 'use_flac=True' 'use_opus=True' 'use_opusfile=True' 'use_vorbis=True' 'use_libsndfile=True' 'use_jack=True' 'use_portaudio=True' 'use_rapidjson=True' 'use_portmidi=True' 'use_vst3sdk=True' 'use_catch2=True'
Skipping conan install, arguments and requirements are the same
-- Conan: Target declared 'ZLIB::ZLIB'
-- Conan: Target declared 'EXPAT::EXPAT'
-- Conan: Component target declared 'wxwidgets::base'
-- Conan: Component target declared 'wxwidgets::core'
-- Conan: Component target declared 'wxwidgets::adv'
-- Conan: Component target declared 'wxwidgets::net'
-- Conan: Component target declared 'wxwidgets::xml'
-- Conan: Component target declared 'wxwidgets::html'
-- Conan: Component target declared 'wxwidgets::aui'
-- Conan: Component target declared 'wxwidgets::qa'
-- Conan: Component target declared 'wxwidgets::xrc'
-- Conan: Target declared 'wxwidgets::wxwidgets'
-- Conan: Target declared 'libmp3lame::libmp3lame'
-- Conan: Component target declared 'MPG123::libmpg123'
-- Conan: Component target declared 'MPG123::libout123'
-- Conan: Component target declared 'MPG123::libsyn123'
-- Conan: Target declared 'mpg123::mpg123'
-- Conan: Target declared 'libid3tag::libid3tag'
-- Conan: Target declared 'wavpack::wavpack'
-- Conan: Component target declared 'Ogg::ogg'
-- Conan: Component target declared 'FLAC::FLAC'
-- Conan: Component target declared 'FLAC::FLAC++'
-- Conan: Target declared 'flac::flac'
-- Conan: Component target declared 'opus::libopus'
-- Conan: Target declared 'Opus::opus'
-- Conan: Component target declared 'opusfile::libopusfile'
-- Conan: Component target declared 'opusfile::opusurl'
-- Conan: Target declared 'opusfile::opusfile'
-- Conan: Component target declared 'Vorbis::vorbis'
-- Conan: Component target declared 'Vorbis::vorbisenc'
-- Conan: Component target declared 'Vorbis::vorbisfile'
-- Conan: Target declared 'vorbis::vorbis'
-- Conan: Component target declared 'libsndfile::sndfile'
-- Conan: Target declared 'SndFile::sndfile'
-- Conan: Target declared 'portaudio::portaudio'
-- Conan: Target declared 'rapidjson'
-- Conan: Target declared 'portmidi::portmidi'
-- Conan: Component target declared 'vst3sdk::base'
-- Conan: Component target declared 'vst3sdk::pluginterfaces'
-- Conan: Component target declared 'vst3sdk::sdk'
-- Conan: Component target declared 'vst3sdk::sdk_common'
-- Conan: Component target declared 'vst3sdk::sdk_hosting'
-- Conan: Target declared 'vst3sdk::vst3sdk'
-- Conan: Target declared 'Catch2::Catch2'
-- Trying to retrieve GTK version from libwx_gtk2u_core-3.1.so
-- ========== Configuring vamp ==========
-- Using 'vamp' local library
-- ========== Configuring lv2 ==========
-- Using 'lv2' local library
-- Checking for module 'gtk+-3.0'
--   No package 'gtk+-3.0' found
-- Checking for module 'gtk+-x11-3.0'
--   No package 'gtk+-x11-3.0' found
-- Checking for module 'QtGui >= 4.4.0'
--   No package 'QtGui' found
-- Checking for module 'Qt5Widgets >= 5.1.0'
--   No package 'Qt5Widgets' found
-- ========== Configuring portsmf ==========
-- Using 'portsmf' local library
-- ========== Configuring sbsms ==========
-- Using 'sbsms' local library
-- ========== Configuring soundtouch ==========
-- Using 'soundtouch' local library
-- ========== Configuring twolame ==========
-- Using 'twolame' local library
-- ========== Configuring manual ==========
-- ========== Configuring images ==========
-- ========== Configuring lib-string-utils ==========
-- ========== Configuring lib-strings ==========
-- ========== Configuring lib-utility ==========
-- ========== Configuring lib-uuid ==========
-- ========== Configuring lib-components ==========
-- ========== Configuring lib-basic-ui ==========
-- ========== Configuring lib-exceptions ==========
-- ========== Configuring lib-export-ui ==========
-- ========== Configuring lib-preferences ==========
-- ========== Configuring soxr ==========
-- Using 'soxr' local library
-- ========== Configuring lib-math ==========
-- ========== Configuring lib-files ==========
-- ========== Configuring lib-import-export ==========
-- ========== Configuring lib-ipc ==========
-- ========== Configuring lib-registries ==========
-- ========== Configuring lib-xml ==========
-- ========== Configuring lib-audio-devices ==========
-- ========== Configuring lib-project ==========
-- ========== Configuring lib-screen-geometry ==========
-- ========== Configuring lib-project-rate ==========
-- ========== Configuring lib-file-formats ==========
-- ========== Configuring lib-theme ==========
-- ========== Configuring lib-theme-resources ==========
-- ========== Configuring lib-track ==========
-- ========== Configuring lib-transactions ==========
-- ========== Configuring lib-sample-track ==========
-- ========== Configuring lib-module-manager ==========
-- ========== Configuring lib-project-history ==========
-- ========== Configuring lib-graphics ==========
-- ========== Configuring lib-audio-graph ==========
-- ========== Configuring lib-tags ==========
-- ========== Configuring lib-realtime-effects ==========
-- ========== Configuring lib-audio-io ==========
-- ========== Configuring lib-wave-track ==========
-- ========== Configuring lib-track-selection ==========
-- ========== Configuring sqlite ==========
-- Using 'sqlite' local library
-- ========== Configuring lib-project-file-io ==========
-- ========== Configuring lib-command-parameters ==========
-- ========== Configuring lib-numeric-formats ==========
-- ========== Configuring lib-effects ==========
-- ========== Configuring lib-time-frequency-selection ==========
-- ========== Configuring lib-wx-wrappers ==========
-- ========== Configuring lib-shuttlegui ==========
-- ========== Configuring lib-wx-init ==========
-- ========== Configuring lib-time-track ==========
-- ========== Configuring lib-vst3 ==========
-- ========== Configuring lib-snapping ==========
-- ========== Configuring lib-vst ==========
-- ========== Configuring lib-lv2 ==========
-- ========== Configuring lib-ladspa ==========
-- ========== Configuring lib-playable-track ==========
-- ========== Configuring lib-time-and-pitch ==========
-- ========== Configuring lib-mixer ==========
-- ========== Configuring lib-channel ==========
-- ========== Configuring lib-stretching-sequence ==========
-- ========== Configuring locale ==========
-- ========== Configuring Audacity ==========
-- Using precompiled headers
-- ========== Configuring mod-script-pipe ==========
-- ========== Configuring mod-mp3 ==========
-- ========== Configuring mod-pcm ==========
-- ========== Configuring mod-cl ==========
-- ========== Configuring mod-lof ==========
-- ========== Configuring mod-aup ==========
-- ========== Configuring mod-null ==========
-- ========== Configuring mod-nyq-bench ==========
-- ========== Configuring mod-ogg ==========
-- ========== Configuring mod-flac ==========
-- ========== Configuring mod-mp2 ==========
-- ========== Configuring mod-wavpack ==========
-- ========== Configuring mod-mpg123 ==========
-- ========== Configuring lib-ffmpeg-support ==========
-- ========== Configuring mod-ffmpeg ==========
-- ========== Configuring mod-opus ==========
ENV LIBTORCH_ROOTDIR = /home/USER/Schreibtisch/OpenVino/libtorch-cxx11-abi-shared-with-deps-2.1.1+cpu/libtorch/
-- Found Torch: /home/USER/Schreibtisch/OpenVino/libtorch-cxx11-abi-shared-with-deps-2.1.1+cpu/libtorch/lib/libtorch.so  
torch libraries = torch;torch_library;/home/USER/Schreibtisch/OpenVino/libtorch-cxx11-abi-shared-with-deps-2.1.1+cpu/libtorch/lib/libc10.so;/home/USER/Schreibtisch/OpenVino/libtorch-cxx11-abi-shared-with-deps-2.1.1+cpu/libtorch/lib/libkineto.a
whisper library = /home/USER/Schreibtisch/OpenVino/whisper.cpp/whisper-build/installed/lib/libwhisper.so
stable_diffusion_ov library = /home/USER/Schreibtisch/OpenVino/stablediffusion-pipelines-cpp/stablediffusion-pipelines-cpp-build/installed/lib/libstable_diffusion_ov.so
stable_diffusion_audio_ov library = /home/USER/Schreibtisch/OpenVino/stablediffusion-pipelines-cpp/stablediffusion-pipelines-cpp-build/installed/lib/libstable_diffusion_audio_ov.so
-- ========== Configuring mod-openvino ==========
-- ========== Configuring nyquist ==========
-- ========== Configuring plug-ins ==========
-- Configuring done
-- Generating done
-- Build files have been written to: /home/USER/Schreibtisch/OpenVino/audacity/audacity-build
USER@PC:~/Schreibtisch/OpenVino/audacity/audacity-build$

@RyanMetcalfeInt8
Copy link
Contributor

Hi @sandoxy,

Looks like the CMake command worked (I see the printouts confirming LIBTORCH, whisper, etc.).

I think you can just build it now:

make -j`nproc`

And after that completes, if all goes well, you should see mod-openvino.so in audacity-bui;d/Release/lib/audacity/modules/

@sandoxy
Copy link

sandoxy commented Jan 29, 2024

Hi RyanMetcalfeln8:

I don't know why, bug it seems to have worked this time. Now it looks like that;

https://github.com/intel/openvino-plugins-ai-audacity/blob/main/doc/build_doc/linux/preferences_enabled.png

Thanks a lot!

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jan 29, 2024

That's great @sandoxy -- glad to hear it's working. I think I'll update the Linux instructions to explicitly run cmake step again after putting the mod-openvino in place. Anyway, you certainly didn't do anything wrong -- I think I just messed up the explanation of the routine -- but this was very useful. Thanks again!

@sandoxy
Copy link

sandoxy commented Jan 29, 2024

Great, I hope this will help other linux-users to install this plugin!:)

@RyanMetcalfeInt8
Copy link
Contributor

Hi @arildnor,

I've updated the Linux instructions (https://github.com/intel/openvino-plugins-ai-audacity/blob/main/doc/build_doc/linux/README.md#audacity-openvino-module-build) to reflect the method that worked smoothly for @sandoxy. If you're still interested in trying this, could you let me know if it works for you? Otherwise, I can close this issue as completed.

Thanks!
Ryan

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

3 participants