当前位置: 首页 > news >正文

win8风格wordpress博客主题微信seo是什么意思

win8风格wordpress博客主题,微信seo是什么意思,山东威海网站开发,java开发网站建设目录 perf 交叉编译交叉编译zlib交叉编译 elfutils交叉编译 perfperf 使用 libconfig 交叉编译openssl 交叉编译libpcap 交叉编译统信、龙芯等平台编译QT交叉编译编译QT源码编译QtCreator 编译ssl编译libsrtp(2.3.0版本)编译libyuvlibopus编译libopenh264编译libusrsctp编译lib…

目录

    • perf 交叉编译
      • 交叉编译zlib
      • 交叉编译 elfutils
      • 交叉编译 perf
      • perf 使用
    • libconfig 交叉编译
    • openssl 交叉编译
    • libpcap 交叉编译
    • 统信、龙芯等平台编译
      • QT交叉编译
        • 编译QT源码
        • 编译QtCreator
      • 编译ssl
      • 编译libsrtp(2.3.0版本)
      • 编译libyuv
      • libopus编译
      • libopenh264编译
      • libusrsctp编译
      • libsioclient编译
      • 编译gdb
      • x264编译
      • ffmpeg编译

perf 交叉编译

perf 源码在linux内核源码里面,目录: /linux-4.19.232/tools/perf ,下载对应linux内核源码即可找到perf源码,使用源码交叉编译。

uname -r	#查询arm内核版本
4.19.232

官网下载对应版本内核源码
https://ftp.sjtu.edu.cn/sites/ftp.kernel.org/pub/linux/kernel/
https://mirror.bjtu.edu.cn/kernel/linux/kernel/

交叉编译工具链配置参考:

export CXX=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++
export CC=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
export AR=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc-ar
export LD=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ld
export AS=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-as
export RANLIB=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ranlib
export ARCH=arm

perf交叉编译
perf基本特性依赖zlib和elfutils,elfutils编译生成的动态库用于符号解析,没有的话perf只能看到热点函数地址。

交叉编译zlib

下载zlib-1.2.3.tar.gz
http://www.zlib.net/

tar xvf zlib-1.2.3.tar.gz
cd zlib-1.2.3/
export CC=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
mkdir build
./configure --prefix=/home/tom/perf/zlib-1.2.3/build
make -j4
make install

交叉编译 elfutils

下载 elfutils-0.170.tar.bz2
https://www.linuxfromscratch.org/blfs/view/8.1/general/elfutils.html

tar xvf elfutils-0.170.tar.bz2
cd elfutils-0.170/
mkdir build
export CC=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
export LDFLAGS=-L/home/tom/perf/zlib-1.2.3/build/lib
export CPPFLAGS=-I/home/tom/perf/zlib-1.2.3/build/include
export LIBS=-lz
./configure --host=arm-linux --prefix=/home/tom/perf/elfutils-0.170/build
make

报错解决:
报错: [-Werror=missing-attributes]
查找报错.c文件所在文件夹里的Makefile文件,删除里面的 -Werror ,例如:

$(if $($(*F)_no_Werror),,-Werror) \		
# 修改为
$(if $($(*F)_no_Werror),,) \

报错: WARNING: TEXTREL found in ‘libdw.so’
找到对应文件夹里的Makefile文件

textrel_found = $(textrel_msg); exit 1
# 修改为
textrel_found = $(textrel_msg)

make install
生成动态库: libasm.so 、libdw.so、 libelf.so。
将build/lib目录生成的相关动态库拷贝到交叉编译工具链的libc下,将build/include目录下头文件拷贝到交叉编译工具链libc同级的include目录下。

交叉编译 perf

tar xvf linux-4.19.232.tar.gz
cd linux-4.19.232/tools/perf/
vim Makefile
# 文件最前面加入
export CXX=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++
export CC=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
export AR=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc-ar
export LD=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ld
export AS=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-as
export RANLIB=/home/tom/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ranlib
# 该命令可能无效
export EXTLIBS =--static -lelf -lebl -L/home/tom/perf/zlib-1.2.3/build/lib -L/home/tom/perf/elfutils-0.170/build/lib
export ARCH=arm
export CROSS_COMPILE=arm-linux-
make

在当前目录生成可执行文件 perf ,拷贝到arm板子上运行, elfutils 编译生成的3个动态库也拷贝过去,使用export设置环境变量。

报错处理:
如果有把告警当成错误的情况,找到Makefile文件里的-Werror并注释掉。
Makefile.config,注释掉 CFLAGS += -Werror 和 CXXFLAGS += -Werror

multiple definition of runtime'; multiple definition of end’;
multiple definition of `start
报错,查看源码发现有两个.c文件(futex-hash.c,futex-lock-pi.c)定义了同名的结构体,把其中一个文件里的名字修改一下即可,比如runtime修改为runtime1.

undefined reference to arm_spe_pmu_default_config undefined reference to arm_spe_recording_init
明明有定义还是报这个错误,不是重要的函数,找到调用的地方注释掉。

arch/arm/tests/regs_load.S:58: Error: operand 1 must be an integer register – mov pc,lr
这个报错涉及到汇编,看不懂不要紧,修改构建文件不编译这个文件。
/linux-4.19.232/tools/perf/arch/arm/tests/Build,注释掉 libperf-y += regs_load.o
/linux-4.19.232/tools/perf/arch/arm64/tests/Build,注释掉 libperf-y += regs_load.o
还会报找不到 perf_regs_load ,在源码里把调用的地方注释掉。

perf看不到函数符号
make时会检测特性: Auto-detecting system features
符号解析由 libelf 功能完成,如果内核检出该功能为off状态,则perf看不到函数符号,只有地址。
上面编译 elfutils 成功后把库文件和头文件拷贝到工具链相应目录,如果检测不到,可能是没有拷贝正确。
内核检测特性是使用test测试文件,查看内核源码perf同级目录的build/feature文件夹,里面有大量测试文件,找到 test-libelf.make.output 文件,这里保存了检测 libelf 功能的日志,根据报错日志排查问题。

perf 使用

# 查看指定进程的热点函数,加选项-g生成热点函数调用栈
./perf top -p 3593
# 生成火焰图
./perf record -F 180 -p 3593 -g -- sleep 120
# 当前目录生成 perf.data 文件

libconfig 交叉编译

cd libconfig-1.7.3/
export CC=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
export CXX=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-g++
export AR=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ar
export LD=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ld
export AS=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-as
export RANLIB=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ranlib
./configure --host=arm-linux-gnueabi --prefix=/opt/libconfig
make -j
sudo make install

openssl 交叉编译

下载
https://www.openssl.org/source/old/1.0.2/index.html
openssl-1.0.2k.tar.gz

tar xvf openssl-1.0.2k.tar.gz
cd openssl-1.0.2k
mkdir install
sudo ./config no-asm shared no-async --prefix=$(pwd)/install --cross-compile-prefix=/opt/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-
make -j
make install

报错:libncurses.so.5: cannot open shared object file

sudo apt install libncurses5

libpcap 交叉编译

libpcap-1.10.1.tar.gz

tar xvf libpcap-1.10.1.tar.gz
cd libpcap-1.10.1
export CC=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-gcc
export CXX=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-g++
export AR=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ar
export LD=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ld
export AS=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-as
export RANLIB=/home/tom/gcc-arm-linux-gnueabi/bin/arm-linux-gnueabihf-ranlib
./configure --host=arm-linux-gnueabi --prefix=/opt/libpcap

报错:configure: error: Neither flex nor lex was found

sudo apt-get install flex

报错:configure: error: Neither bison, byacc, nor yacc was found

sudo apt-get update
sudo apt-get install bison

统信、龙芯等平台编译

QT交叉编译

编译QT源码

下载源码包:https://download.qt.io/archive/qt/
qt-everywhere-src-5.12.8.tar.xz

tar xvf qt-everywhere-src-5.12.8.tar.xz
cd /home/tom/work/src/qt-everywhere-src-5.12.8
#配置
./configure -prefix /home/tom/work/qt5.12.8 \
-confirm-license \
-release \
-opensource \
-v
#编译
make -j4
make install
cd /home/tom/work/qt5.12.8/bin
./qmake --version
编译QtCreator

下载源码包:https://download.qt.io/archive/qtcreator/4.11/4.11.2/
qt-creator-opensource-src-4.11.2.tar.gz

tar xvf qt-creator-opensource-src-4.11.2.tar.gzcd /home/tom/work/src/qt-creator-opensource-src-4.11.2/
export PATH=/home/tom/work/qt5.12.8/bin:$PATH
qmake -version
qmake
make -j4
cd bin
./qtcreator

报错解决

error: alsa/asoundlib.h: No such file or directory  #include <alsa/asoundlib.h>  
sudo apt-get install libasound2-devcast from ‘QTJSC::JSCell*’ to ‘int32_t’ {aka ‘int’} loses precision [-fpermissive]
qtscript/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h
把int32_t改为int64_t就可以了target architecture was not detected as supported by double-conversion
报错的文件为qtbase/src/3rdparty/double-conversion/include/double-conversion/utils.h
在defined(__mips__) ||后添加宏defined(__loongarch__)

编译ssl

git clone https://github.com/openssl/openssl.git
./config --prefix=/home/admin/tom/deplib/openssl/build
make -j4
make install

编译libsrtp(2.3.0版本)

git clone https://github.com/cisco/libsrtp.git
error: cannot guess build type; you must specify one
./configure --build=loongarch64-unknown-linux
make -j4

srtp_create创建失败,不支持部分加密选项,重新编译

./configure --build=loongarch64-unknown-linux --enable-openssl --with-openssl-dir=/home/admin/tom/deplib/openssl/build --prefix=/home/admin/tom/deplib/libsrtp-2.3.0/build

编译libyuv

git clone https://github.com/lemenkov/libyuv.git
cd libyuv/
sudo apt-get install cmake
mkdir arm_libyuv
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/admin/tom/deplib/libyuv/arm_libyuv
make -j4
make install

libopus编译

http://www.opus-codec.org/
下载:opus-1.4.tar.gz

mkdir build
/configure --build=loongarch64-unknown-linux --prefix=/home/admin/tom/deplib/opus-1.4/build
make -j4
make install

libopenh264编译

git clone https://github.com/cisco/openh264.git
make OS=linux

libusrsctp编译

git clone https://github.com/sctplab/usrsctp.git
./bootstrap
mkdir build
./configure --build=loongarch64-unknown-linux --prefix=/home/admin/tom/deplib/usrsctp/build
make -j4
make install

Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR

apt-get install libssl-dev

libsioclient编译

下载:
https://www.cnblogs.com/kn-zheng/p/17749207.html
https://github.com/socketio/socket.io-client-cpp/releases
socket.io-client-cpp-3.0.0.tar.gz

cd socket.io-client-cpp-3.0.0/lib
https://github.com/chriskohlhoff/asio/tags?after=asio-1-18-2
asio-asio-1-18-1.tar.gz
git clone https://github.com/Tencent/rapidjson.git
git clone https://github.com/zaphoyd/websocketpp.git
https://github.com/catchorg/Catch2/tags?after=v2.13.8
Catch2-2.13.4.tar.gz
cd ..
mkdir build
cd build
cmake ..
make -j4

编译gdb

sudo apt install gdb #如果能直接安装,不需要自己编译
wget http://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.gz
cd gdb-12.1
mkdir build
cd build
../configure --prefix=/usr --target=loongarch64-unknown-linux-gnu
make -j4
sudo make install

WARNING: ‘makeinfo’ is missing on your system

sudo apt-get install texinfo

error: GMP is missing or unusable

sudo apt-get install libgmp-dev

x264编译

mkdir build
./configure --enable-static --enable-shared --prefix=/home/admin/tom/deplib_so/x264-snapshot-20191024-2245-stable/build --enable-pic

configure: error: cannot guess build type; you must specify one
修改config.guess,在mips:Linux:: | mips64:Linux::)前添加

loongarch*:Linux:*:*)echo ${UNAME_MACHINE}-unknown-linux-gnuexit ;;

ffmpeg编译

x264和ffmpeg编译过程参考:Qt+ubuntu+ffmpeg环境搭建,ffmpeg库的编译与调用

./configure --build=loongarch64-unknown-linux --enable-shared --enable-nonfree --enable-gpl --enable-pthreads --enable-libx264 --prefix=/home/admin/tom/ffmpeg_so/ffmpeg-4.0.6/build –extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib
http://www.dinnco.com/news/16971.html

相关文章:

  • 大连网站开发多少钱建网站有哪些步骤
  • 韩国做美食的视频网站有哪些企点下载
  • 如何免费建立自己网站外链提交
  • 门户网站制作流程百度推广seo自学
  • 象山县城乡和住房建设局网站新闻发布会稿件
  • 网站开发参考文献期刊免费建网站软件下载
  • 做网站找指数函数求导公式
  • 做网站的电销话术足球世界积分榜
  • 如何自己做网站知识vi设计公司
  • 溧阳有没有做网站的公司搜索引擎优化需要多少钱
  • 沈阳微信网站开发长沙网络推广软件
  • 怎么做创意短视频网站湖南中高风险地区
  • 做ppt软件怎么下载网站seo自动优化软件
  • 网站广告看不到网站seo搜索引擎优化教程
  • 万网查询全部域名做seo如何赚钱
  • 北京市网站公司培训机构不退费最有效方式
  • 网站建设服务怎么样首页排名seo
  • 做图片素材的网站有哪些淘宝运营培训班哪里有
  • 甘肃企业网站建设seo的作用是什么
  • 做机械设计的网站google优化师
  • 抽奖的网站怎么做的seo工作
  • 杭州企业网站设计好公司建站小程序
  • 杭州网站优化荥阳网站优化公司
  • 外贸网站建设szjijie百度秒收录技术
  • DW做的网页用网站打不开怎么接广告推广
  • 南昌英文网站建设哪家竞价托管专业
  • 山西住房城乡建设厅网站百度文库首页
  • 网站加速器推荐如何建立网站服务器
  • 网站功能性介绍新闻稿发布
  • 网站ui升级怎么做如何制作网址链接