How to pass "none" to -audioval when running qemu-system-arm on Ubuntu WSL? - windows-subsystem-for-linux

I'm trying to run qemu-system-arm Versatilepb emulator with the following command:
qemu-system-arm -M versatilepb -m 128M -kernel t.bin -serial mon:stdio
but whenever I do that, I get an error that my ALSA lib isn't installed:
Unable to init server: Could not connect: Connection refused
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4732:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
qemu-system-arm: could not load kernel 't.bin'
So I've read that I need to either install ALSA, PA, OSS, or some other form of audio drivers if I want to emulate that specific board. I also saw that I can ignore those errors if I purposely set the audio driver to be none, and that's what I tried doing by trying out the following:
qemu-system-arm -M versatilepb -m 128M -kernel t.bin -serial mon:stdiocode -audiodev none,id=none
that returns this:
audio: Device lm4549: audiodev default parameter is deprecated, please specify audiodev=none
I've tried looking around, but there's a handful of email threads pertaining to maintainers of qemu who are familiar with the -audiodev parameter, but none seem to be just running the emulator with "none" as the audio-driver. What am I doing wrong or how would I go fixing this, without having to install one of the above-mentioned audio driver libs?

Related

CMake Error: Remove failed on file System Error: Device or resource busy

When trying to cmake a CGAL example, I get
CMake Error: Remove failed on file:
/cgal/example/CMakeFiles/CMakeTmp/cmTC_9e180.exe: System Error: Device or resource busy
Working under Win10 + Msys2.
CGAL was obtained via pacman (local/mingw-w64-x86_64-cgal 4.13-1).
Since I did not find the CGAL examples in any Msys2 package,
it was copied from file /usr/share/doc/libcgal13/examples.tar.gz, which was obtained in an Ubuntu system with
$ sudo apt-get install libcgal-demo
The example is reconstruction_surface_mesh.cpp from examples/Advancing_front_surface_reconstruction.
I wouldn't know if the origin of the error is specific to my CMakeLists.txt, or else.
Related, but AFAICT not providing the answer:
https://cmake.org/pipermail/cmake-developers/2010-November/012619.html
https://gitlab.kitware.com/cmake/cmake/issues/17566
https://github.com/TadasBaltrusaitis/OpenFace/issues/634
CMake: how to use INTERFACE_INCLUDE_DIRECTORIES with ExternalProject?
https://www.google.com/search?safe=off&q=CMake+Error+in+CMakeLists.txt%3A+++Imported+target+includes+non-existent+path+in+its+INTERFACE_INCLUDE_DIRECTORIES.++Possible+reasons+include

No available mirrors for yaml-cpp

I'm trying to install mongodd using yaourt on archlinux which require the yaml-cpp lib to be installed.
The thing is, yaourt is unable to find a valid mirror to download from
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from ftp.swin.edu.au : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from ftp.acc.umu.se : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirror.neuf.no : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirrors.ustc.edu.cn : The requested URL returned error: 404
error: failed retrieving file 'yaml-cpp-0.6.1-3-x86_64.pkg.tar.xz' from mirror.23media.de : The requested URL returned error: 404
(4/4) checking keys in keyring [##############################] 100%
(4/4) checking package integrity [##############################] 100%
error: yaml-cpp: signature from "Levente Polyak (anthraxx) <levente#leventepolyak.net>" is invalid
I tried building the lib manually from source and putting it in /usr/lib but it doesn't work either.
What can I do here ?
Thanks
You must update your Arch Linux before installing any new package.
The following command are fine:
pacman -Syu followed by pacman -S yaml-cpp
pacman -Syu yaml-cpp
You must not do this (it may break your system):
pacman -Sy followed by pacman -S yaml-cpp
pacman -Sy yaml-cpp

Record voice on Virtual Machine, which lacks some drivers

From this source code
import pyaudio
import wave
import os
CHUNK = 1024
FORMAT = pyaudio.paInt16 #paInt8
CHANNELS = 2
RATE = 44100 #sample rate
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "output.wav"
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT,
channels=CHANNELS,
rate=RATE,
input=True,
frames_per_buffer=CHUNK) #buffer
print("* recording")
frames = []
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
data = stream.read(CHUNK)
frames.append(data) # 2 bytes(16 bits) per channel
print("* done recording")
stream.stop_stream()
stream.close()
p.terminate()
wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
wf.setnchannels(CHANNELS)
wf.setsampwidth(p.get_sample_size(FORMAT))
wf.setframerate(RATE)
wf.writeframes(b''.join(frames))
wf.close()
# Oben an audio file
#WAVE_OUTPUT_FILENAME.open()
When I am using pyaudio on my local computer It works fine,
But when I use the similar code in Virtual Machine It gives me the following error:
azureuser#sonicplus:~/myapp/static/css$ python VoiceRecorder.py
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4248:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM dmix
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
* recording
* done recording
It has no sound. I am new to pyaudio,
Any help will be appreciated.

gfortran: error: CreateProcess: No such file or directory in build with MinGW

I tried to build shared lib for Lapack with MinGW_64. I got error as
gfortran: error: CreateProcess: No such file or directory.
My Lapack version is Lapack_3.5 and my MinGW has x86_64-4.9.2-posix-seh-rt_v3-rev1 version for x86_64.
I can build blas.dll with gfortran --shared -o blas.dll blas\src\*.f -O successfully. But when I build lapack.dll with gfortran --shared -o lapack.dll src\*.f blas.dll -O, I got gfortran: error: CreateProcess: No such file or directory error. I have restarted the system after MinGW's installation.
This may be due to an error in the mingw package you are using. The same thing happened to me.
If you search for a gfortran.exe file under your mingw tree (x86_mingwgfortran.exe or whatever - I don't have the machine this happend on any more), you can invoke this with the full pathname. This should work.

How do I set up wxWidgets for Windows and CodeLite?

I'm trying out a new setup. I'm on a 32-bit Windows 8 Pro laptop. I've downloaded MinGW-builds' GCC 4.8.1. I used it to compile LLVM & CLang (3.4+ from a SVN copy of the trunk). Both of those are in my PATH.
I've downloaded CodeLite 5.2, which came with a copy of MinGW/GCC 4.7.1. I got the pure console tutorial example working, but I can't get the wxWidgets example working. (It's the Quick Start.) I downloaded & installed wxWidgets. (Always a good first step.) I built it with MinGW-4.8.1. I've read the error notes and added two (first local, now system) environment variables: WXWIN at "C:\wxWidgets-2.9.5" and WXCFG at "..\build\msw\gcc_mswud". (I initially thought WXCFG would be an absolute path, but it's based off of "%WXWIN%\lib\".) I moved my MinGW and LLVM builds out of "C:\Program Files" to "C:\" to avoid having a space in their paths.
Here's the (still) error output when I build with F7:
C:\WINDOWS\system32\cmd.exe /c "mingw32-make.exe -j 2 -e -f Makefile"
"----------Building project:[ Test1_2 - Debug ]----------"
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll\mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll\mswud)
to specify which configuration exactly you want to use.
mingw32-make.exe[1]: Entering directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
g++: error: wx-config: No such file or directory
g++: error: Error:: Invalid argument
g++: error: No: No such file or directory
g++: error: valid: No such file or directory
g++: error: setup.h: No such file or directory
g++: error: of: No such file or directory
g++: error: wxWidgets: No such file or directory
g++: error: has: No such file or directory
g++: error: been: No such file or directory
g++: error: found: No such file or directory
g++: error: at: No such file or directory
g++: error: location:: Invalid argument
g++: error: C:\wxWidgets-2.9.5\lib\..\build\msw\gcc_mswud\wx\setup.h: No such file or directory
mingw32-make.exe[1]: *** [Debug/test1_2_frame.o.d] Error 1
mingw32-make.exe[1]: *** Waiting for unfinished jobs....
mingw32-make.exe[1]: *** [Debug/test1_2_app.o.d] Error 1
Test1_2.mk:102: recipe for target `Debug/test1_2_frame.o.d' failed
Test1_2.mk:94: recipe for target `Debug/test1_2_app.o.d' failed
mingw32-make.exe[1]: Leaving directory `C:/Users/Daryle/Documents/CodeLite/Test1/Test1_2'
mingw32-make.exe: *** [All] Error 2
Makefile:4: recipe for target `All' failed
0 errors, 0 warnings
At some point, a compiler step spewed out an error message and the next step interpreted it as actual parameters! (Should have sent the error on stderr instead of stdout?)
Update
After moving on to my actual work, I got errors and noticed that CodeLite is still using the MinGW 4.7.1 that came with the CodeLite download instead of using the 4.8.1 I downloaded. I probably messed things up by changing the search directories to my 4.8.1. I think I'm going to erase everything and start over....
wx-config.exe tool for Windows uses 2 environment variables:
WXCFG and WXWIN
You need to provide them so wx-config.exe will be able to locate wx-config files.
The recommended way is to set them within the IDE and not system wide.
To do this, from within the main menu, go to:
Settings -> Environment Variables
and add 2 entries:
WXWIN=\Path\to\wxWidgets\Folder
WXCFG=gcc_dll\mswu
Also, you mentioned that codelite is using GCC4.7.1 and not your 4.8.1. You should know that when working with GCC on Windows you should have all your components built with the same GCC version. so make sure that you don't use wxWidgets that we (codelite team) provide
since it was built with GCC4.7.1 or you might get some weird crashes.
To force codelite to use another GCC, simply alter the PATH from within codelite:
Settings -> Environment variables
PATH=\Path\To\MinGW-4.8.1\bin;$PATH
Eran
The error message seems to indicate that WXCFG environment variable is not set, did you relaunch the IDE after setting it? Remember that editing environment variables doesn't change them for the already running processes.