gstreamer compilation error handling record

server certificate verification failed

e0005055@ibudev20:~/wk/gst_scr$ git clone https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git
Cloning into 'gst-plugins-base'...
fatal: unable to access 'https://gitlab.freedesktop.org/gstreamer/gst-plugins-base.git/': server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

ca certificate verification failed. http ssl verification needs to be turned off because it is a self signed certificate:

 git config --global http.sslverify false

Compile syntax error

$git clone  https://gitlab.freedesktop.org/gstreamer/gst-build.git
$cd gst-build
$meson builddir
The Meson build system
Version: 0.45.1
Source dir: /home/e0005055/wk/gst_scr/gst-build
Build dir: /home/e0005055/wk/gst_scr/gst-build/builddir
Build type: native build

meson.build:87:15: ERROR: lexer
  ['gstreamer', {'build-hotdoc': true}],
               ^
A full log can be found at /home/e0005055/wk/gst_scr/gst-build/builddir/meson-logs/meson-log.txt

You can't see the problem from the location.

Try compiling the source code directly

$git clone  https://gitlab.freedesktop.org/gstreamer/gstreamer.git
... ...
$cd gstreamer
$meson build
Build dir: /home/e0005055/wk/gst_scr/gstreamer/build
Build type: native build
meson.build:636:9: ERROR: lexer
  summary({'Plugins':plugin_names}, list_sep: ', ')
         ^
A full log can be found at /home/e0005055/wk/gst_scr/gstreamer/build/meson-logs/meson-log.txt

There are also grammatical errors. Reset meson

pip3 install --user meson

The results are the same.

Try reinstalling from pip3

$sudo apt remove meson
Reading package lists... Done
$ meson builddir
bash: /usr/bin/meson: No such file or directory
$pip3 install meson
Requirement already satisfied: meson in /usr/local/lib/python3.6/dist-packages
$pip3 uninstall meson
 ...
$pip3 install meson
Collecting meson
 ...

Run again:

$meson builddir
bash: /usr/bin/meson: No such file or directory

File not found, check the installation location

$whereis meson
meson: /usr/local/bin/meson

Create a soft connection directly to / usr/bin/meson:

$ln -s /usr/local/bin/meson /usr/bin/meson
$meson --version
0.59.2

Run again successfully and start downloading and compiling.

$meson builddir
The Meson build system
...

In some environments, there are two versions of meson at the same time. By default, the higher version is used, but the lower version is still used during compilation. Therefore, it is necessary to uninstall the lower version directly:

$ meson --version
0.59.2
$ whereis meson
meson: /usr/share/meson /home/e0005055/.local/bin/meson /home/e0005055/usr_env/meson.build
$ /usr/bin/meson --version
0.45.1
$ sudo apt remove meson
...

git code download error

Cloning into 'gstreamer'...
remote: Enumerating objects: 789223, done.
remote: Counting objects: 100% (48109/48109), done.
remote: Compressing objects: 100% (13188/13188), done.
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

meson.build:134:4: ERROR: Git command failed: ['/usr/bin/git', 'clone', 'https://gitlab.freedesktop.org/gstreamer/gstreamer.git', 'gstreamer']

Modify cache size:

$ git config --global http.postBuffer 524288000
$ git config --global core.compression -1   
$ git config --global http.maxRequestBuffer 100M
$ vim ~/.bashrc
export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

No, try again:

$ git config --global http.postBuffer 524288000
$ git config --global core.compression -1   
$ git config --global http.maxRequestBuffer 100M
$ git config --global http.lowSpeedLimit 0
$ git config --global http.lowSpeedTime 999999

When switching the version to run, there is a warning that the function symbol cannot be found

Switch the code version to 1.18.5. After compilation, the program runs and GST cannot be found_ type_ mark_ as_ plugin_ api,gst_ aggregator_ update_ Warning for functions such as segment.

Check the update of the corresponding source file

The first doubt is that the api of this function has changed in the recent version, resulting in failure.
git diff corresponds to the version, and no api level changes are found.

View function definitions and compilation

Check the source code. The function is defined and compiled to this part of the code normally.

Check whether the corresponding so file contains the object

Read the elf content. There is a corresponding function definition in the so file

	Line 4817:   2286: 00000000000cc1e0    56 FUNC    GLOBAL DEFAULT   12 gst_type_mark_as_plugin_a
	Line 9647:   4763: 00000000000cc1e0    56 FUNC    GLOBAL DEFAULT   12 gst_type_mark_as_plugin_a

Set runtime path

 1928  export LD_LIBRARY_PATH=/wk/gst-build/gst185_xz/gst-build/build_esw/out/lib/x86_64-linux-gnu/gstreamer-1.0/

No effect

Move library file path

Put all libraries in the gstreamer-1.0 / folder

mv out/lib/x86_64-linux-gnu/libgst* out/lib/x86_64-linux-gnu/gstreamer-1.0/

invalid

Compare configuration differences

It is suspected that some modules are caused by differences in some configuration items. Gradually compare the differences between the configuration files of each module and the latest version of the configuration files, and synchronize them. The problem still exists after compilation.

Analyze environmental differences

Recompile and run version 1.18.5 on the virtual machine. There is no problem. It is confirmed that the computer environment is different, and some applications and library files cross.
Search GST on the server again_ type_ mark_ as_ plugin_ API and other corresponding libraries, multiple records are found.
After deleting the corresponding record, an error is reported that the library file cannot be found. Confirm that it is caused by library file cross reference.
Reset LD_ LIBRARY_ After the path is exported, the warning disappears.

Generate publish file

Recompile and generate publishing file successfully:

Tags: GStreamer

Posted on Fri, 29 Oct 2021 22:59:53 -0400 by valen53