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

the openvino crash #236

Open
oxidian24 opened this issue Jun 21, 2024 · 37 comments
Open

the openvino crash #236

oxidian24 opened this issue Jun 21, 2024 · 37 comments

Comments

@oxidian24
Copy link

oxidian24 commented Jun 21, 2024

Audacity 3.5.1 alpha crashed when I try to start it with OpenVino activated. My CPU is dual core Intel Celeron made in 2009. I know that the modules were compiled when I compiled the audio, I remember it. But do I have the cmakelists.txt correct? I added it like this, line 13. Is that enough? I see other modules also uses fnc. list(APPEND MODULE mod-...

Maybe this is why it crashes, because I skipped it? add_subdirectory is adding the subdirectory automatically.

# 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-midi-import-export
   mod-script-pipe
   mod-mp3
   mod-pcm
   mod-cl
   mod-lof
   mod-aup
   mod-openvino
)
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()

if ( ${_OPT}has_audiocom_upload)
   list( APPEND MODULES
      mod-cloud-audiocom
   )
endif()

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

#propagate collected edges up to root CMakeLists.txt
set( GRAPH_EDGES "${GRAPH_EDGES}" PARENT_SCOPE )
@RyanMetcalfeInt8
Copy link
Contributor

Hi @oxidian24,

The changes that you made look fine to me.

Audacity 3.5.1 alpha crashed when I try to start it with OpenVino activated.

So Audacity runs fine by itself, without the plugins enabled in Edit->Preferences->Modules?

@oxidian24
Copy link
Author

Yep, when it's disabled so I can record the sound for example so Audacity seems to be working correctly (Audacity 3.5.1-alpha-20240615).

@RyanMetcalfeInt8
Copy link
Contributor

Are you running Audacity from a terminal? If so, when it crashes does it give a backtrace (i.e. a crash report)?

@oxidian24
Copy link
Author

yep but the log is empty. Would you add lines to source code, I could recompile and rerun and send you the logs.
Uploading report.zip…

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jun 23, 2024

If you're using an processor from 2009, then perhaps it is crashing because the whisper.cpp library enables AVX/AVX2 instructions by default (which didn't show up in processors until 2011 / 2012 timeframe). I would recommend recompiling the whisper.cpp library, but using this cmake command:

cmake ../whisper.cpp -DWHISPER_OPENVINO=ON -DWHISPER_NO_AVX=ON -DWHISPER_NO_AVX2=ON -DWHISPER_NO_FMA=ON -DWHISPER_NO_F16C=ON

@oxidian24
Copy link
Author

OK, so I will backup the current Release and then recompile, but I add more info on the CPU it was from end of 2008 (chatGPT).

*-core
description: Motherboard
product: KSWAA
vendor: TOSHIBA
physical id: 0
version: 1.00
serial number: 0123456789AB
*-firmware
description: BIOS
vendor: TOSHIBA
physical id: 0
version: V1.40
date: 07/10/2009
size: 110KiB
capabilities: isa pci pcmcia pnp upgrade shadowing escd cdboot acpi usb agp biosbootspecification
*-cpu
description: Processor
product: Pentium(R) Dual-Core CPU T4200 @ 2.00GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: 6.23.10
slot: U2E1
size: 1994MHz
capacity: 4096MHz
width: 64 bits
capabilities: lm fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ht tm pbe syscall nx x86-64 constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm pti dtherm cpufreq
configuration: cores=2 enabledcores=2 microcode=2571 threads=2
*-cache:0
description: L1 cache
physical id: 5
slot: L1 Cache
size: 64KiB
capacity: 64KiB
capabilities: asynchronous internal write-back data
configuration: level=1
*-cache:1
description: L2 cache
physical id: 6
slot: L2 Cache
size: 1MiB
capacity: 4MiB
capabilities: burst internal write-back unified
configuration: level=2

@oxidian24
Copy link
Author

Before I compile I want to make sure what folders of audacity backup. The backup is needed to transmit Audacity to different Notebook. So I originaly thought to backup the audacity / Release but now I see there are also directories lib lib-source, libraries, src or locale ... Should I backup them too?

@RyanMetcalfeInt8
Copy link
Contributor

I would just back up your audacity-build (and all subfolders). It's probably overkill, but more fool-proof than picking and choosing the specific ones that are needed (which, to be honest, I'm not sure of).

@oxidian24
Copy link
Author

I am slowly running of the disk space... So I won't backup, I will just carefully rename the directory.

@oxidian24
Copy link
Author

Are these all the commands I need to perform?

export WHISPERCPP_ROOTDIR=/home/user/OpenVino/whisper-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH
export LIBTORCH_ROOTDIR=/home/user/OpenVino/libtorch
source /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/setupvars.sh
cd whisper-build

cmake ../whisper.cpp -DWHISPER_OPENVINO=ON -DWHISPER_NO_AVX=ON -DWHISPER_NO_AVX2=ON -DWHISPER_NO_FMA=ON -DWHISPER_NO_F16C=ON

If so, I am ready.

@RyanMetcalfeInt8
Copy link
Contributor

To rebuild whisper.cpp, you'll just need these:

#setup openvino env.
source /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/setupvars.sh

#create a new build directory for this
mkdir whisper-noavx-build
cd whisper-noavx-build

# run cmake
cmake ../whisper.cpp -DWHISPER_OPENVINO=ON -DWHISPER_NO_AVX=ON -DWHISPER_NO_AVX2=ON -DWHISPER_NO_FMA=ON -DWHISPER_NO_F16C=ON

#compile it
make -j 2

# Install built whisper collateral into a local 'installed' directory:
cmake --install . --config Release --prefix ./installed

# set these environment variables to point to the 'noavx' build
export WHISPERCPP_ROOTDIR=/path/to/whisper-noavx-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH

@oxidian24
Copy link
Author

oxidian24 commented Jun 25, 2024

Compiled.
Now audacity shows this error:
"inappropriate ioctl for this device"
in a dialogue window.

I did not get message with a log.

Audacity does not crash, but the OpenVino failed to be loaded.

@RyanMetcalfeInt8
Copy link
Contributor

Are you launching Audacity from a terminal with all of the environment variables set (the same env. setup as the one you built within)?

@oxidian24
Copy link
Author

Yes...

[100%] Linking CXX shared module ../../Release/lib/audacity/modules/mod-openvino.so
[100%] Built target mod-openvino

~/OpenVino$ cd ~/Audacity/audacity-5.3.1-openvino-no-avx/Release/bin
~/Audacity/audacity-5.3.1-openvino-no-avx/Release/bin$ ./audacity
~/Audacity/audacity-5.3.1-openvino-no-avx/Release/bin$ ./audacity

@RyanMetcalfeInt8
Copy link
Contributor

Hmm, which version of libtorch did you download & use?

@oxidian24
Copy link
Author

libtorch-cxx11-abi-shared-with-deps-2.1.1+cpu.zip

@RyanMetcalfeInt8
Copy link
Contributor

Gotcha, that looks right. In your terminal that you are running audacity from, can you do:

ldd ./modules/mod-openvino.so

And send the output?

@oxidian24
Copy link
Author

oxidian24 commented Jun 25, 2024

There are no such .so files in the directory
~/Audacity/audacity-5.3.1-openvino-no-avx/modules/mod-openvino$ ls
CMakeFiles cmake_install.cmake CTestTestfile.cmake Makefile musicgen

@RyanMetcalfeInt8
Copy link
Contributor

Oh, sorry, I think they must be located here:

~/Audacity/audacity-5.3.1-openvino-no-avx/Release/modules

@oxidian24
Copy link
Author

oxidian24 commented Jun 25, 2024

./lib/audacity/modules/mod-flac.so
./lib/audacity/modules/mod-mp3.so
./lib/audacity/modules/mod-lof.so
./lib/audacity/modules/mod-mpg123.so
./lib/audacity/modules/mod-cl.so
./lib/audacity/modules/mod-opus.so
./lib/audacity/modules/mod-openvino.so
./lib/audacity/modules/mod-script-pipe.so
./lib/audacity/modules/mod-ogg.so
./lib/audacity/modules/mod-pcm.so
./lib/audacity/modules/mod-mp2.so
./lib/audacity/modules/mod-wavpack.so
./lib/audacity/modules/mod-ffmpeg.so
./lib/audacity/modules/mod-aup.so
+
./lib/audacity/modules/mod-midi-import-export.so

@oxidian24
Copy link
Author

$ ldd mod-openvino*.so
linux-vdso.so.1 (0x00007fffe33df000)
libopenvino.so.2410 => /lib/libopenvino.so.2410 (0x00007fba4509b000)
libOpenCL.so.1 => /lib/x86_64-linux-gnu/libOpenCL.so.1 (0x00007fba45089000)
libc10.so => /home/user/OpenVino/libtorch/lib/libc10.so (0x00007fba44fc4000)
libwhisper.so => /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/whisper-noavx-build/installed/lib/libwhisper.so (0x00007fba44e1b000)
lib-shuttlegui.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-shuttlegui.so (0x00007fba44dc8000)
libwx_gtk2u_core-3.1.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libwx_gtk2u_core-3.1.so (0x00007fba443ea000)
lib-effects.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-effects.so (0x00007fba443a7000)
lib-wave-track.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-wave-track.so (0x00007fba44308000)
lib-time-frequency-selection.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-time-frequency-selection.so (0x00007fba442ea000)
lib-mixer.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-mixer.so (0x00007fba442c6000)
lib-playable-track.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-playable-track.so (0x00007fba442b9000)
lib-track.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-track.so (0x00007fba44286000)
lib-numeric-formats.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-numeric-formats.so (0x00007fba4423e000)
lib-math.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-math.so (0x00007fba441bb000)
lib-channel.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-channel.so (0x00007fba441b3000)
lib-module-manager.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-module-manager.so (0x00007fba44157000)
lib-string-utils.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-string-utils.so (0x00007fba4413e000)
lib-files.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-files.so (0x00007fba4410f000)
lib-preferences.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-preferences.so (0x00007fba440fb000)
lib-components.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-components.so (0x00007fba440e9000)
lib-strings.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-strings.so (0x00007fba440cd000)
libwx_baseu-3.1.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libwx_baseu-3.1.so (0x00007fba43dde000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fba43cf5000)
libtorch_cpu.so => /home/user/OpenVino/libtorch/lib/libtorch_cpu.so (0x00007fba2df18000)
libtorch.so => /home/user/OpenVino/libtorch/lib/libtorch.so (0x00007fba2df15000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fba2dce9000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fba2dcc9000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fba2daa0000)
/lib64/ld-linux-x86-64.so.2 (0x00007fba45fdb000)
libtbb.so.12 => /lib/x86_64-linux-gnu/libtbb.so.12 (0x00007fba2da4e000)
libopenvino.so.2400 => not found
lib-command-parameters.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-command-parameters.so (0x00007fba2da3e000)
lib-theme.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-theme.so (0x00007fba2d9c7000)
lib-wx-wrappers.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-wx-wrappers.so (0x00007fba2d982000)
libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007fba2d840000)
libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007fba2d706000)
libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007fba2d6a6000)
libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007fba2d4cd000)
libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007fba2d49d000)
libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007fba2d375000)
libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007fba2d30c000)
libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007fba2d2fa000)
libgdk-x11-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007fba2d239000)
libgtk-x11-2.0.so.0 => /lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fba2cdc2000)
libXtst.so.6 => /lib/x86_64-linux-gnu/libXtst.so.6 (0x00007fba2cdba000)
libjpeg.so.8 => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libjpeg.so.8 (0x00007fba2cd10000)
libpng16.so.16 => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libpng16.so.16 (0x00007fba2ccd4000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fba2cccf000)
lib-realtime-effects.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-realtime-effects.so (0x00007fba2cca2000)
lib-stretching-sequence.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-stretching-sequence.so (0x00007fba2cc8f000)
lib-sample-track.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-sample-track.so (0x00007fba2cc84000)
lib-audio-graph.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-audio-graph.so (0x00007fba2cc7b000)
lib-track-selection.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-track-selection.so (0x00007fba2cc51000)
lib-project-rate.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-project-rate.so (0x00007fba2cc3f000)
lib-project.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-project.so (0x00007fba2cc21000)
lib-xml.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-xml.so (0x00007fba2cbfd000)
lib-transactions.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-transactions.so (0x00007fba2cbf2000)
lib-basic-ui.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-basic-ui.so (0x00007fba2cbeb000)
lib-utility.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-utility.so (0x00007fba2cbe0000)
lib-time-and-pitch.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-time-and-pitch.so (0x00007fba2cbc1000)
lib-registries.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-registries.so (0x00007fba2cba9000)
lib-exceptions.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-exceptions.so (0x00007fba2cb9c000)
lib-snapping.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-snapping.so (0x00007fba2cb6f000)
lib-screen-geometry.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-screen-geometry.so (0x00007fba2cb6a000)
lib-project-history.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-project-history.so (0x00007fba2cb57000)
lib-ipc.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-ipc.so (0x00007fba2cb4c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fba2cb47000)
libz.so.1 => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libz.so.1 (0x00007fba2cb2c000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fba2cb27000)
libgomp-52f2fd74.so.1 => /home/user/OpenVino/libtorch/lib/libgomp-52f2fd74.so.1 (0x00007fba2c800000)
libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fba2cafb000)
libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007fba2ca85000)
libffi.so.8 => /lib/x86_64-linux-gnu/libffi.so.8 (0x00007fba2ca78000)
libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007fba2ca71000)
libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007fba2c7bc000)
libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007fba2ca43000)
libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fba2c711000)
libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fba2c6c7000)
libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fba2c5ff000)
libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fba2ca3e000)
libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fba2c5f0000)
libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007fba2c5e3000)
libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007fba2c5ce000)
libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007fba2c5b2000)
libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007fba2c5a7000)
libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007fba2c4d8000)
libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007fba2c4bd000)
libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007fba2ca35000)
libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007fba2c4a9000)
libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007fba2c49c000)
libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007fba2c490000)
libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007fba2c48b000)
libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007fba2c486000)
libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007fba2c47e000)
libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007fba2c454000)
lib-audio-devices.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../lib-audio-devices.so (0x00007fba2c42a000)
libexpat.so.1 => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libexpat.so.1 (0x00007fba2c3f6000)
libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007fba2c3f0000)
libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fba2c3e8000)
libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007fba2c3b1000)
libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007fba2c31a000)
libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fba2c30f000)
libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fba2c301000)
libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007fba2c2f8000)
libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007fba2c2d1000)
libportaudio.so => /home/user/Audacity/audacity-5.3.1-openvino-no-avx/Release/lib/audacity/modules/./../libportaudio.so (0x00007fba2c292000)
libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fba2c27a000)
libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fba2c257000)
libjack.so.0 => /usr/lib/x86_64-linux-gnu/pipewire-0.3/jack/libjack.so.0 (0x00007fba2c217000)
libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007fba2c114000)
libmd.so.0 => /lib/x86_64-linux-gnu/libmd.so.0 (0x00007fba2c105000)
libpipewire-0.3.so.0 => /lib/x86_64-linux-gnu/libpipewire-0.3.so.0 (0x00007fba2c023000)

@RyanMetcalfeInt8
Copy link
Contributor

I think this is your problem:

libopenvino.so.2400 => not found

In the terminal that you are running Audacity, do you have your OpenVINO environment setup (this is done by sourcing OpenVINO's setupvars.sh)

@oxidian24
Copy link
Author

oxidian24 commented Jun 26, 2024

  1. OpenVino installation from terminal looks like this:
    I run the bash code which sources the setupvars.sh and test of the steps.
  2. Bash exists after installation is done.
  3. OpenVino's setupvars.sh is in different directory so when I run Audacity I assume I don't need to source it again. In that cash, the is needed openvino-audacity.sh script into the bin ... so that linux user know that this must be sourced.

OK, now I run setupvars.sh and I rerun audacity and I send error report to you
Audacity_dbgrpt-673822-20240626T105437.zip

@oxidian24
Copy link
Author

I can confirm, that I run ldd *.so* from the same terminal where I have compiled whisper and audacity, setupvars.sh and that there is one item not found
libopenvino.so.2400 => not found
How is this possible?

@RyanMetcalfeInt8
Copy link
Contributor

Hmm, can you go to the openvino folder you have downloaded and do:

find . -name libopenvino.so.2400

Does it find it? It should be located in some runtime/bin folder. Sourcing OpenVINO's setupvars.sh should add this folder to your LD_LIBRARY_PATH. You can confirm this by doing:

echo $LD_LIBRARY_PATH

This is a : separated list of folders where applications can resolve .so's from. Double check that this runtime/bin folder is one of these.

@oxidian24
Copy link
Author

oxidian24 commented Jun 27, 2024

~/OpenVino$ find . -name libopenvino.so.2400
./l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64/libopenvino.so.2400

I can give you steps which I have done, this is from .bash_history, but there is no date (!) with the commands

# source /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/setupvars.sh
source $(readlink -f set*)
export LIBTORCH_ROOTDIR=/home/user/OpenVino/libtorch
cd ..
# Create build folder
mkdir whisper-build
cd whisper-build
# Run CMake, specifying that you want to enable OpenVINO support.
cmake ../whisper.cpp/ -DWHISPER_OPENVINO=ON
# Build it:
make -j 4
# Install built whisper collateral into a local 'installed' directory:
cmake --install . --config Release --prefix ./installed
cd /home/user/OpenVino/whisper-build
export WHISPERCPP_ROOTDIR=/home/user/OpenVino/whisper-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH

NEXT RESULT:

# Try audacity if you want...
Release/bin/audacity
export LIBTORCH_ROOTDIR=/home/user/OpenVino/libtorch
source /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/setupvars.sh
cd /home/user/OpenVino/whisper-build/installed
ls
read -p "Press a key to continue"
cd /home/user/OpenVino/whisper-build/make -j 4
cmake --install . --config Release --prefix ./installed

export WHISPERCPP_ROOTDIR=/home/user/OpenVino/whisper-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH
export LIBTORCH_ROOTDIR=/home/user/OpenVino/libtorch
source /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/setupvars.sh

NOTE:
I have closed the terminal and shutdown PC. So do you want me to run setupvars.sh and then echo $LD_LIBRARY_PATH
? If so this is the result:

$LD_LIBRARY_PATH


Not set. Please tell me what specific lines are you talking about from setupvars.sh and I will check it.

Notice:
I think the Openvino tools did not included Mint, as I remember the devs did not add Mint do dependencies (Mint 21.3). I have had to manually modify the script do install_openvino_dependencies.sh (but which is identical to the operation for Ubuntu 22.10 to add the conditions for Mint 21.3 just after Ubuntu 22.10.

I can pull the bash script if you want, so you can check it too.

@RyanMetcalfeInt8
Copy link
Contributor

Hmm, echo $LD_LIBRARY_PATH should give you something more interesting than $LD_LIBRARY_PATH. Can you double check?

@oxidian24
Copy link
Author

The code I sent to you contains the input in terminal:

$LD_LIBRARY_PATH

And empty line of the output result:

Variables is not set.

I send you logs from setupvar.sh

2024-06-28 09:24:48 INSTALLDIR=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64
export INTEL_OPENVINO_DIR=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64
<<< Directory runtime >>>
OpenVINO_DIR
OSTYPE: linux-gnu
2024-06-28 09:24:48 export LD_LIBRARY_PATH=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64
2024-06-28 09:24:48 export PKG_CONFIG_PATH=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64/pkgconfig
This folder is missing: /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/3rdparty/tbb
<<< Directory opencv >>>
This folder is missing... /opencv
WARNING ... /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/opencv/setupvars.sh is missing
<<< command -v lbs_release >>>
<<< command -v python ... python_version_to_check i.e command -v python3
python_interp:
python_bitness:64

@oxidian24
Copy link
Author

screenshot

@RyanMetcalfeInt8
Copy link
Contributor

Hmm, I'm not really sure what is going on. I'm confused why your LD_LIBRARY_PATH would be empty. Is this also the same terminal where you ran this?

export WHISPERCPP_ROOTDIR=/home/user/OpenVino/whisper-build/installed
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH

At the very least, it should be set to this.

@RyanMetcalfeInt8
Copy link
Contributor

If there is something wrong with setupvars.sh, that is weird, but you ultimately just need to add /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64/ to your LD_LIBRARY_PATH, so:

export LD_LIBRARY_PATH=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64/:${LD_LIBRARY_PATH}

You may need to also add some TBB library path to your LD_LIBRARY_PATH as well, now that I think about it. After setting that LD_LIBRARY_PATH, you can do ldd /path/to/libopenvino.so.2400 to see if there are libraries that are not getting found.

@oxidian24
Copy link
Author

oxidian24 commented Jun 28, 2024

Now when I check the path
/home/user/OpenVino/whisper-build/installed
so this was the old path. I am not really sure because I don't remember if this was compiled with the wrong path, but I don't think so. I compiled the whisper binaries fine as I remember. This is confusing for you sorry. I've moved
whisper-build
from
/home/user/OpenVino/whisper-build/installed
to
/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeread
so probably I did not locate the correct commands in .bash_history - these last commands from the last compilation probably was not written.

I will ask chatGPT what's wrong with the script and why the exported variable is not set out of the bash script. When I will find out what's going on, I will reply again.

@oxidian24
Copy link
Author

oxidian24 commented Jun 30, 2024

So I have found the problem. I have run the setupvars.sh instead sourcing it source setupvars.sh. Now I must compile OpenVino - the Whisper and Audacity. Rights?

echo "$INTEL_OPENVINO_DIR"
/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64

echo "$OpenVINO_DIR"
/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/cmake

echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
LD_LIBRARY_PATH=/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64

pwd
/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/lib/intel64

user@Toshi:~/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caefind . -name libopenvino.so.2400
./libopenvino.so.2400

@oxidian24
Copy link
Author

What do you mean?
"You may need to also add some TBB library path to your LD_LIBRARY_PATH as well, now that I think about it."
There is no such directory, as this was stated in my setupvar.log:
This folder is missing: /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/3rdparty/tbb
Do I need tbb? I thought that is redundant 3D party software.

I have the script build-openvino-no-avx.sh
so it contains the mistake, that it does not export anything for the next audacity compilation?

#!/bin/bash
toolkit_path="/home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64"
source "$toolkit_path/setupvars.sh"
mkdir "$toolkit_path/whisper-noavx-build"
mkdir "$toolkit_path/whisper-noavx-build/lib"
cd "$toolkit_path/whisper-noavx-build"
cmake ../whisper.cpp -DWHISPER_OPENVINO=ON -DWHISPER_NO_AVX=ON -DWHISPER_NO_AVX2=ON -DWHISPER_NO_FMA=ON -DWHISPER_NO_F16C=ON
make -j 2

cmake --install . --config Release --prefix ./installed
export WHISPERCPP_ROOTDIR="$toolkit_path/whisper-noavx-build/installed"
export LD_LIBRARY_PATH=${WHISPERCPP_ROOTDIR}/lib:$LD_LIBRARY_PATH

echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH";
echo "WHISPERCPP_ROOTDIR=$WHISPERCPP_ROOTDIR"
read -p "Check the above and continue."

@RyanMetcalfeInt8
Copy link
Contributor

What do you mean? "You may need to also add some TBB library path to your LD_LIBRARY_PATH as well, now that I think about it."

I was saying that if you want to set LD_LIBRARY_PATH manually, you probably need to add both the runtime path (the folder that contains libopenvino.so.2400) as well as the TBB path.

There is no such directory, as this was stated in my setupvar.log:
This folder is missing: /home/user/OpenVino/l_openvino_toolkit_ubuntu22_2024.0.0.14509.34caeefd078_x86_64/runtime/3rdparty/tbb

Hmm, this seems strange to me. There should be a TBB folder. Can you try downloading the OpenVINO package again and unzipping it?

@RyanMetcalfeInt8
Copy link
Contributor

RyanMetcalfeInt8 commented Jul 1, 2024

I have the script build-openvino-no-avx.sh
so it contains the mistake, that it does not export anything for the next audacity compilation?

Hmm, maybe I don't quite understand the question. But, as with setupvars.sh, it will depend on whether you execute this script ./my_script.sh, or source it source my_script.sh -- the exports you have there at the end will only stick if the script is sourced.

@oxidian24
Copy link
Author

oxidian24 commented Jul 1, 2024

I wrote:
" so it contains the mistake, that it does not export anything for the next audacity compilation?"
meaning, there is export command in the bash script. The script is run like ./script.sh
not source ./script.sh
which could be the problem. Problem that this is the reason why no path is set up for the compilation of audacity.

Now, I'm having health and technical issues, so I will probably need few days rest before I can continue.

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

2 participants