2017-11-05 25 views
0

저는 Fedora x86_64에서 일하고 있습니다. /lib64, /usr/lib64 및 친구들을 사용합니다.config.site를 사용하여 * .pc를 빌드 할 때 잘못된 @ libdir @?

$ cat libcryptopp.pc.in 
[email protected]@ 
[email protected][email protected] 
[email protected]@ 
[email protected]@ 
... 

config.site는 다음이있다 : 나는 다음과 같은 *.pc.in 파일이 있습니다. Fedora의 config.site에서 복사했습니다. /usr/share/config.site입니다. 복사본이 config.site for vendor libs on Fedora x86_64 때문에 사용되었습니다. Autoconf에 내 *.pc.in 파일을 처리 한 후 그러나

$ 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 

:

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

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

공지 사항 libdir=${exec_prefix}/lib을, 그리고 libdir=${exec_prefix}/lib64.

GCC는 패키지 용 64 비트 바이너리를 확실히 제작하고 있습니다.

$ gcc -dumpmachine 
x86_64-redhat-linux 

왜 잘못된 lib/ 디렉토리를 사용하는, 그리고 어떻게 그것을 해결합니까 : 나는 -mx32 또는 -m32을 추가하지 않은?

답변

0

/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 

자, 다음 질문은, 왜 페도라의 /usr/share/config.site가 제대로 prefix=/usr/local 처리되지 않습니다. 이는 Issue 1510073 : Autoconf does not honor libdir in config.site for "[email protected]@" in *.pc file의 열린 질문이므로 은 아니며 버그는으로 마감되었습니다.