Category Archives: Error

[Solved] KEIL Compile Error: Error: L6220E: Load region LR_IROM1 size (65552 bytes) exceeds limit (65536 bytes)……

Problem Description:

Stm32f103cbt6 keil compilation error: l6220e: load region LR_ IROM1 size (65552 bytes) exceeds limit (65536 bytes). Region contains 84 bytes of padding and 0 bytes of veneers (total 84 bytes of linker generated content).


resolvent:

Step 1

For 128K chips, modify the irom1 size to 0x20000 (in the red box below). Some versions of Keil will automatically change this location when you change the device; Some versions need to be modified manually

Step 2

Select linker → edit to open link.sct file

Modify the data after LR_IROM1 and ER_IROM1 in the file to 0x20000 (at the red box in the figure below) and save the file.

Step 3

Recompile and solve the problem

Tips

The first and second steps must be completed before compiling and testing. The first step alone may not be successful.

[Solved] UE4 Error: Couldn‘t find file for package *** requested by async loading code. NameToLoad: ***

The dynamic loading of some resources fails when a map is packaged separately. The error log is as follows:

[2022.06.16-09.06.47:875][  0]LogStreaming: Error: Couldn't find file for package /SarajePlayerUI/UI/WBP_SarajePlayerRecommendBar requested by async loading code. NameToLoad: /SarajePlayerUI/UI/WBP_SarajePlayerRecommendBar
[2022.06.16-09.06.47:875][  0]LogStreaming: Error: Found 0 dependent packages...
[2022.06.16-09.06.47:875][  0]PIE: Error: CreateWidget called with a null class.

This problem is very strange. In the self-developed plug-in directory, other resources can be loaded with c++ code, but only the following materials cannot be loaded successfully:

UClass* WidgetClass = LoadClass<UUserWidget>(nullptr, TEXT("WidgetBlueprint'/SarajePlayerUI/UI/WBP_SarajePlayerPreview.WBP_SarajePlayerPreview_C'"));

Solution:

Add the directory where the resource is located in Additional Asset Directories to Cook of packaging settings (screenshot as below):

[Solved] Git Clone Error: error setting certificate verify locations

Description

When using git clone to clone an item on GitHub or gitee, the following error is reported:

error setting certificate verify locations:

CAfile: E:/Git/mingw64/ssl/certs/ca-bundle. crt

CApath: none

analysis

According to the error prompt, there is an error in setting the certificate verification location, that is, the certificate file path is wrong.

When cloning a remote project, the security certificate will be verified first. If the local security certificate file cannot be found, an error will be reported.

This is why this error will not be reported when cloning projects on gitlab, because gitlab is generally built on the intranet and does not need to verify the security certificate.

Path errors often occur because the local Git is installed green, that is, it is directly extracted and used.

In this way, the path of the certificate file is still the path on the original machine. If the path of the new machine is inconsistent, the path error will be caused.

Solution:

For the above analysis, there are two solutions:

  • Modify certificate file path (recommended)
  • Turn off certificate verification

Turning off certificate verification may cause security problems. It is recommended to modify the certificate file path.

Modify certificate file path

There are two ways:

  • Execute the configuration command (recommended)
  • Modify the configuration file

The essence of these two methods is to modify the configuration file. However, some misoperations may occur when modifying the file, and the operation is more cumbersome. It is recommended to execute the configuration command.

Execute configuration command

git config --system http.sslcainfo "Git安装路径/mingw64/ssl/certs/ca-bundle.crt"

Modify profile

Git’s system configuration files are located at: git installation path \etc\gitconfig

Modify the path in the file as shown in the figure to git installation path /mingw64/ssl/certs/ca-bundle.crt save again.

Turn off certificate verification

git config --system http.sslverify false

This method may cause git security problems and is not recommended.

[Solved] Error downloading standard development IDs for MRPC. You will need to manually split your data.

Reason for error reporting

  • The original download link of the MRPC dataset is invalid, the content of TASK2PATH is deleted, and two new links MRPC_TRAIN and MRPC_TEST are replaced.
  • Splitting the dataset requires a mapping file, which cannot be obtained from the original download link.

Solution:

1. comment this code

2. download the file and import it into the MRPC folder: dev_ ids. Tsv

    3. rerun code
''' Script for downloading all GLUE data.
Note: for legal reasons, we are unable to host MRPC.
You can either use the version hosted by the SentEval team, which is already tokenized,
or you can download the original data from (https://download.microsoft.com/download/D/4/6/D46FF87A-F6B9-4252-AA8B-3604ED519838/MSRParaphraseCorpus.msi) and extract the data from it manually.
For Windows users, you can run the .msi file. For Mac and Linux users, consider an external library such as 'cabextract' (see below for an example).
You should then rename and place specific files in a folder (see below for an example).
mkdir MRPC
cabextract MSRParaphraseCorpus.msi -d MRPC
cat MRPC/_2DEC3DBE877E4DB192D17C0256E90F1D | tr -d $'\r' > MRPC/msr_paraphrase_train.txt
cat MRPC/_D7B391F9EAFF4B1B8BCE8F21B20B1B61 | tr -d $'\r' > MRPC/msr_paraphrase_test.txt
rm MRPC/_*
rm MSRParaphraseCorpus.msi
'''

import os
import sys
import shutil
import argparse
import tempfile
import urllib
import io
if sys.version_info >= (3, 0):
    import urllib.request
import zipfile

URLLIB=urllib
if sys.version_info >= (3, 0):
    URLLIB=urllib.request

TASKS = ["CoLA", "SST", "MRPC", "QQP", "STS", "MNLI", "QNLI", "RTE", "WNLI", "diagnostic"]
TASK2PATH = {"CoLA":'https://dl.fbaipublicfiles.com/glue/data/CoLA.zip',
             "SST":'https://dl.fbaipublicfiles.com/glue/data/SST-2.zip',
             "QQP":'https://dl.fbaipublicfiles.com/glue/data/STS-B.zip',
             "STS":'https://dl.fbaipublicfiles.com/glue/data/QQP-clean.zip',
             "MNLI":'https://dl.fbaipublicfiles.com/glue/data/MNLI.zip',
             "QNLI":'https://dl.fbaipublicfiles.com/glue/data/QNLIv2.zip',
             "RTE":'https://dl.fbaipublicfiles.com/glue/data/RTE.zip',
             "WNLI":'https://dl.fbaipublicfiles.com/glue/data/WNLI.zip',
             "diagnostic":'https://dl.fbaipublicfiles.com/glue/data/AX.tsv'}

MRPC_TRAIN = 'https://dl.fbaipublicfiles.com/senteval/senteval_data/msr_paraphrase_train.txt'
MRPC_TEST = 'https://dl.fbaipublicfiles.com/senteval/senteval_data/msr_paraphrase_test.txt'

def download_and_extract(task, data_dir):
    print("Downloading and extracting %s..." % task)
    if task == "MNLI":
        print("\tNote (12/10/20): This script no longer downloads SNLI. You will need to manually download and format the data to use SNLI.")
    data_file = "%s.zip" % task
    URLLIB.urlretrieve(TASK2PATH[task], data_file)
    with zipfile.ZipFile(data_file) as zip_ref:
        zip_ref.extractall(data_dir)
    os.remove(data_file)
    print("\tCompleted!")

def format_mrpc(data_dir, path_to_data):
    print("Processing MRPC...")
    mrpc_dir = os.path.join(data_dir, "MRPC")
    if not os.path.isdir(mrpc_dir):
        os.mkdir(mrpc_dir)
    if path_to_data:
        mrpc_train_file = os.path.join(path_to_data, "msr_paraphrase_train.txt")
        mrpc_test_file = os.path.join(path_to_data, "msr_paraphrase_test.txt")
    else:
        try:
            mrpc_train_file = os.path.join(mrpc_dir, "msr_paraphrase_train.txt")
            mrpc_test_file = os.path.join(mrpc_dir, "msr_paraphrase_test.txt")
            URLLIB.urlretrieve(MRPC_TRAIN, mrpc_train_file)
            URLLIB.urlretrieve(MRPC_TEST, mrpc_test_file)
        except urllib.error.HTTPError:
            print("Error downloading MRPC")
            return
    assert os.path.isfile(mrpc_train_file), "Train data not found at %s" % mrpc_train_file
    assert os.path.isfile(mrpc_test_file), "Test data not found at %s" % mrpc_test_file

    with io.open(mrpc_test_file, encoding='utf-8') as data_fh, \
            io.open(os.path.join(mrpc_dir, "test.tsv"), 'w', encoding='utf-8') as test_fh:
        header = data_fh.readline()
        test_fh.write("index\t#1 ID\t#2 ID\t#1 String\t#2 String\n")
        for idx, row in enumerate(data_fh):
            label, id1, id2, s1, s2 = row.strip().split('\t')
            test_fh.write("%d\t%s\t%s\t%s\t%s\n" % (idx, id1, id2, s1, s2))

    # try:
    #     URLLIB.urlretrieve(TASK2PATH["MRPC"], os.path.join(mrpc_dir, "dev_ids.tsv"))
    # except KeyError or urllib.error.HTTPError:
    #     print("\tError downloading standard development IDs for MRPC. You will need to manually split your data.")
    #     return

    dev_ids = []
    with io.open(os.path.join(mrpc_dir, "dev_ids.tsv"), encoding='utf-8') as ids_fh:
        for row in ids_fh:
            dev_ids.append(row.strip().split('\t'))

    with io.open(mrpc_train_file, encoding='utf-8') as data_fh, \
         io.open(os.path.join(mrpc_dir, "train.tsv"), 'w', encoding='utf-8') as train_fh, \
         io.open(os.path.join(mrpc_dir, "dev.tsv"), 'w', encoding='utf-8') as dev_fh:
        header = data_fh.readline()
        train_fh.write(header)
        dev_fh.write(header)
        for row in data_fh:
            label, id1, id2, s1, s2 = row.strip().split('\t')
            if [id1, id2] in dev_ids:
                dev_fh.write("%s\t%s\t%s\t%s\t%s\n" % (label, id1, id2, s1, s2))
            else:
                train_fh.write("%s\t%s\t%s\t%s\t%s\n" % (label, id1, id2, s1, s2))

    print("\tCompleted!")

def download_diagnostic(data_dir):
    print("Downloading and extracting diagnostic...")
    if not os.path.isdir(os.path.join(data_dir, "diagnostic")):
        os.mkdir(os.path.join(data_dir, "diagnostic"))
    data_file = os.path.join(data_dir, "diagnostic", "diagnostic.tsv")
    URLLIB.urlretrieve(TASK2PATH["diagnostic"], data_file)
    print("\tCompleted!")
    return

def get_tasks(task_names):
    task_names = task_names.split(',')
    if "all" in task_names:
        tasks = TASKS
    else:
        tasks = []
        for task_name in task_names:
            assert task_name in TASKS, "Task %s not found!" % task_name
            tasks.append(task_name)
    return tasks

def main(arguments):
    parser = argparse.ArgumentParser()
    parser.add_argument('-d', '--data_dir', help='directory to save data to', type=str, default='glue_data')
    parser.add_argument('-t', '--tasks', help='tasks to download data for as a comma separated string',
                        type=str, default='all')
    parser.add_argument('--path_to_mrpc', help='path to directory containing extracted MRPC data, msr_paraphrase_train.txt and msr_paraphrase_text.txt',
                        type=str, default='')
    args = parser.parse_args(arguments)

    if not os.path.isdir(args.data_dir):
        os.mkdir(args.data_dir)
    tasks = get_tasks(args.tasks)

    for task in tasks:
        if task == 'MRPC':
            format_mrpc(args.data_dir, args.path_to_mrpc)
        elif task == 'diagnostic':
            download_diagnostic(args.data_dir)
        else:
            download_and_extract(task, args.data_dir)


if __name__ == '__main__':
    sys.exit(main(sys.argv[1:]))

Successfully downloaded


[Solved] ERROR: Unknown host CPU architecture: arm64

ERROR: Unknown host CPU architecture: arm64

When compiling the android ndk project built on Android.mk, I found that the following error occurs on the m1 macbook pro

ERROR: Unknown host CPU architecture: arm64

Need to modify the ndk-build file in the ndk root directory (presumably because the m1 belongs to the arm architecture)

#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
$DIR/build/ndk-build "$@"

Change to

#!/bin/sh
DIR="$(cd "$(dirname "$0")" && pwd)"
arch -x86_64 /bin/bash $DIR/build/ndk-build "$@"

[Solved] Error 4 opening dom ASM/Self in 0x8283c00

Installing Oracle RAC 19.3.0.0 on RHEL 7.9, in the run root.sh script step of the installation GI, it runs normally on the first node, but Error 4 opening dom ASM/Self in 0x8283c00 occurs when running the root.sh script on the second node

Root.sh script executed successfully in node 1

Problem running root.sh script on node 2

Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
  /u01/app/grid/crsdata/momdb2/crsconfig/rootcrs_momdb2_2022-06-19_11-05-10AM.log
2022/06/19 11:05:13 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2022/06/19 11:05:14 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2022/06/19 11:05:14 CLSRSC-363: User ignored prerequisites during installation
2022/06/19 11:05:14 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2022/06/19 11:05:14 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2022/06/19 11:05:14 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2022/06/19 11:05:14 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2022/06/19 11:05:15 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2022/06/19 11:05:16 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2022/06/19 11:05:16 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2022/06/19 11:05:23 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2022/06/19 11:05:23 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2022/06/19 11:05:24 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2022/06/19 11:05:24 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2022/06/19 11:05:35 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2022/06/19 11:06:01 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2022/06/19 11:06:27 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2022/06/19 11:07:02 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2022/06/19 11:07:03 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2022/06/19 11:07:10 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2022/06/19 11:11:03 CLSRSC-343: Successfully started Oracle Clusterware stack
2022/06/19 11:11:03 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
2022/06/19 11:11:11 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2022/06/19 11:11:26 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
***Error 4 opening dom ASM/Self in 0x8283c00
Domain name to open is ASM/Self 
Error 4 opening dom ASM/Self in 0x8283c00***

According to MOS: 19C: While Executing Root.sh on Remote Nodes HIT UNEXPECTED “ERROR 4 OPENING DOM ASM/SELF IN 0x57f7d60” (Doc ID 2571719.1) description, this issue has no effect on the installation and can be ignored

[Solved] .NetCore2.2 Upgrade to 3.1 Error: HTTP Error 500.37 – ANCM Failed to Start Within Startup Time

During the upgrade of an old project from netcore2.2 to 3.1, an Ocelot gateway interface program changes the project file

- <TargetFramework>netcoreapp2.2</TargetFramework> 
+ <TargetFramework>netcoreapp3.1</TargetFramework>

Replace the Services.Addmvc() in your project:

services.AddMvc(options => { options.EnableEndpointRouting = false; });
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);

The method Configure(IApplicationBuilder app, IWebHostEnvironment env) retains the original app.UseMvc();
The compiler passed, but the runtime page reported an error: HTTP Error 500.37 – ANCM Failed to Start Within Startup Time, searched the web for a solution and gave a way to modify the startupTimeLimit value.

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
  <location>
    <system.webServer>
      <aspNetCore xdt:Transform="SetAttributes(startupTimeLimit)" startupTimeLimit="300">
      </aspNetCore>
    </system.webServer>
  </location>
</configuration>

The run result page is directly inaccessible.

 

Solution:

You only need to add a project node
< AspNetCoreHostingModel> OutOfProcess OK.

  <PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
	<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
  </PropertyGroup>

After doing the above, the project runs normally. In addition, the above services.AddMvc() is not the recommended solution.

AddMvc(); comment out app.UseMvc() in the Configure method; then add the following code.

            //app.UseMvc();
            app.UseRouting();//add
            app.UseEndpoints(endpoints =>//add
            {
                endpoints.MapControllers();
            });

 

[Solved] Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.

Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.

This error occurs when executing sql with a collection in the hive on spark engine:
[42000][3] Error while processing statement: FAILED: Execution Error, return code 3 from org.apache.hadoop.hive.ql.exec.spark.SparkTask. Spark job failed during runtime. Please check stacktrace for the root cause.

 

Solution 1: Switching engine using mr
set hive.execution.engine=mr;

Solution 2:
set mapred.map.tasks.speculative.execution=true
set mapred.reduce.tasks.speculative.execution=true

 

[Solved] error: #error “Please include Eigen/Geometry instead of including headers inside the src directory d

error: #error “Please include Eigen/Geometry instead of including headers inside the src directory d

1-error
2-solution
prompt us to \include < Eigen/Geometry>, the header file related to vim should under Panglin/include/pangolin/plot/rang.h
but a new error is reported. There is no such file or directory as eigen/geometry

Solution:

cd /usr/include
sudo ln -sf eigen3/Eigen Eigen
sudo ln -sf eigen3/unsupported unsupported

 

C++ Compile Error: error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]

error: invalid conversion from ‘void*‘ to ‘char*‘ [-fpermissive]

#include <stdio.h>
#include<malloc.h>
#define IN
#define OUT

// Get file size
int FileSize(IN char *file)
{
	FILE *fil;
	fil = fopen(file,"rb");
	fseek(fil,0L,SEEK_END);
	int filesize = ftell(fil);
	fseek(fil,0,0);
	return filesize;
}

// read the file
int ReadFileData(IN char *fileName, OUT char *filedata)
{
	FILE *fpIN;
	int fileSizes = FileSize(fileName);
	fpIN = fopen(fileName,"rb");
	fread(filedata,1,fileSizes,fpIN);
	fclose(fpIN);
}

// write the file
int WriteToFile(char *filedata, int size, OUT char *outFileName)
{
	FILE *fpOUT;
	fpOUT = fopen(outFileName,"w+");
	fwrite(filedata,1,size,fpOUT);
	fclose(fpOUT);
}

int main()
{
	char *origin_file = "test.cpp";
	int orgfilesize = FileSize(origin_file);  // Get file size



	char *file_data=  malloc(orgfilesize);      // Allocate file size memory
    if (file_data == NULL)
        return NULL;
	ReadFileData(origin_file, file_data);     // read the file
	char *outFile = "test.txt";
	WriteToFile(file_data,orgfilesize,outFile);  // write the file

	return 0;
}

The following line of code

char *file_data=  malloc(orgfilesize);

Malloc function is used to allocate space in C language. The return type is void*. Void* indicates a pointer of undetermined type. C. C++ specifies that the void* type can cast any other type of pointer.

The malloc() function actually finds a space of a specified size in memory and ranges the first address of that space to a pointer variable.
Here the pointer variable can be a single pointer or the first address of an array.
It depends on the size of the malloc() function.

Use GCC compilation to directly pass and print out the following results

Original String: testing.

When compiling with g++, an error and warning will appear, as follows

error: invalid conversion from ‘void*’ to ‘char*’ [-fpermissive]
warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

The reason for the error is that c++ is designed to be more secure than C, and it cannot automatically convert void * to other pointer types.

The reason for warning is that the program attempts to convert the string literal (const char [] in c++ and char [] in C language) to char * type,,

char *file_data= (char*) malloc(orgfilesize); 
# The return value of the malloc function is a void*, which is assigned to a variable by adding a forced conversion in front of malloc

Introduction to malloc function
malloc function is often used in C language and c++ to dynamically allocate memory space for variables. Malloc requests the system to allocate memory space of the specified size bytes

function void malloc(int size)

explain:

Malloc requests the system to allocate memory space of the specified size bytes. If the allocation is successful, a pointer to the allocated memory is returned; otherwise, a null pointer is returned
this function is included in the header file: \include < malloc.h> you should import the header file *< malloc.h>  or  < stdlib.h>** when you are using

Note: when the memory is no longer used, the free() function should be used to free the memory block
Common usage

1. When you do not know the definite memory required by a variable

For example, when defining an array, the size of the array is not known until the program is compiled. In this case, you can use the malloc function

int main()
{
	int n;
	scanf("%d",&n);
	int *m=(int *)malloc(sizeof(int)*n);  //Defining a pointer variable that points to n int is equivalent to opening an array of n int elements.
	// If n is very large, more than 1000000, then opening an int array of this size will cause a stack overflow.
	int m[1000000]; //Stack overflow will occur.
	return 0;
}

2. Allocate space for structural variables
define a common variable of structure type. You can dynamically apply for memory without malloc. The CPU will allocate memory for structure variables.

typedef struct
{
    int n;
    char *p;
}node;

int  main()
{
	node a;  //The definition is a structured ordinary variable, you can request memory without using malloc, the CPU will allocate memory for this structured variable
    a.n=4;
    printf("%d",a->n); //can output successfully
    node *b; //defines a structure pointer variable, the CPU will open up memory for this pointer with a size of 4 bytes. But to store the data members of the structure this space is not enough, it will raise a segment error, at this time you must malloc request a structure type size of dynamic memory to store the data members.
    //b=(node *)malloc(sizeof(node));
    printf("%d",sizeof(b)); // use sizeof(b) to see the size of b is 4
    char p[]="abcd";
    printf("%d",b->n);
    (a->p)=p;
    printf("%c",a->p[0]);
    return 0;
}

If malloc is not used to allocate space for structure pointer variable B, warning: ‘B’ is used uninitialized in this function [-wuninitialized]|.

3. When defining a structure, you need to pay attention to allocating space for its members in turn
in normal use, after allocating space for a structure with malloc function, operate on its member variable (pointer type).

For example, when the pointer p=null, it will always report “program received signal SIGSEGV, segmentation fault.”
use malloc function

[Solved] ZYNQ Programs Error: memory write error at 0x100000.APB AP transaction error,DAP status f0000021

Error Messages:

Error “memory write error at 0x100000.apb AP transaction error, DAP status f0000021” occurred during zynq burning

How to Solve:

In the first contact with zynq, when using PL side resources with bit stream hardware data, the following configuration was not selected when burning the software, resulting in the error prompt shown in the title.

when the option shown in the above figure is checked, the bit stream data will be burned first and the FPGA will be configured, as shown in the following figure. Then it runs normally

[Solved] ffmpeg Enable https Error: “ERROR: openssl not found”

ffmpeg can use libssl.so libcrypto.so dynamic library, or libssl.a libcrypto.a static library, the next is to say that obviously the inventory is there, but the compiler still can not find openssl.

Search the ffmpeg source code, and you can find that the prompt is printed in the configure file. The source code is as follows:

enabled openssl           && { use_pkg_config openssl openssl/ssl.h OPENSSL_init_ssl ||
                               check_lib openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
                               use_pkg_config openssl openssl/ssl.h SSL_library_init ||
                               check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto ||
                               check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 ||
                               check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 ||
                               die "ERROR: openssl not found"; }

You can find that ffmpeg is trying OpenSSL one by one. My config The log shows that the last one has been checked, but OpenSSL is still not found.

The reason is that I am using a newer openssl library, the old openssl library uses ‘SSL_library_init’ to initialize, the newer openssl version uses ‘OPENSSL_init_ssl’ to initialize. The new version of openssl uses ‘OPENSSL_init_ssl’ to initialize, and because it does not pass the check, this error is reported here.

Solution:

Add a line to check ‘check_lib openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ‘ and it will pass, above is what I have added.