Keine C ++ - Unterstützung für Pthread in Buildfarm?

583
John Westlund

Ich versuche, etwas Code in einer Build-Farm zu kompilieren. Wenn ich es auf meiner Entwicklungsmaschine baue, geht alles gut:

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 

Wenn ich es jedoch der Buildfarm gebe, kann es keine funktionierende Compileroption finden, um die Unterstützung von pthread zu aktivieren:

[ 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" 

Die Entwicklungsbox und die Buildfarm verwenden dasselbe Basis-Betriebssystem. Der einzige Unterschied besteht darin, dass die Umgebung in der Buildfarm sehr minimal ist. Es werden nur die Pakete installiert, die von der Spezifikationsdatei auf einem kleinen Satz von Basis-Betriebssystempaketen benötigt werden.

Ich kann mir kein "fehlendes Paket" vorstellen, das dieses Verhalten verursachen würde. glibc- * sind auf beiden installiert.

0
"Nur die von der Spezifikation benötigten Pakete installieren" - offensichtlich fehlt in der Spezifikationsdatei ein erforderliches Paket. Ich schlage vor, Pakete anzulegen, die auf der Minimalinstallation nicht vorhanden sind, bis sie funktioniert. Ramhound vor 8 Jahren 0
Versuchen Sie `yum install libxcb-devel` (Ich gehe davon aus, dass yum wegen rpmbuild) Mahmoud Al-Qudsi vor 8 Jahren 0
@ MahmoudAl-Qudsi - Auf keinem Rechner ist libxcb-devel installiert. Das Hinzufügen zum Buildfarmsystem scheint keinen Unterschied zu machen. John Westlund vor 8 Jahren 0
@ Ramhound - Sehr gut könnte es sein. Ich habe Dinge hinzugefügt, aber ich habe alles erschöpft, was sogar aus der Ferne scheint. Gleiches gilt für die Umwelt, die ich als Thema nicht ganz ausgeschlossen habe John Westlund vor 8 Jahren 0
`libglibXXX-dev` installiert? pkg-config? Normalerweise sind Fehler wie dieser mit X-dev verbunden. Suchen Sie nach dem zugehörigen -dev-Paket, das Sie installieren möchten. Liste der installierten Pakete auf Ihrem System und auf dem Buildfarmsystem abrufen, vergleichen? lornix vor 8 Jahren 0

1 Antwort auf die Frage

0
Ares Fowl

Tatsächlicher Kredit / Quelle: https://forums.opensuse.org/showthread.php/509781-No-C-Pthread-support-inside-OBS von wolfi323

Beim Versuch, [Open MPI 3] zu konfigurieren, ist ein ähnliches Problem aufgetreten:

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

Die Antwort von wolfi323 in forums.opensuse impliziert, dass der C ++ - Compiler nicht ausreichend angegeben wurde . Ich habe die C / C ++ - Compiler-Optionen leer gelassen:

./configure FC=gfortran 

die gemeldete Konfiguration:

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 

und abgeschlossen.

Extra

Rahmen

CC=gcc CXX=g++ 

ergab die gleichen / ähnlichen Ergebnisse, als wenn Sie ./configure die Standard-Compiler finden ließen.