How to install Intel Simics from the CLI? - simics

The documentation states that one can install from the terminal using a ispm bundle (*.ispm).
However, the ispm executable reports the following:
error: unknown option '--install-bundle'
When running: ispm --install-bundle /path/simics-6-packages-2021-16-linux64.ispm
The installation directory has been set using ispm config install-dir /path/install as per documentation, and I even tried using the --install-dir flag, but I ended up on the same issue.
Am I missing any other non-documented requirements perhaps?

Please try adding the command "packages"
./ispm packages --install-bundle </path/to/simics-6-packages-2021-16-linux64.ispm>
optionally, consider adding the "--trust-unsigned-packages", "--non-interactive" and "--install-dir"
Screenshot of Simcis CLI installation

Related

rust-lld: error: unable to find library -lpq

I'm trying to build a simple web app using Yew, Diesel, and Postgres. When I run
wasm-pack build --target web --out-name wasm --out-dir ./static
I get the following error:
*rust-lld: error: unable to find library -lpq*
I'm on macOS Catalina. I installed Postgres through Homebrew. My libpq.dylib file is at /usr/local/lib.
These are the troubleshooting I've tried already:
Added /usr/local/lib to $PATH. My pg_config shows LIBDIR = /usr/local/lib.
Re-installed Postgres
Updated rustc -nightly
Ideas here are not helpful as well: How can I link a Rust Wasm application with libpq via wasm-pack?
Still it is not resolved. I'd be grateful for any suggestions.
Libpq does not support the wasm-web platform as far as I'm aware therefore there is no way to make this work. As already mentioned in the comments you probably want to use diesel in your backend code, not in the frontend.

Haskell and postgresql - build error "The program pg_config is required but it could not be found."

I am currently learning haskell and just tried using postgresql as a database.
I generated my project with stack (stack new <name> -> stack setup -> stack build)
and then all I changed was adding the dependencies needed to persistent and postgresql to the
package.yaml file (under "dependencies:").
These are:
persistent
persistent-postgresql
persistent-template
This however results in a failing build with the following message:
postgresql-libpq > setup.exe: The program 'pg_config' is required but it could not be found.
postgresql-libpq >
-- While building package postgresql-libpq-0.9.4.2 using:
C:\Users\\AppData\Local\Temp\stack14388\postgresql-libpq-0.9.4.2.stack-work\dist\e626a42b\setup\setup --builddir=.stack-work\dist\e626a42b configure --user --package-db=clear --package-db=global --package-db=C:\sr\snapshots\365a3dde\pkgdb --libdir=C:\sr\snapshots\365a3dde\lib --bindir=C:\sr\snapshots\365a3dde\bin --datadir=C:\sr\snapshots\365a3dde\share --libexecdir=C:\sr\snapshots\365a3dde\libexec --sysconfdir=C:\sr\snapshots\365a3dde\etc --docdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --htmldir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --haddockdir=C:\sr\snapshots\365a3dde\doc\postgresql-libpq-0.9.4.2 --dependency=Cabal=Cabal-2.4.1.0-5rQrtDcYhR2LOcYye7obEr --dependency=Win32=Win32-2.6.1.0 --dependency=base=base-4.12.0.0 --dependency=bytestring=bytestring-0.10.8.2 -f-use-pkg-config --extra-include-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\include --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\lib --extra-lib-dirs=C:\Users\\AppData\Local\Programs\stack\x86_64-windows\msys2-20180531\mingw64\bin --exact-configuration --ghc-option=-fhide-source-paths
Process exited with code: ExitFailure 1
Does anyone know how to resolve this issue and why it even occurs?
Do I have to install postgresql just for being able to run build the project? If so, how would you
do this in production, when the database could basically lie everywhere?
It looks like Haskell is trying to build with the PostgreSQL client shared library libpq.dll and uses pg_config at build time to determine where PostgreSQL is installed and how it was built.
That would mean that you have to install PostgreSQL on the machine where you build Haskell, including the header files, build environment or however it is called by the installer.
For running Haskell you would only need libpq.dll and the dependent shared libraries.
I solved the issue in Ubuntu with the following command:
apt install libpq-dev

Please set python.buildPython to your Python executable path

I try to run code from this repository: https://github.com/chaquo/chaquopy
But I have an error:
'py -3' failed to start (org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'py''). Please set python.buildPython to your Python executable path.
How to fix it?
Chaquopy needs Python to be installed on your build machine in order to build the app. If you don't already have it installed, I recommend the official Windows Python release from python.org, which will put the "py" launcher on your PATH by default.
Or if you have Python installed somewhere else, use the buildPython setting to tell Chaquopy where to find it, as described here.
defaultConfig {
python {
buildPython "C:/Users/UserName/AppData/Local/Programs/Python/Python37/python.exe"
}
}
"buildPython" is the exact path to the python executable.
**First check your path of python IDE if you haven't install it then install it and then copy that path and paste like below in your gradle.buld inside the defaultConfig **
configuration =[
pythonPath : "C:\\Users\\Mazhar Iqbal\\AppData\\Local\\Programs\\Python\\Python310\\python.exe"
]

"${PODS_ROOT}/SwiftLint/swiftlint" causes "Command PhaseScriptExecution failed with a nonzero exit code" with Xcode 10

Updating from Xcode 10.0 beta 2 to Xcode 10.0 beta 3 I now get this error at build time for an iOS project:
sourcekit: [1:connection-event-handler:10499: 0.0000] Connection interruptsourcekit: [1:updateSemanticEditorDelay:10499: 0.0007] disabling semantic editor for 10 secondssourcekit: [1:pingService:10499: 0.0007] pinging servicesourcekitten: connection to SourceKitService restored!
Connection interrupted
Never call this for file that sourcekitd fails.: file File+Cache.swift, line 127
/Users/Coeur/Library/Developer/Xcode/DerivedData/My-App-eloayqptodupvfhbyegtkncnhcpu/Build/Intermediates.noindex/My-App.build/UAT-iphonesimulator/My-App-Debug.build/Script-379156A71D62F5C100574D04.sh: line 2: 34382 Abort trap: 6 "${PODS_ROOT}/SwiftLint/swiftlint"
Command PhaseScriptExecution failed with a nonzero exit code
Swift 4.1
CocoaPods 1.5.3
SwiftLint 0.26.0
Its because of Keychain Access.
Open Keychain Access
Right Click Login Tab
Lock Keychain Login
Right Click Login Tab again
Unlock Keychain Login
and problem solved :)
It seems to be an issue with the SwiftLint 0.26.0 script when using Xcode 10.0 beta 3 or newer.
Cause
It seems related to SwiftLint #2276, itself related to SourceKitten 0.21.0, fixed in SourceKitten 0.21.1 and SwiftLint Master.
Solution
Update to SwiftLint 0.27.0 or newer:
pod 'SwiftLint', '~> 0.27'
(and run pod update SwiftLint)
Some Framework or SDK require Code Signing.
I done code signing and resolved the problem for me.
The pod that I was using was not updated for Xcode 10, so the solution that worked for me was to remove Cocoapods from my project and then installed again (the project was created on Xcode 9).
To remove it, the easiest way is:
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod clean
After that, install the pods again.
I just restarted my Macbook and it worked.
For me adding arm64 architecture in "Build Setting -> valid architectures" resolved the issue.
I had an authentication process (outside of Xcode) running in the background which seemed to be causing this issue for me. I had the keychain dialog up asking for my password. Solution was to restart the machine.
Solution worked for me
I deleted all pod generated files and folders as listed below
Podfile.lock
Pods folder
ProjectName.xcworkspace
Again install pod for this project.
Now open .xcworkspace. Build and run...
It may cause the iOS 13 version. My error is to look at below
Assignment/Pods-Assignment-frameworks.sh: eval: line 131: unexpected EOF while looking for matching `''
Command PhaseScriptExecution failed with a nonzero exit code
Pods -> Targets Support Files -> Pods-AppName -> Pods-AppName-frameworks.sh.
Just commented particular line 131
# eval "$code_sign_cmd"
then clean and run
For me it was an issue with swiftlint. This happens when ever there are serious errors, for example forced unwrapping that swift lint validates.
The actual SwiftLint errors are not shown. Instead this “Command PhaseScriptExecution failed with a nonzero exit code” error is shown. After a bit struggle, I figured out that if your project's directory name or any its hierarchy folders have an apostrophe 's , then actual swiftlint errors or warnings are not shown even after including the runscript for it.
So I just had to rename my folders.
For example:
User -> Dave's Projects -> Git -> ProjectName
should be changed to
User -> Daves Projects -> Git -> ProjectName
This will show you errors or warnings. You can then fix the errors and hopefully the concerned error will also be fixed.
This issue resolves for me when I wait and let the project complete indexing before I do anything!
Restarting Xcode 10.1 fixed it for me; arose while updating Cocoapods ('RxSwift').
If the directory where your project is has blank spaces that problem occurs
To solve that problem add double quotes(""). For example:
"$(SRCROOT)/my framework/path"
In my case, Apple development certificate got expires.
To verify open Keychain -> My certificates -> check developer certificate is valid or not, If certificate is not valid then follow the below steps.
Open your apple developer account and create a new development certificate
Download and add it in your keychain.
Go to profiles and open your existing development profile and add the newly created certificate.
Download the fresh profile and install it.
Hope this helps you too.
I had this issue on my ionic4 app after I have used cocoapods. My issue was that in Targets->Build Phases->Embed Pods Frameworks, I had a wrong path to Pods-MyApp-frameworks.sh script correcting that path solved the issue for me.
Its because most of the time $PODS_ROOT variable doesn't set after installing pods
For me, there seems to be an issue with the swiftlint script. It was initially this, Which was what was in the doc as of the time of installation
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
I resolve the issue by modifying it to
if swiftlint
then
echo "swiftlint installed"
else
echo "warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint"
fi
Not sure, this may be due to my XCode version(10.3)
I resolve the issue by rewrite the .sh file.
Xcode 10 with Swift 3.
1.rename problem.sh file and command+A then command+C.
2.vi *problem*.sh and command+V.
3.:wq! to save the new file.
Then everything will be ok.
If not ok, chmod a+x *problem*.sh and try again.
Only the following helped me.
Delete Podfile.lock
run pod install
Optional - update SwiftLint version
I had a new Macbook and got this error when trying to archive. I forgot to install cocopods in the new machine, so I did, then restarted the computer and restarted Xcode and it worked.
If you're getting
dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.7.dylib
and a red
Command PhaseScriptExecution failed with a nonzero exit code
You should install the specific version of libreadline that you need
brew install readline
brew list --versions readline
brew switch readline 0.0.0

Installing Tensorflow from source

I've been trying to install Tensorflow and get it working over the past few days. Whilst I have managed to install TF and get it working as tested by opening Python in the terminal and typing,
import tensorflow as tf
I have not been successful attempting to retrain Inception v3. I managed to install it from source once by following the instructions laid out here however I am no longer able to do so. When I get to the section 'Create the pip package and install' and go to run bazel build -c opt //tensorflow/tools/pip_package:build_pip_package in the root of my Tensorflow directiory I get the following error.
kieran#kieranUbuntu:~/tensorflow$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted.
INFO: Elapsed time: 3.063s
This is the same error I ran into when I managed to install it and then attempted retaining the classifier following this tutorial. At the section, bazel build tensorflow/examples/image_retraining:retrain.
I just can't figure out what is going wrong and I have been trying for so long.
I'm using this pip version, # Ubuntu/Linux 64-bit, CPU only, Python 2.7
I think you should search before ask, This link can probably solve your issue.
The issue lied in the incorrect use of ./configure. Whilst it was ran I currently have two versions of python on my computer, both of which are stored in different locations, when running ./configure I pointed it to the wrong python version. After rectifying the issue everything worked correctly.