Conflicting prototypes for function distdriver()
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
- Ambito
- build-system, compilers
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
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.cppandCode/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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di rdkit/rdkit
-
Clarify mol_from_smiles vs qmol_from_smarts for substruct_count queries in Postgresql cartridge Apertaenhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 65/100
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 50/100
-
Improve depiction of RNA Apertaenhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Issue simili
-
nix: vendorHash is outdated Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
typelevel/sbt-typelevel#929 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
openSUSE/python-rpm-macros#219 ·
-
HMR stops working Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
Qiskit/mcp-servers#221 ·