Where can I find the use-package dependecy in Emacs? - emacs

The package is not an internal command of Lisp, but you must install it, so I install things such as straight.el, but where can I find the following?
Error (use-package): Failed to parse package multiple-cursors: use-package: Unrecognized keyword: :general
Error (use-package): Cannot load centaur-tabs
Error (use-package): Failed to parse package company: use-package: Unrecognized keyword: :ghook
Error (use-package): Failed to parse package company-box: use-package: Unrecognized keyword: :ghook
Error (use-package): Failed to parse package yasnippet: use-package: Unrecognized keyword: :ghook
Error (use-package): Failed to parse package magit: use-package: Unrecognized keyword: :general
Error (use-package): Failed to parse package git-commit: use-package: Unrecognized keyword: :ghook
Yes, I tried to search for packages ghook and general, but I was unable to find these.

I found a general solution: :ghook and :general are part of this package:
https://github.com/noctuid/general.el

Related

When I use aapt2 command, find some Error

when I use aapt2 link command, some errors show, like:
app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1041: error: resource anim/design_bottom_sheet_slide_in (aka xxx:anim/design_bottom_sheet_slide_in) not found.
what should I do?

android aosp unrecognized module type "hidl_package_root"

I am trying to build the AOSP automotive car emulator, I am receiving the following error
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=9
TARGET_PRODUCT=aosp_car_x86_64
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=x86_64
TARGET_ARCH_VARIANT=x86_64
TARGET_2ND_ARCH=x86
TARGET_2ND_ARCH_VARIANT=x86_64
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=darwin
HOST_OS_EXTRA=Darwin-18.6.0-x86_64-10.14.5
HOST_BUILD_TYPE=release
BUILD_ID=PD2A.190115.032
OUT_DIR=out
============================================
ninja: no work to do.
[1/1] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: frameworks/hardware/interfaces/Android.bp:1:1: unrecognized module type "hidl_package_root"
error: hardware/nxp/nfc/extns/intf/nxpnfc/1.0/Android.bp:3:1: unrecognized module type "hidl_package_root"
error: hardware/nxp/nfc/extns/intf/nxpnfc/1.0/Android.bp:8:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/displayservice/1.0/Android.bp:3:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/schedulerservice/1.0/Android.bp:3:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/vr/composer/1.0/Android.bp:3:1: unrecognized module type "hidl_interface"
error: hardware/nxp/secure_element/extns/intf/nxpese/1.0/Android.bp:3:1: unrecognized module type "hidl_package_root"
error: hardware/nxp/secure_element/extns/intf/nxpese/1.0/Android.bp:8:1: unrecognized module type "hidl_interface"
error: frameworks/hardware/interfaces/sensorservice/1.0/Android.bp:3:1: unrecognized module type "hidl_interface"
error: hardware/google/interfaces/Android.bp:4:1: unrecognized module type "hidl_package_root"
error: hardware/interfaces/Android.bp:1:1: unrecognized module type "hidl_package_root"
ninja: build stopped: subcommand failed.
14:09:59 soong bootstrap failed with: exit status 1
#### failed to build some targets (17 seconds) ####
I have am executing the command make -j32 after which I am receiving this error. I have created a separate disk image as mentioned in the documentation to build the environment for aosp. I am using the Mac Mojave OS.
I encountered the same problem building AOSP, in my case for the Pixel 2 XL with build number PQ3A.190801.002.
I started from scratch, doing the same as before, but more carefully this time. It worked. I didn't take the time to confirm what exactly went wrong, but I strongly suspect I accidentally downloaded the wrong proprietary drivers from here. Since this is also not a common issue at all, it might be the same cause for you

How to build Swift project on NixOS?

I'm trying to build a simple Swift project on NixOS. Here are the steps to reproduce:
git clone https://github.com/PerfectlySoft/PerfectTemplate.git
cd PerfectTemplate
touch shell.nix
Add shell.nix with following contents:
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "swift-env";
buildInputs = [
openssl
stdenv
binutils
cmake
pkgconfig
curl
glibc
icu
libblocksruntime
libbsd
libedit
libuuid
libxml2
ncurses
sqlite
swig
];
}
Running nix-shell --pure shell.nix and from there swift build, gives me:
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-target’
gcc: error: x86_64-unknown-linux: No such file or directory
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fblocks’
gcc: error: unrecognized command line option ‘-target’
gcc: error: unrecognized command line option ‘-fmodule-name=PerfectCZlib’
gcc: error: unrecognized command line option ‘-fmodules’; did you mean ‘-fmudflap’?
gcc: error: unrecognized command line option ‘-fmodules-cache-path=/home/dmi3y/Dev/Swift/PerfectTemplate/.build/x86_64-unknown-linux/debug/ModuleCache’
gcc: error: unrecognized command line option ‘-fblocks’
I'd appreciate any help with this as I'm pretty much new to nix-shell and NixOS.
EDIT:
I changed my shell.nix to this:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
openssl
clang
swift
];
shellHook = ''
CC=clang
'';
}
However, when I run nix-shell followed by swift build, I'm now getting:
[1/25] Compiling PerfectCZlib zutil.c
[2/25] Compiling PerfectCZlib uncompr.c
[3/25] Compiling PerfectCZlib inftrees.c
[4/25] Compiling PerfectCZlib inflate.c
[5/25] Compiling PerfectCZlib trees.c
[6/25] Compiling PerfectCZlib inffast.c
[7/25] Compiling PerfectCZlib infback.c
[8/25] Compiling PerfectCZlib gzwrite.c
/nix/store/iz6k7x3l14ykr56crz3dizas1rrkcyzr-clang-wrapper-7.1.0/resource-root/include/module.modulemap:24:8: error: redefinition of module '_Builtin_intrinsics'
# warning _FORTIFY_SOURCE requires compiling with optimization (-O)
^
1 warning and 3 errors generated.
1 warning and 3 errors generated.
Full log can be found here.
This is now looks like a missing library dependency or a version conflict.
For the record, here's additional information about my setup that might shed more light:
$ nix-channel --list
home-manager https://github.com/rycee/home-manager/archive/master.tar.gz
nixos https://nixos.org/channels/nixos-19.09
$ nix-shell --run 'swift -version'
Swift version 5.0.2 (swift-5.0.2-RELEASE)
Target: x86_64-unknown-linux-gnub
After searching the web I found a Jira issue for Swift compiler and this specific comment. I decided to exclude clang from dependencies and only include swift, since this combination seem to be conflicting:
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
openssl
swift
];
shellHook = ''
CC=clang
'';
}
And that worked! I was finally able to build the project!
Since your using the --pure option, nothing from your previous environment will be imported into the shell. This includes the swift binary itself. So first I would add swift to the buildInputs.
The error your getting indicates that gcc doesn't even understand the command line options being passed. I don't know anything about Swift, but after seeing that I assumed that it needs a different compiler. Sure enough, after a quick search it looks like it is llvm based. You will thus need to also add clang to your build inputs. In addition, you'll need to use mkShell instead of mkDerivation to setup the proper environment.
The former is a wrapper to the latter that is specifically designed to set up a nix-shell, and ensures the environment is handled correctly. You'll need to pass in the shellHook attribute to override the default c compiler to clang using the CC envvar. The shellHook is a way of running arbitrary commands at the start of the shell.
As a final note, the nix-shell command searches for shell.nix by default so you don't have to pass it as an argument. If shell.nix does not exist, then it will try default.nix. If neither exist, then you'll have to explicitly specify the nix expressions location.
TLDR
to put it all together:
# a more idiomatic way to import nixpkgs, overridable from the cmdline
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "swift-env";
buildInputs = with pkgs; [
# your other inputs
clang
swift
];
shellHook = ''
CC=clang
'';
}
Just to be sure my logic was correct I downloaded the repo and gave it go. Everything compiles and runs successfully.

I used Emacs to compile .sml, and I enctounter the error :"the unclosed string"

I used Emacs to compile .sml, and I encounter the error:
stdIn:1.6-1.10 Error: unclosed string
As seen in this screenshot:
Once I use the command use ***(sml file), it failed.
No matter what I write, it always has the same error.

error compiling my ionic app using ionic package

I am trying to build a release version of my Ionic app for android, using $ ionic package build android --release --profile profile_production, but I get the following error. Can you help please ?
Nota: ionic build android leads to no error.
:compileReleaseJavaWithJavac/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:11: error: package com.google.android.gms.auth does not exist
import com.google.android.gms.auth.GoogleAuthException;
^
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:12: error: package com.google.android.gms.auth does not exist
import com.google.android.gms.auth.GoogleAuthUtil;
^
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:13: error: package com.google.android.gms.auth does not exist
import com.google.android.gms.auth.UserRecoverableAuthException;
^
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:193: error: cannot find symbol
token = GoogleAuthUtil.getToken(context, email, scope);
^
symbol: variable GoogleAuthUtil
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:202: error: cannot find symbol
token = GoogleAuthUtil.getToken(context, email, scope);
^
symbol: variable GoogleAuthUtil
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:205: error: cannot find symbol
GoogleAuthUtil.clearToken(context, token);
^
symbol: variable GoogleAuthUtil
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:210: error: cannot find symbol
token = GoogleAuthUtil.getToken(context, email, scope);
^
symbol: variable GoogleAuthUtil
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:213: error: cannot find symbol
GoogleAuthUtil.clearToken(context, token);
^
symbol: variable GoogleAuthUtil
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:217: error: cannot find symbol
catch (UserRecoverableAuthException userAuthEx) {
^
symbol: class UserRecoverableAuthException
/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/src/nl/xservices/plugins/GooglePlus.java:227: error: cannot find symbol
} catch (GoogleAuthException e) {
^
symbol: class GoogleAuthException
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
10 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 8.201 secs
Error: Error code 1 for command: /home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/gradlew with args: cdvBuildRelease,-b,/home/package/workspace/apps-bc689f0f-142/cordova/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
First time answering here, but this post worked for me, so I think I got to paste it here.
https://github.com/EddyVerbruggen/cordova-plugin-googleplus/issues/252
What i did change was the plugin installed, instead of the cordova normal plugin, i added the git one, like this code:
cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=myreversedclientid