“-- Checking for module ‘zzip-zlib-config‘ -- No package ‘zzip-zlib-config‘ found“

编译LuisaRender时它的子目录assimp会报一个warning:

"-- Checking for module 'zzip-zlib-config' -- No package 'zzip-zlib-config' found"

网上的答案通常是这样的:

1. chatgpt:

sudo apt update

sudo apt install libzzip-dev zlib1g-dev

export LD_LIBRARY_PATH=/path/to/zzip/lib:/path/to/zlib/lib:$LD_LIBRARY_PATH

cmake -DCMAKE_PREFIX_PATH="/path/to/zzip;/path/to/zlib" /path/to/source

pkg-config --list-all | grep zzip
pkg-config --list-all | grep zlib

2.

c++ - Error in building Assimp in Cmake - Stack Overflow

Please try the latest version of assimp ( 4.1.0 ). The cygwin-cmake file was broken. This shall work with the latest version.

As a workaround diable the tools-support for assimp ( the library will be build, but the qt5-based viewer not ):

cmake CMakelists.txt -DASSIMP_BUILD_ASSIMP_TOOLS=OFF

This will fix your cmake-error, because the tools will not be affected by cmake.

两个都试了然并卵,属于答非所问....

真正的解决思路:

下载源码

git clone --recursive https://github.com/gdraheim/zziplib

cd zziplib

先搜索哪些文件包含这个字段:

grep -r zzip-zlib-config


结果:
docs/64on32.htm:zzip-zlib-config            zzip-zlib-config - ZLib Config (for ZZipLib)
docs/configs.htm:   zzip-zlib-config      zzip-zlib-config - ZLib Config (for ZZipLib)
docs/configs.htm:   The two entries like "zzip-sdl-config" and "zzip-zlib-config"
docs/configs.htm:   $ pkg-config zzip-zlib-config --modversion
docs/configs.htm:   $ pkg-config zzip-zlib-config --libs      
old.configure:ax_create_pkgconfig_requires="zzip-zlib-config"
old.configure.ac:[zzip/zziplib.pc], [zzip-zlib-config],[-lzzip],,[ ])
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
testbuilds.py:        A='"s:zzip-zlib-config:zlib:"'
testbuilds.py:        cmd = "docker exec {testname1} bash -c 'find /usr/local -name zzip-zlib-config.pc -exec rm -v {item} {end}'"
zzip/Makefile.am:pkgconfig_HEADERS= zzip-zlib-config.pc zziplib.pc \
zzip/Makefile.am:zzip-zlib-config.pc : Makefile
zzip/Makefile.am:    @ echo "Name: zzip-zlib-config" >>$@
zzip/Makefile.am:    echo 'Requires: zzip-zlib-config' >>$@
zzip/Makefile.in:pkgconfig_HEADERS = zzip-zlib-config.pc zziplib.pc \
zzip/Makefile.in:zzip-zlib-config.pc : Makefile
zzip/Makefile.in:    @ echo "Name: zzip-zlib-config" >>$@


先编译安装库文件

make

make install

查看下多了哪些内容

git status

启用旧的配置文件好生成 zzip-zlib-config.pc

mv old.configure.ac configure.ac

mv old.configure configure

重新配置一下:

./configure


查看下多了哪些内容 :

git status

zzip下面会多一个MakeFile


cd zzip

make

git status

此时 zzip-zlib-config.pc已经生成

make install

这一步会将zzip-zlib-config.pc拷贝到zzip-zlib-config.pc

保险起见我们在拷贝一份到/usr/lib/x86_64-linux-gnu/pkgconfig/目录下

cp zzip-zlib-config.pc /usr/lib/x86_64-linux-gnu/pkgconfig/


# locate zzip-zlib-config
/usr/lib/x86_64-linux-gnu/pkgconfig/zzip-zlib-config.pc
/usr/local/lib/pkgconfig/zzip-zlib-config.pc


# pkg-config zzip-zlib-config --libs
-lz

搞定!

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值