使用 config.site 构建 *.pc 时 @libdir@ 不正确?

2023-12-15

我正在 Fedora x86_64 上工作。它用/lib64, /usr/lib64和朋友。我有以下内容*.pc.in file:

$ cat libcryptopp.pc.in
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
...

My config.site有以下内容。它是从 Fedora 复制的config.site at /usr/share/config.site。使用该副本的原因是Fedora x86_64 上供应商库的 config.site.

$ cat /usr/local/share/config.site
...

# Note: This file includes also RHEL/Fedora fix for installing libraries into
# "/lib/lib64" on 64bit systems.

if test -n "$host"; then
    # skip when cross-compiling
    return 0
fi

if test "$prefix" = /usr \
   || { test "$prefix" = NONE && test "$ac_default_prefix" = /usr ; }
then
    test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
    test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
    test "$localstatedir" = '${prefix}/var' && localstatedir=/var

    ARCH=`uname -m`
    for i in x86_64 ppc64 s390x aarch64; do
        if test $ARCH = $i; then
            test libdir='${exec_prefix}/lib64'
            break
        fi
    done
fi

然而,在 Autoconf 处理完我的*.pc.in file:

$ autoreconf --install --force
...
$ ./configure
...

$ cat libcryptopp.pc
prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
...

Notice libdir=${exec_prefix}/lib, 并不是libdir=${exec_prefix}/lib64.

GCC 肯定正在为该包构建 64 位二进制文​​件。我没有添加-mx32 or -m32:

$ gcc -dumpmachine
x86_64-redhat-linux

为什么是错误的lib/正在使用的目录,如何修复它?


The /usr/local/share/config.site是错的。虽然它是从 Fedora 复制的config.site并放置在/usr/local/share,前缀目录错误。前缀测试应该使用/usr/local并不是/usr.

下面是更正后的。

$ cat /usr/local/share/config.site
...

if test -n "$host"; then
    # skip when cross-compiling
    return 0
fi

if test "$prefix" = /usr/local \
   || { test "$prefix" = NONE && test "$ac_default_prefix" = /usr/local ; }
then
    test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
    test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
    test "$localstatedir" = '${prefix}/var' && localstatedir=/var

    ARCH=`uname -m`
    for i in x86_64 ppc64 s390x aarch64; do
        if test $ARCH = $i; then
            test "$libdir" = '${exec_prefix}/lib' && libdir='${exec_prefix}/lib64'
            break
        fi
    done
fi

现在,下一个问题是,为什么 Fedora 的/usr/share/config.site不处理prefix=/usr/local适当地。这是一个悬而未决的问题问题 1510073:对于 *.pc 文件中的“libdir=@libdir@”,Autoconf 不支持 config.site 中的 libdir,已关闭为不是错误.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

使用 config.site 构建 *.pc 时 @libdir@ 不正确? 的相关文章

  • 如何设置Python的USER_SITE;我需要吗?

    我在 OS X 10 10 只需使用 pip 维护 上安装了 Python 我的站点包位于 Library Python 2 7 site packages 苹果的封装在 System Library Frameworks Python f
  • 自定义行为的配置错误

    我创建了一个与 WCF 服务一起使用的自定义行为 以将所有错误记录到应用程序日志中 我做了一个BehaviorExtensionElement对于行为 public ErrorLoggingBehaviorExtensionElement
  • Akka :: 调度程序 [%name%] 未配置,使用默认调度程序

    我创建了以下 application conf akka actor prio dispatcher type Dispatcher mailbox type my package PrioritizedMailbox 当转储配置时 act
  • 如何禁用 GNOME 桌面屏幕锁定? [关闭]

    Closed 这个问题不符合堆栈溢出指南 help closed questions 目前不接受答案 如何阻止 GNOME 桌面在几分钟空闲时间后锁定屏幕 我已经尝试过官方手册了在红帽 https access redhat com doc
  • Spring Boot - YML 配置 - 合并时擦除条目

    我的应用程序有一个基本 YML 配置 在类路径中如下所示 hello world values bar name bar name description bar description foo name foo name descript
  • 如何强制 MSBuild 清理或重建?

    我正在使用脚本中的 MSBuild 来编译我的项目 我注意到它只是进行构建而不是清理 重建 我有以下内容
  • 如何使用 log4j2.xml 配置 hibernate 日志记录?

    我最近切换到 Apache log4j2 但仍然找不到使用 log4j2 xml 配置 hibernate 日志记录的方法 因为我找不到解决此问题的方法 所以我仍然显式使用 log4j properties 文件进行休眠 这不是最好的解决方
  • 如何在 Adob​​e Brackets 中使用 const 和 let 禁用 JSLint ES6 错误?

    我用 Google 搜索并浏览了这个网站 但我只能找到 JSHint 而不是 JSLint 的答案 为了摆脱 use function form of use strict 错误 我添加了 jslint node true 但要禁用使用错误
  • 允许出口流量流向单个 IP 地址

    我正在编写 Kubernetes 集群的网络策略 如何在出口策略中指定要授权的单个 IP 地址 而不是授权整个 IP 地址范围 一个基于的例子官方文档 https kubernetes io docs concepts services n
  • Docker、maven 和 settings.xml

    给出以下简单的 Dockerfile FROM maven 3 6 3 ibmjava 8 alpine Copy maven settings COPY settings xml usr share maven ref COPY pom
  • “config”脚本存在于系统或 Homebrew 目录之外

    运行 brew doctor 并出现一些错误 我按照此链接中的建议设法解决了路径问题 如何修改 Homebrew 的 PATH https stackoverflow com questions 10343834 homebrew want
  • Spring @PostConstruct 依赖于 @Profile

    我想在一个配置类中拥有多个 PostConstruct 带注释的方法 这些方法应该根据 Profile 进行调用 你可以想象这样的代码 Configuration public class SilentaConfiguration priv
  • CMake“无法运行 MSBUILD.exe”命令错误

    当我想为 opencv 3 3 0 创建 Visual Studio 15 2017 make 文件时 它给了我以下错误消息 error in configuration process project files maybe invali
  • 如何在 Spring GCP 中订阅多个 Google PubSub 项目?

    我想在 Spring Boot 应用程序中订阅多个 Google Cloud PubSub 项目 阅读完相关问题后如何使用 Spring Cloud 在一个 Spring Boot 应用程序中连接 配置两个 pubsub gcp 项目 ht
  • 在 Windows 上构建 MLT 框架时出错

    我一直在遵循官方提供的构建指南here http www mltframework org bin view MLT WindowsBuild 我需要 MLT 来创建视频播放器 并且我选择仅安装前 4 个库 如指南中所述 FFmpeg SD
  • 如何在configure.in中测试C++库的可用性?

    我正在 GNU Linux 上开发一个 C 项目 并且正在寻找一种方法来使用 Autotools 测试 IBM Informix 库的存在性和可用性 即编辑configure in 我没有使用 Autotools 的经验 所以基本上我是从该
  • WCF 未在 IIS 6.0 下运行

    尝试让我的 WCF 服务在 IIS 6 下运行 我已经创建了 svc and aspnet isapi dll映射根据 http msdn microsoft com en us library ms752241 aspx http msd
  • jqGrid - 使所有列不可排序?

    除了添加之外 有没有办法使网格上的所有列都不可排序sortable false到每一列 我知道您可以在网格级别设置全局选项 但不知道是否可以在 colModel 级别执行此操作 您可以使用 colmodel 模板来实现此目的 cmTempl
  • Spring Boot 中的外部化配置,多个应用程序在同一容器中运行

    我正在构建多个 Spring Boot 应用程序 这些应用程序将部署在同一个 servlet 容器上 但我很难让 Spring Boot 按照我想要的方式使用外部化配置文件 而不是像框架想要的那样 情况 多个 Spring Boot 应用程
  • Eclipse 包资源管理器缩放?

    我发现将 Eclipse 配置为完全符合您的要求是一项艰巨的工作 因此我不打算自己尝试这样做 我想 缩小 包浏览器侧边栏 你看 我喜欢只在屏幕上显示我的代码 并为项目中的文件显示一小部分 但是 由于这个原因 我永远无法看到当前所在的文件或包

随机推荐