why I cannot build QEMU for RISC-V? - simulator

I tried to build QEMU for RISC-V ISA simulator.
However, after I downloaded it and type the following:
$ ./configure --target-list=riscv-softmmu
It gave me this:
ERROR: Unknown target name 'riscv-softmmu'
Can anyone shed some lights on it?
I am using Mac OS.

The first issue with the configure command in your question is that the target name is invalid. The available RISC-V configure targets are
riscv64-softmmu
riscv32-softmmu
riscv64-linux-user (linux only)
riscv32-linux-user (linux only)
Also, the RISC-V port was accepted into QEMU 2.12, so you need to be using the most recent version. There are more details on SiFive's blog:
https://www.sifive.com/blog/2018/04/25/risc-v-qemu-part-2-the-risc-v-qemu-port-is-upstream/
If you want to try the latest version of the RISC-V QEMU port, you can clone and build the riscv-qemu GitHub repository:
Linux
git clone --recursive https://github.com/riscv/riscv-qemu.git
cd riscv-qemu
./configure --target-list=\
riscv64-softmmu,riscv32-softmmu,\
riscv64-linux-user,riscv32-linux-user
macOS
git clone --recursive https://github.com/riscv/riscv-qemu.git
cd riscv-qemu
./configure --target-list=\
riscv64-softmmu,riscv32-softmmu
The RISC-V QEMU Port Wiki contains a collection of information on the port include links to Operating System images for RISC-V QEMU:
https://github.com/riscv/riscv-qemu/wiki

Related

Is it possible to Install lammps gpu package on AMD Radeon?

I've been searching all the Internet looking for this answer but couldn't find. The thing is, I have a graphics card from AMD (R9 380). From what I was reading on the lammps manual, the gpu package would only work with NVIDIA cards, since AMD's doesn't have cuda cores. But they also have a Makefile.linux_opencl, which, in theory, would work with AMD cards. I'm trying to install this gpu package for 2 days with no success...Has someone succeed to install this package in an AMD card? If so, what is the catch?
Quick look says it supports both AMD & NVidia (OpenCL & CUDA), so the answer is likely "yes". Did you try to clone from their github repo and build it with CMake ?
cmake /path/to/lammps/source/cmake -DENABLE_GPU=ON
i'm wildly guessing whatever makefiles they have are outdated...
Did you ever get this to work? This works on my system:
git clone https://github.com/lammps/lammps -b stable
cd lammps/lib/gpu
make -f Makefile.linux_opencl
cd ../../src
make yes-gpu
make mpi
The CMake build system works here too.
I had the same problem, running R9 280x from some mining equipment. I had succeeded with this configuration:
My prereqs:
Motherboard: Gigabyte P55A-UD4
CPU: intel core i5 760
GPU: R9 280x
Drivers
Set the hardware switch on the gpu to position 1 (default position)
Download and install Ubuntu 14.06.3 (make sure that the kernel is Linux 3.19)
Check if the correct kernel is installed with uname -r
Run: apt-get update and upgrade
Run: sudo apt-get install git make cmake gcc g++ gzip libfftw3-dev libtbb-dev mklibs mpich mpi-default-dev openmpi-bin ocl-icd-opencl-dev lib32gcc1 libc6-i386 dkms
From the AMD’s official site (for 280x: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x) download all 4 drivers (fglrx, fglrx-core, fglrx-dev and fglrx-amdcccle) version 15.302 for Ubuntu 14.04. Use the installer notes file to install them properly (in the order specified below (or in the notes file)!)
Run: sudo dpkg -i fglrx-core_15.302-0ubuntu1_amd64_ub_14.01.deb fglrx_15.302-0ubuntu1_amd64_ub_14.01.deb fglrx-dev_15.302-0ubuntu1_amd64_ub_14.01.deb fglrx-amdcccle_15.302-0ubuntu1_amd64_ub_14.01.deb
Check if all drivers are installed properly with: dpkg -l fglrx-core fglrx fglrx-dev fglrx-amdcccle
Reboot machine
Run: clinfo and check if any errors exist (I had problems with fglrx)
LAMMPS
From home directory run: git clone http://github.com/lammps/lammps.git or extract any older version of lammps (from Github or other sites). Currently the version is 19 sep 2019
In the folder ~/lammps/lib/gpu check if Makefile.linux_opencl is ok with your sistem (for 280x i had used the default settings)
Compile the file using “make -f Makefile.linux_opencl” from the lib/gpu folder
Go to LAMMPS's src directory and run from there : make yes-gpu, make yes-user-omp
In the folder src/MAKE enable the cxx98 C++ compiler by deleting the comment (# mark) in the file make_mpi, line: LMP_INC = -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 # -DLAMMPS_CXX98
from folder src/ run: make mpi
Your LAMMPS program should be compiled, the main file is located in the folder lammps/src/lmp_mpi.
When running the program you should run it via this directory or add this directory to PATH (export PATH="$PATH:/lammps/src")
Further work
Although when I wanted to install on newer hardware (ASUS prime b250m-k and intel pentium g4600) I had problems with graphical drivers, but I hadn't resolved the problem.

%1 is not a valid Win32 application.. Sqlite3 in Electron app

I’m trying to get sqlite3 to work in an electron app running on Windows7 and 10. Running the following command, I was able to create electron-v1.7-win32-x64\node_sqlite3.node
cd node_modules/sqlite3 && sudo npm install nan
&& sudo npm run prepublish && sudo node-gyp configure --module_name=node_sqlite3 --module_path=…/lib/binding/electron-v1.7-win32-x64
&& node-gyp rebuild --target=1.6.11 --arch=x64 --target_platform=win32 --dist-url=https://atom.io/download/atom-shell
--module_name=node_sqlite3 --module_path=…/lib/binding/electron-v1.7-win32-x64
However, I get Uncaught Error: %1 is not a valid Win32 application. \\?\c:\folder\ppt_win32-x64\resources\app\node_modules\sqlite3\lib\binding\electron-v1.7-win32-x64\node_sqlite3.node.
My node version is v7.4.0. Electron v1.6.11.
I was trying to compile for windows from mi Mac and I had that problem too, but after some readings I figured out how to proceed, and after all I can say that I got it. Yesterday I spent all day setting up a windows virtual machine in my (other) Linux laptop (I used my linux laptop just because my mac was exhausted in storage...). I was having too a problem with the preloadScript from electron main process in windows, Cant found the script, it was solved too.
Anyway, I think the library node printer from #tojocky is well maintained, in other hand in the electron-builder documentation they say that you should compile in native for natural reasons. Once you will have it, you'll see that it's a cleaner and pragmatic solution ...
This was my entire process, I hope it helps to someone having the same issue:
Get VirtualBox (or Parallels but is not free)
Get iso for W10
Create a VM with this W10 iso, and you should give to this VM some storage (because some dependency that you'll need to compile), I have assigned 60gb to this VM
Once I had that VM running, I just installed in that machine Visual Studio 2017 (with their build-tools included, it's necessary)
And then, I used CMD to make the rest
Install NodeJS (and NPM, but it comes with)
Install node-gyp globally
Install Python 2.7
Clone your project from git (in my case)
npm i (in your project), you should have as npm dependency in your package.json the module electron-builder of course. (here I had some troubles because when node-gyp tried to rebuild printer to generate the binary for windows it was failing, this was because it was imposible to find the python executable, so if you face this problem you should add it like:npm config set python "c:\Python27\python.exe" in my case )
Then try again npm i and Voila!
If you still having error you can rebuild the native dependency as well, run:
node-gyp rebuild --target=YOUR_ELECTRON_TARGET[eg: 1.8.4] --arch=YOUR_ARCH_TARGET[eg: x64 | ia32] --dist-url=https://atom.io/download/atom-shell
After all, you should make the build using electron-builder, in my case my npm script command was build --win --x64 but you can use the --ia32 flag as well for 32bits

How to install wkhtmltopdf patched qt without compiling?

I'm using google cloud instance for host Odoo, somo reports print to pdf ok, but other with custom paperformat get the following error:
"The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display"
I google it, and to solve I need to compile wkhtmltopdf like this:
http://www.grobak.net/id/blog/how-fix-wkhtmltopdf-failed-error-code-6 but this proccess need 3 hs and I'm building a script to install google instances on the run with odoo dependencies.
the .deb package have a dependency broken
Anyone know other solution?
My system configuration is Ubuntu 14.04 and 64 bit. So, i am downloading according to that.
First you have to check your system OS name by
lsb_release -a
Check to see if your Ubuntu Linux operating system architecture is 32-bit or 64-bit, open up a terminal and run the following command below.
file /sbin/init
Download wkhtmltopdf patched with qt using below command
sudo wget -P Downloads https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb
Here, replace "trusty" with your OS name and if 64 bit only then keep "amd64" like that , otherwise change it to "i386" and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
wkhtmltopdf -V
Enjoy!!
After trying many ways I finally made it work.
First I removed all my previous installation by
sudo apt-get remove --purge wkhtmltopdf
sudo apt-get autoremove
Then I opened wkhtmltopdf.org and navigated into their Downloads > Archive. In Archive section I downloaded 0.12.1 .deb version by
wget <copy the link from website for the.deb file and paste it in terminal here>.
sudo dpkg -i <package name>
sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
This is because odoo looks for wkhtmltopdf in /usr/bin directory otherwise gives IOError. I also set my webkit_path parameter in Odoo System Parameters to /usr/bin.
Thats it. Hope this helps
I was facing same issue with wkhtmltopdf 0.12.4
installed new version of wkhtmltopdf 0.12.6-1
follow below commands to install wkhtmltopdf 0.12.6-1
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm #centos specific command

Running JavaFX applications on Redhat 5

From my previous question, I know that JavaFX is not supported in RedHat 5.8 meaning, even when I have Java 8 (jdk1.8.0_05) installed on my Linux, a JAR file created in win7 can't be executed via java -jar helloworld.jar. Does that mean there is NO way to run JavaFX jars on this machine?
The problem with running JavaFX applications on RHEL5 is the version of glib that comes with that OS is not new enough. The trick, then, is to provide a newer version of that library and all of the other libraries that depend on it to the JRE. The next hurdle is that RHEL5 shared library loader won't load those libraries. You have to use a compatible loader. But the JVM has the path to the loader hard-coded in the executable! So you need a separate JVM with a custom loader path patched in. Roughly, the steps to get this working are...
Unpack the following packages from RHEL6:
glib2
libffi
glibc
glibc-common
zlib
gtk2
pango
cairo
pixman
Put all of the shared libraries from those packages in a directory on your RHEL5 system. Let's call it /YOUR-ALIEN-RHEL6-LIBS-PATH.
Unpack another copy of a JRE to, say, /YOUR-ALIEN-JVM-PATH.
Use patchelf to point the JVM executable to the new loader.
./usr/bin/patchelf --set-interpreter /YOUR-ALIEN-RHEL6-LIBS-PATH/lib/amd64/ld-linux-x86-64.so.2 /YOUR-ALIEN-JVM-PATH/jre1.8.0_25/bin/java
Run the application after setting LD_LIBRARY_PATH=/YOUR-ALIEN-RHEL6-LIBS-PATH/lib/amd64:/YOUR-ALIEN-RHEL6-LIBS-PATH/lib/amd64/jli
Although it is not pretty, I have successfully run JavaFX applications on RHEL5 using this method. Having said that, I highly recommend just upgrading your OS if it is even remotely feasible.
Note this builds upon the existing answer from James with more concrete detail
Obtain RPMs from a RedHat 6.x, e.g. http://vault.centos.org/6.2/os/i386/Packages. Copy into directory rpms/
cairo-1.8.8-3.1.el6.i686.rpm
glib2-2.22.5-6.el6.i686.rpm
glibc-2.12-1.47.el6.i686.rpm
glibc-common-2.12-1.47.el6.i686.rpm
gtk2-2.18.9-6.el6.centos.i686.rpm
libffi-3.0.5-3.2.el6.i686.rpm
libXcomposite-0.4.1-2.el6.i686.rpm <== not mentioned in other answer
pango-1.28.1-3.el6_0.centos.5.i686.rpm
pixman-0.18.4-1.el6_0.1.i686.rpm
zlib-1.2.3-27.el6.i686.rpm
libXdamage-1.1.2-1.el6.i686.rpm <== not mentioned in other answer
Extract all the contents from the RPMs into separate directory. Use rpm2cpio and xzcat. xzcat can be installed from these RPMs if necessary [xz, xz-libs, xz-lzma-compat]
mkdir redhat-6u2-libs
cd redhat-6u2-libs/
ls -1 rpms/* | xargs -i{} bash -c "rpm2cpio {} | xzcat | cpio -idmv"
Obtain copy of patchelf. I built from source as couldn't find a Redhat 5 RPM. Only requires dependent RPMs [gcc, gcc-c++, glibc-devel, kernel-headers, libstdc++-devel]
wget https://nixos.org/releases/patchelf/patchelf-0.9/patchelf-0.9.tar.bz2
tar xjf patchelf-0.9.tar.bz2
cd patchelf-0.9
./configure --prefix /tmp/patchelf
make install
Use patchelf to set location of redhat 6u2 loader (aka interpreter)
/tmp/patchelf/bin/patchelf --set-interpreter ~/redhat-6u2-libs/lib/ld-linux.so.2 jdk1.8.0_40/bin/java
Set LD_LIBRARY_PATH, this needs to have both /usr/lib and /lib, otherwise you get a segfault.
export LD_LIBRARY_PATH=/home/user/redhat-6u2-libs/usr/lib:/home/user/redhat-6u2-libs/lib
(Note that any other applications run after LD_LIBRARY_PATH is set other than java which has had its interpreter location corrected will segfault.)
Now run java app...
./jdk1.8.0_40/bin/java -cp etc...
Happy days

Issue when installing Oracle 11G in Ubuntu 12.04 LTS

I am following the instruction to install Oracle 11G in Ubuntu 12.04 LTS (x64) from this web page
Oracle 11g also needs libstdc++5 in 32bits version that is not provided with Ubuntu Pangolin, So I follow these instructions:
mkdir /tmp/libstdc++5
cd /tmp/libstdc++5
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb
sudo dpkg --force-architecture -i libstdc++5_3.3.6-17ubuntu1_i386.deb
sudo mv /usr/lib/libstdc++.so.5* /usr/lib32/
But when executing this command:
sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb
I get this error:
dpkg: error al procesar libstdc++5_3.3.6-17ubuntu1_amd64.deb (--install):
libstdc++5: 1:3.3.6-17ubuntu1 (Multi-Arch: no) is not co-installable with libstdc++5:i386 1:3.3.6-17ubuntu1 (Multi-Arch: no) which is currently installed
Se encontraron errores al procesar:
libstdc++5_3.3.6-17ubuntu1_amd64.deb
How should I deal this installation problem?
There is a few ways of going about this to fix it. I am not using a pentium processor, so i did not worry about that particular package model. Some of the 11gR2 make files are for older versions of the linux kernel, so the gcc compilers are also older.
Lets think it out, Oracle Enterprise is based off Red Hat. The newest version of the kernel, 'out-the-box', on Red Hat 5 was like ~ 2.6 maybe?!. So the files are gonna use a gcc version that was relative to the kernel at the time. Red Hat, unlike its daughter project Fedora, is a fairly slow evolving creature in terms of kernel version.
I have used the libstc++5_3.3.6-25.deb packages (i386 and amd64). That particular package set (3.3.6-17) is for the i686 P6 micro-architecture. Which is the Intel Pentium class of cpu's.
I do not know what you are using 11g on, or for, but the packages I have listed will work if your CPU is not a Pentium. Ive used the enterprise manager, the database, sqlplus, and SQL Developer. I even downloaded Data Modeler and use it. But thats another 5,000 words of details on how to get that puppy running. Back to the question at hand:
If not already done; create the Oracle user, and the dba, oper, and oinstall groups.
Give the /mnt_pt/././ directory to the oracle user and oinstall group with -R privleges
~$ sudo mkdir -p /mnt_pt/app (i.e. opt directory is used frequently or create one)
~$ sudo useradd -g oinstall -G dba -d /mnt_pt/app -s /bin/bash oracle
~$ sudo passwd oracle
~$ sudo chown -R oracle:oinstall /mnt_pt/app
3.1 download the synaptic package manager. $ sudo apt-get install synaptic -y
3.2 download mlocate (should be installed) $ sudo apt-get install mlocate -y
4.1 Go to the User and User Groups app: SystemSettings>users and accounts. Set the oracle account type to administrator.
4.2 Log out of your account, enter the oracle account.
4.3 From the oracle account open Synaptic Package manager. Search for the libstdc++5 (3.3.6-25) files. DO NOT INSTALL THEM!!!!
4.4 Mark both packages from installation. DO NOT INSTALL THEM!!!
4.5 On the Package menu of the Synaptic app, disable the Automatically Install feature.
4.6 Open the File menu of synaptic, and select the Generate Script option and choose the directory you made as the save destination. (In your case /tmp/libstdc++5)
4.7 QUIT without apply changes.
5.1 Manually open the file you saved the script in. Right click the libstdc++5 script, and choose run in terminal.
5.2 This will deliver two .deb packages. Change your forcearch code from 3.3.6-17 to 3.3.6-25
6.1 Find out where the libraries (libstdc++.so.5) are by running the following code:
$ sudo updatedb
$ locate libstdc++.so.5 .......(the .so. stands for libraries)
6.2 Your looking for 5 and 5.07. now run the following lines of code to move it where you want them (file is the parent directory where they are stored)
sudo mv /file/lib/libstdc++.so.5* /usr/lib32/
I installed Fedora 19 just to try and see where I was making errors and if I could get those packages. It was a learning experience. That particular package set is for the i686 P6 micro-architecture. Which is a hard one to find! Fedora 19 is EXTREMELY SHARP but, I set out to use Ubuntu, so that's what I did!! By the way the hardest part comes after that!
Anymore questions let me know!
P.S. if you are using a pentium I advise you to do a second install with fedora, wget the packages from the noarch repository, transfer those to a usb, switch back to Ubuntu, and after installing alien and rpm, from the command-line run the alien command for the packages via the directory they are in (or right click the packages), and then do a dpkg-forcearchitecure.

Resources