Fedora x86_64上供应商库的config.site [英] config.site for vendor libs on Fedora x86_64

查看:47
本文介绍了Fedora x86_64上供应商库的config.site的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法在Fedora 26 x86_64上构建一些基于Autotool的库. 64位Fedora将第三方库和供应商库放在/usr/local/lib64中. Ubuntu 17使用/usr/local/lib,因此相同的项目可以正常运行.

I'm having trouble building a few Autotool-based libraries on Fedora 26, x86_64. The 64-bit Fedora puts third party and vendor libraries in /usr/local/lib64. Ubuntu 17 uses /usr/local/lib so the same projects build OK.

我一直在使用--libdir=/usr/local/lib64,但是三个库拒绝使用它.我缺少/usr/localconfig.site,所以我尝试添加一个.网站默认设置上的 Autoconf手册在讨论usr/localconfig.site时,我有点困惑.它说:

I've been using --libdir=/usr/local/lib64 but three libraries resist it. I lack a config.site for /usr/local so I am trying to add one. The Autoconf manual on Site Defaults is a tad bit confusing to me when it discusses usr/local's config.site. It says:

[讨论confg.site/usr版本] ...

[discussion of /usr version of confg.site] ...

同样,在默认情况下构建64位库的平台上, 然后安装在/usr/local/lib64而不是/usr/local/lib中,它是 适合安装/usr/local/share/config.site:

Likewise, on platforms where 64-bit libraries are built by default, then installed in /usr/local/lib64 instead of /usr/local/lib, it is appropriate to install /usr/local/share/config.site:

# /usr/local/share/config.site for platforms that prefer
# the directory /usr/local/lib64 over /usr/local/lib.
test "$libdir" = '${exec_prefix}/lib' && libdir='${exec_prefix}/lib64'

我遇到的问题是,上述修改是否附加到了config.site/usr/local版本中?还是取代现有的代码块?还是我可以不经修改就将其复制到其所属位置?

The problem I am having is, is the modification above appended to the /usr/local version of config.site? Or does it replace an existing block of code? Or can I just copy it where it belongs without modification?

或者,也许/usr/local/share/config.site的猫是什么样的?

Or maybe, what does a cat of /usr/local/share/config.site look like?

这是/usrconfig.site.我不清楚它是否需要修改或如何修改.

Here is the config.site for /usr. Its not clear to me if it needs modification or how to modify it.

$ cat /usr/share/config.site
# This is the config.site file to satisfy FHS defaults when installing below
# /usr.
#
# You may override this file by your config.site using the CONFIG_SITE env
# variable.
#
# 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}/lib' && libdir='${exec_prefix}/lib64'
            break
        fi
    done
fi

推荐答案

config.site,用于Fedora x86_64上的供应商库

config.site for vendor libs on Fedora x86_64

这回答了/usr/local/share/config.site对于config.site是什么样的问题.它不能回答为什么--libdir=/usr/local/lib64未能设置目录的问题,如@John Bollinger在评论中指出的那样.

This answers the question of what config.site looks like for /usr/local/share/config.site. It does not answer the question of why --libdir=/usr/local/lib64 fails to set the directory, as @John Bollinger pointed out in the comments.

/usr/local/share/config.site是错误的.尽管它是从Fedora的config.site复制并放置在/usr/local/share中的,但前缀目录是错误的.前缀测试应使用/usr/local而不是/usr.

The /usr/local/share/config.site is wrong. Though it was copied from Fedora's config.site and placed in /usr/local/share, the prefix directories are wrong. The prefix test should use /usr/local and not /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

但是我不确定这些是否正确.它们没有被修改.

I'm not sure if these are correct, however. They were not modified.

test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
test "$sharedstatedir" = '${prefix}/com' && sharedstatedir=/var
test "$localstatedir" = '${prefix}/var' && localstatedir=/var

现在,下一个问题是,为什么Fedora的/usr/share/config.site无法正确处理prefix=/usr/local.在问题1510073中,这是一个悬而未决的问题:Autoconf不认可config.site中的libdir为"libdir" = .lib文件中的= @ libdir @" ,已作为 NOT A BUG 关闭.

Now, the next question is, why Fedora's /usr/share/config.site is not handling prefix=/usr/local properly. That's an open question at Issue 1510073 : Autoconf does not honor libdir in config.site for "libdir=@libdir@" in *.pc file, which has been closed as NOT A BUG.

这篇关于Fedora x86_64上供应商库的config.site的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆