빌드 팜에서 C++ pthread를 지원하지 않습니까?

빌드 팜에서 C++ pthread를 지원하지 않습니까?

빌드 팜에서 일부 코드를 컴파일하려고 합니다. 개발 머신에서 빌드하면 문제가 해결됩니다.

checking if C compiler and POSIX threads work as is... no
checking if C++ compiler and POSIX threads work as is... no
checking if C compiler and POSIX threads work with -Kthread... no
checking if C compiler and POSIX threads work with -kthread... no
checking if C compiler and POSIX threads work with -pthread... yes
checking if C++ compiler and POSIX threads work with -Kthread... no
checking if C++ compiler and POSIX threads work with -kthread... no
checking if C++ compiler and POSIX threads work with -pthread... yes
checking for pthread_mutexattr_setpshared... yes
checking for pthread_condattr_setpshared... yes
checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes
checking for PTHREAD_MUTEX_ERRORCHECK... yes
checking for working POSIX threads package... yes

그러나 빌드 팜에 제공하면 pthread 지원을 활성화하는 작동하는 컴파일러 옵션을 찾지 못합니다.

[   87s] checking if C compiler and POSIX threads work as is... no
[   87s] checking if C++ compiler and POSIX threads work as is... no
[   87s] checking if C compiler and POSIX threads work with -Kthread... no
[   87s] checking if C compiler and POSIX threads work with -kthread... no
[   87s] checking if C compiler and POSIX threads work with -pthread... yes
[   87s] checking if C++ compiler and POSIX threads work with -Kthread... no
[   87s] checking if C++ compiler and POSIX threads work with -kthread... no
[   87s] checking if C++ compiler and POSIX threads work with -pthread... no
[   87s] checking if C++ compiler and POSIX threads work with -pthreads... no
[   87s] checking if C++ compiler and POSIX threads work with -mt... no
[   87s] checking if C++ compiler and POSIX threads work with -mthreads... no
[   87s] checking if C++ compiler and POSIX threads work with -lpthreads... no
[   87s] checking if C++ compiler and POSIX threads work with -llthread... no
[   87s] checking if C++ compiler and POSIX threads work with -lpthread... no
[   87s] checking for pthread_mutexattr_setpshared... yes
[   87s] checking for pthread_condattr_setpshared... yes
[   87s] checking for PTHREAD_MUTEX_ERRORCHECK_NP... yes
[   87s] checking for PTHREAD_MUTEX_ERRORCHECK... yes
[   87s] checking for working POSIX threads package... no
[   87s] configure: WARNING: "*** POSIX threads are not"
[   87s] configure: WARNING: "*** available on your system "
[   87s] configure: error: "*** Can not continue"

개발 박스와 빌드팜은 동일한 기본 OS를 사용하고 있습니다. 유일한 차이점은 빌드팜의 환경이 매우 최소화되어 작은 기본 OS 패키지 세트 위에 사양 파일에 필요한 패키지만 설치한다는 것입니다.

이 동작을 일으키는 "패키지 누락"은 생각할 수 없습니다. glibc-*는 둘 다에 설치됩니다.

답변1

실제 출처/출처:https://forums.opensuse.org/showthread.php/509781-No-C-Pthread-support-inside-OBS작성자: Wolfi323

다음을 사용하여 [Open MPI 3]을 구성하는 동안 비슷한 문제가 발생했습니다.

./configure CC=gcc CXX=gcc FC=gfortran

forums.opensuse에 대한 Wolfi323의 답변은C++ 컴파일러가 적절하게 지정되지 않았습니다.. c/C++ 컴파일러 옵션을 비워 두었습니다.

./configure FC=gfortran

보고된 구성:

checking if C++ compiler and POSIX threads work with -Kthread... no
checking if C++ compiler and POSIX threads work with -kthread... no
checking if C++ compiler and POSIX threads work with -pthread... yes

완료되었습니다.

추가의

환경

CC=gcc CXX=g++

./configure가 기본 컴파일러를 찾도록 하는 것과 동일/유사한 결과를 얻었습니다.

관련 정보