Project fails to configure in cmake since i updated emsdk to 6.0.6

Aperta
#27,520 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
cmake, wasm
Ambito
build-system

Direzione di ricerca

Inizia con FindThreads.cmake di CMake e le chiamate da third_party/or_tools/cmake/system_deps.cmake:17 e third_party/or_tools/CMakeLists.txt:450. Confronta la configurazione con emsdk 6.0.4 e 6.0.6, con pthreads disabilitato, e verifica se Abseil mostra lo stesso errore. Il lavoro è completato quando i progetti interessati vengono configurati correttamente senza thread abilitati.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello,

My project depends on or_tools third party project, which has those lines in cmake:

set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREAD_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)

The thing is I do not need threads (threads aren't enabled in my root CMakeLists.txt).
So I absolutely have no idea how this was working before. It was just working about 2 years so I didn't ask questions...

But now it fails:

CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:233 (message):
Could NOT find Threads (missing: Threads_FOUND)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.30/Modules/FindPackageHandleStandardArgs.cmake:603 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.30/Modules/FindThreads.cmake:226 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
third_party/or_tools/cmake/system_deps.cmake:17 (find_package)
third_party/or_tools/CMakeLists.txt:450 (include)

Yesterday everything was fine. Since yesterday i just upgraded Python from 3.10.0 to 3.10.11 and emsdk to 6.0.6 (do not remember exactly which version was before, probably 6.0.4).

I doubt Python broke Threads setup in cmake.

Is anything were changed in emsdk regarding Threads setup with disabled pthreads recently ?

P.S. It's not just or_tools. Tried to disable Threads in or_tools:
if (NOT EMSCRIPTEN)
find_package(Threads REQUIRED)
endif()

But it fails in many other projects. For example Abseil also fails with the same error.

Lingua principale
C++
Stelle
27.8k
Fork
3.6k
Merge medio
1g 3h
PR unite (30g)
179

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di emscripten-core/emscripten

Tutte le issue di emscripten-core/emscripten

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.