Tag Archives: ProgrammerAH

The SDK of Android webrtc compiled with Ninja – C out / release command reported an error, and the Android NDK processing method could not be found

We have also introduced a lot about webrtc compilation before. Because GN is much faster than gyp, we use GN to generate construction scripts and Ninja to build webrtc.

GN generate Ninja command

Common commands for generating Ninja build files using GN are as follows:

// Generate a debug version of the build file, default configuration
gn gen out/Debug 

// Generate a build file for the release version
gn gen out/Release --args="is_debug=false"

Ninja script

The gyp scripts under skia \ gyp are templates. When sync and gyp is executed, the actual build scripts will be generated dynamically according to these templates. Many module dependencies and conditions can be found in gyp or gypi under this directory.

Use the Ninja – C out/release instruction to compile and report an error

When compiling the webrtc SDK required by Android using the Ninja – C out/release instruction, the following error occurred:
Ninja: entering directory ` Android/release ‘
Ninja: error:’… /…/third ‘_party/android_ ndk/sources/android/cpufeatures/cpu-features.c’, needed by ‘obj/third_ party/android_sdk/cpu_features/cpu-features.o’, missing and no known rule to make it

From this error report, we can know that there is a problem with the file dependency and the required file cannot be found. Sometimes, the project directory changes and dependencies cannot be found. For webrtc, the plug-ins that depend on will be downloaded to the third-party library in webrtc, but the cpu-features.c file cannot be found when opening the third-party library in webrtc, which indicates that webrtc lacks an Android NDK third-party.

Therefore, we need to download the required NDK from the official Android website(https://developer.android.google.cn/ndk/downloads/revision_History) and copy it to third under the webrtc directory_part/android_Inside the NDK. Then run the Ninja – C out/release command again, and the error disappears.

[Solved] Tensorflow-gpu 2.0.0 Run Error: ModuleNotFoundError: No module named ‘tensorflow_core.estimator‘

Operating system: windows10
problem discovery: switch to the tensorflow 2.0.0 installation environment in CMD and enter PIP list. It is found that the corresponding version of tensorflow estimator is 2.5.0, which is inconsistent with the tensorflow version
solution: upgrade or lower the tensorflow estimator to a version consistent with tensorflow
if my version is tensorflow 2.0.0, type CONDA install tensorflow estimator = = 2.0.0 in CMD, and different versions will be seated according to their numbers
as shown in the following figure:

restart the Spyder console and it should be all right

Quartus ii 13.1 compilation does not pass: Error (119013): Current license file does not support the EP4CE10F17C8 device

If the previous line of error is warning (292000): FLEXlm software error: Invalid (inconsistent) license key. The license key and data for the feature… The computer may be 64 bits, and then the cracking program is installed into 32 bits. As long as the broken version in the original license.dat and bin is deleted (preferably permanently deleted) and replaced with 64 bits, the compilation can succeed.

The Linux setroubleshootd process occupies too much memory [How to Solve]

Question:

The server found a problem: the memory is full, and even swap is completely occupied.

Solution:

The system has 8g memory, and the setroubleshootd process occupies 4G. This process is the daemon of SELinux. Just close SELinux.

vi /etc/selinux/config
#Comment out
#SELINUX=enforce
#Comment out
#SELINUXTYPE=targeted 
#Add
SELINUX=disabled 

Modify the configuration file and restart to take effect

The scan of annotations for web application [] could not be completed due to a stackoverflower error. Possible root causes include the low setting of – XSS and illegal circular inheritance dependencies. The class hierarchy being processed is

Solution:
exclude the scanning of the above jar packages in the conf/Catalina. Properties file of tomcat, that is, add the following at the end of tomcat.util.scan.standardjarscanfilter.jarstoskip in the conf/Catalina. Properties file:

bcpkix-*.jar,bcprov-*.jar,fr-*.jar

If you feel that Tomcat starts slowly, it is because you want to scan servlet3.0 annotations in jars. You can increase the speed by adding jars that do not need to be scanned at the end of tomcat.util.scan.standardjarscanfilter.jarstoskip in the conf/Catalina. Properties file, such as:

spring-amqp-*.jar,\

spring-aop-*.jar,\

spring-aspects-*.jar,\

spring-beans-*.jar,\

Record the problem and complete the solution.

Required request body is missing with ContentCachingRequestWrapper

I have an interceptor. Before entering my controller, I read the body of the request. The original request is not repeatable, so I decided to wrap it with contentcacheingrequestwrapper. However, when using @ requestbody to receive parameters, the back-end reported an error. The log is as follows:

Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing

Front end response is

{
    "timestamp": "2021-07-21T11:53:55.637+0000",
    "status": 400,
    "error": "Bad Request",
    "message": "Required request body is missing: public java.lang.String com.example.demo.controller.HelloController.post(com.example.demo.model.PostVO,javax.servlet.http.HttpServletRequest)",
    "path": "/post"
}

It’s wrong. I’ve wrapped it up to be repeatable. After Google, stackoverflow didn’t find a solution, but
I found a description here. It says that contentcacheingrequestwrapper doesn’t overload the getinputstream method of httpservletrequestwrapper. This method will be used when receiving parameters with requestbody, So instead of using the contentcaching requestwrapper, I rewritten the httpservletrequestwrapper myself

[Solved] Conversion not supported for type java.time.LocalDateTime

Conversion not supported for type java.time.LocalDateTime

After the springboot is started, use the postman access path to prompt the conversion not supported for type java.time.localdatetime error. Check the information on the Internet,

In the entity entity class, the localdatetime of the java8 feature requires that the MySQL connector java version should not be lower than 5.1.37, and the early POM file can run normally after being modified to version 5.3.7

<dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>5.3.7</version>
        </dependency>

[CICD] Jenkins Role-based Authorization Strategy

There are many articles on role-based authorization strategy. Here are some special points.

1. Differences among global roles, item roles and node roles

Since it is role-based permission control, Jenkins naturally defines a variety of roles to control permissions from the perspective of roles. Among them,

Global roles: global roles, such as admin, job creator, anonymous, etc. set permissions for all, credentials, agents, tasks, runs, views, SCM, and lockable resources from a global perspective.

Item roles: create an item role, which allows you to grant job and run permissions from the perspective of the item.

Node roles: create a proxy role that allows you to set node related permissions.

The configuration in global roles acts on all items in Jenkins and overrides the configuration in items roles. If you assign the job read permission under global roles to a role, this role allows you to read all jobs, no matter how you set it in project roles.

2. Several points for attention

1) All non admin roles must be given global read permission in a global role.

2) Permission to create job item: the job create permission in global roles must be assigned to this role.

Selecting create item permission only in item roles does not work. Because creating an item is a global function, after creating an item, determine which role management role it belongs to according to the regular expression.

Otherwise, an error will be reported: Lakes permission to run on ‘Jenkins’

Error message

3) If run as user who triggered build is selected in the global security configuration, the agent build permission in the global roles must be assigned to the role.

Access Control for Builds

Node roles have not been used yet, and will be added later.

[Solved] Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service ****** was f

;Castle.MicroKernel.ComponentNotFoundException: No component for supporting the service ****** was found
In Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
In Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
In Castle.Windsor.WindsorContainer.Resolve[T]()
In Abp.Dependency.IocManager.Resolve[T]() location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocManager.cs:line 179
In Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver) location D:\Github\aspnetboilerplate\src\Abp\Dependency\IocResolverExtensions.cs:line 18

Castle.MicroKernel.ComponentNotFoundException
HResult=0x80131500
Message=No component for supporting the service  was found
Source=Castle.Windsor
StackTrace:
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, Arguments arguments, IReleasePolicy policy, Boolean ignoreParentContext)
at Castle.MicroKernel.DefaultKernel.Resolve(Type service, Arguments arguments)
at Castle.Windsor.WindsorContainer.Resolve[T]()
at Abp.Dependency.IocManager.Resolve[T]()
at Abp.Dependency.IocResolverExtensions.ResolveAsDisposable[T](IIocResolver iocResolver)

Solution:
using (var bootstrapper = AbpBootstrapper.Create<OrderServiceModule>())
{
//bootstrapper.IocManager
//    .IocContainer
//    .AddFacility<LoggingFacility>(f => f.UseLog4Net().WithConfig(“log4net.config”));
bootstrapper.IocManager.IocContainer.AddFacility<LoggingFacility>(f => f.UseAbpLog4Net().WithConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, “log4net.config”)));
bootstrapper.Initialize();

}

Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.4.0:repackage failed

When spring boot performs the packaging operation, the following errors are reported:

Execution default of goal org.springframework.boot:spring-boot-maven-plugin:XXXX RELEASE:repackage failed: Unable to find main class

The root cause is that in my project scenario,

Only the – boot sub module as shown in the figure produces executable jar packages. Other modules do not need to be executable. In my root POM, spring boot helps me add the following build strategy by default

< build>
        & lt; plugins>
            & lt; plugin>
                & lt; groupId> org.springframework.boot
                & lt; artifactId> spring-boot-maven-plugin
            & lt;/ plugin>
        & lt;/ plugins>
    & lt;/ build>

The solution is relatively simple, that is, remove the build part of the Spirng boot for all modules and put it into the sub module you need to package. Here is the API service boot module, Other modules do not need to produce executable jars.
————–
copyright notice: This article is an original article of CSDN blogger “@ within” and follows the CC 4.0 by-sa copyright agreement. Please attach the source link of the original text and this notice for reprint
original link: https://blog.csdn.net/qq_ 41264674/article/details/106539584