emscripten-core / emscripten-core/emscripten

link error: undefined symbol of the EM_JS in EMSDK 3.1.28

Aperta
#18,436 8 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
C++
Stelle
27.6k
Fork
3.6k
Merge medio
1g 14h
PR unite (30g)
125

Descrizione

I have an EM_JS function defined in individual file and it works just fine before. But recently I upgraded EMSDK to 3.1.28, I received linking error: undefined symbol of the EM_JS function.

I have opened EMCC_DEBUG=1, and got following errors.

```
profiler:DEBUG: block "JS symbol generation" took 0.391 seconds

wasm-ld: error: CMakeFiles/PRJ_dir/Unity/unity_5_cxx.cxx.o: undefined symbol: THE_EM_JS
```

I checked the `__em_js_xxx` symbols existing in another `unity_12_cxx.cxx.o` file. Why the Binaryen failed to handle it?
How can I debug the Binaryen processing or maybe logs?

cc @sbc100 , any ideas?

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia riproducendo il fallimento del linking di EMSDK 3.1.28 con la funzione EM_JS segnalata, quindi esamina l’output di EMCC_DEBUG=1 intorno a «JS symbol generation» e al comando wasm-ld. Confronta i simboli __em_js_xxx in unity_5_cxx.cxx.o e unity_12_cxx.cxx.o; il lavoro è completato quando il simbolo EM_JS viene risolto durante il linking oppure il fallimento viene spiegato.

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

Valutazione

Stack tecnologico
cpp, wasm
Ambito
compilers
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.