编译cre2的一些问题

本文介绍了在Linux环境下遇到的pkg-config相关编译错误,如`syntaxerrornearunexpectedtoken`,并提供了如何检查和安装pkg-config、设置PKG_CONFIG_PATH、全局寻找re2.pc以及解决makeinfo命令未找到的问题,包括安装texinfo的解决方案。
摘要由CSDN通过智能技术生成
1、syntax error near unexpected token 0.29…/configure: line 13575: PKG_PREREQ(0.2)’

PKG_PREREQ宏定义是引用 pkg.m4 作为 pkg-config 软件包的一部分提供的,因此

  • 首先要检查的是 pkg-config 是否已安装
    pkg-config --version

  • 没有的话安装一下,然后查找pkg.m4的位置
    find /usr -name "pkg.m4"

  • 配置 “aclocal 的安装路径” 到环境变量 ACLOCAL_PATH:
    export ACLOCAL_PATH=/usr/share/aclocal

2、Makefile.am:16: error: ‘nodist_pkgconfig_DATA’ is used but ‘pkgconfigdir’ is undefined

设置路径 参考

export ACLOCAL_PATH=/usr/local/share/aclocal:/usr/share/aclocal:/share/aclocal

export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig
3、Package re2 was not found in the pkg-config search path.Perhaps you should add the directory containing `re2.pc’

全局寻找re2.pc

find / -name "re2.pc"

找到的路径为
/usr/lib/x86_64-linux-gnu/pkgconfig
将找到的路径加到PKG_CONFIG_PATH中

PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig
4、make时报错:/hopper/examples/re2/cre2/meta/autotools/missing: line 81: makeinfo: command not found

参考

sudo apt-get install texinfo
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rockict_z

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值