Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Conflicting prototypes for function distdriver()

Aperta
#9,575 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
c, cpp, wasm

Direzione di ricerca

Start by comparing the declarations in Code/SimDivPickers/HierarchicalClusterPicker.cpp, Code/ML/Cluster/Murtagh/Clustering.cpp, and nbClustering.cpp with the definition in Code/ML/Cluster/Murtagh/hcdriver.c. Check the Emscripten build linked from the issue and confirm that distdriver_ has one consistent prototype and the signature-mismatch error is gone.

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

Descrizione

bug

Describe the bug
The distdriver() function has conflicting prototypes in the rdkit source code.

To Reproduce
When compiling with emscripten, which strictly checks function prototypes at link-time, we get this error:

wasm-ld: error: function signature mismatch: distdriver_
>>> defined as (i32, i32, i32, i32, i32, i32, i32) -> void in lib/libRDKitSimDivPickers.a(HierarchicalClusterPicker.cpp.o)
>>> defined as (i32, i32, i32, i32, i32, i32, i32) -> i32 in lib/libRDKithc.a(hcdriver.c.o)

See the full build here: https://github.com/fxcoudert/rdkit-pypi/actions/runs/34358743965/job/102490002427?pr=2

We can see that the error is, indeed, correct:

  • in Code/SimDivPickers/HierarchicalClusterPicker.cpp:
extern "C" void distdriver_(long int *n, long int *len, real *dists,
                            long int *toggle, long int *ia, long int *ib,
                            real *crit);
  • same in Code/ML/Cluster/Murtagh/Clustering.cpp and Code/ML/Cluster/Murtagh/nbClustering.cpp
  • however, in the f2c-generated source in Code/ML/Cluster/Murtagh/hcdriver.c, we see:
int distdriver_(n, len, d__, iopt, ia, ib, crit)
integer *n, *len;
doublereal *d__;
integer *iopt, *ia, *ib;
doublereal *crit;

Expected behavior
The prototypes should match.

Screenshots
N/A

Configuration (please complete the following information):

  • RDKit version: latest git
  • OS: ubuntu, cross-compiling for pyodide/emscripten
  • Python version (if relevant): 3.13
  • Are you using conda? no
  • If you are using conda, which channel did you install the rdkit from?
  • If you are not using conda: how did you install the RDKit? building from source
Lingua principale
HTML
Stelle
3.6k
Fork
1.1k
Merge medio
3g 8h
PR unite (30g)
44

Guida per i contributori

Apri la guida per i contributori

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 rdkit/rdkit

Tutte le issue di rdkit/rdkit

Issue simili

Altre issue su Build System

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.