Não há suporte para pthread C++ no build farm?

Não há suporte para pthread C++ no build farm?

Estou tentando compilar algum código em um build farm. Quando eu o construo em minha máquina de desenvolvimento, tudo corre bem:

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

Mas quando eu o entrego ao build farm, ele não consegue encontrar uma opção de compilador funcional para ativar o suporte a 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"

A caixa de desenvolvimento e o buildfarm estão usando o mesmo sistema operacional base - a única diferença é que o ambiente no buildfarm é mínimo, instalando apenas os pacotes exigidos pelo arquivo de especificações sobre um pequeno conjunto de pacotes do sistema operacional base.

Não consigo pensar em nenhum "pacote ausente" que possa causar esse comportamento. glibc-* estão instalados em ambos.

Responder1

Crédito/fonte real:https://forums.opensuse.org/showthread.php/509781-No-C-Pthread-support-inside-OBSpor Wolfi323

Encontrei um problema semelhante ao tentar configurar [Open MPI 3] com:

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

A resposta de wolfi323 em forums.opensuse implica que oo compilador c++ não foi especificado adequadamente. Deixei as opções do compilador c/c++ em branco:

./configure FC=gfortran

a configuração relatou:

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

e concluído.

Extra

Contexto

CC=gcc CXX=g++

produziu resultados iguais ou semelhantes a deixar ./configure encontrar os compiladores padrão.

informação relacionada