Skip to content

recipes_emscripten: add ngspice #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

proppy
Copy link

@proppy proppy commented May 13, 2023

ported from https://github.com/conda-forge/ngspice-feedstock and https://github.com/hdl/conda-eda/tree/master/sim/ngspice

  • removed unpackaged dependencies (openmp, x, readline)
  • removed platform specific build
  • removed outputs (not sure if they are supported by boa recipe spec)
  • add emscripten prefix to build commands

/cc @stuarteberg (let me know if you don't want to be added there)

@DerThorsten
Copy link
Contributor

hey @stuarteberg greetings =)

@stuarteberg
Copy link

@DerThorsten Small world. :-)

@stuarteberg
Copy link

@proppy I'm happy to remain on the maintainers list, though I may not be of much assistance.

@proppy
Copy link
Author

proppy commented May 13, 2023

curious if https://github.com/conda-forge/pyspice-feedstock/ would need to be repackaged as well, or if it can simply be taken from conda-forge (since it seems that it is pure python and calling out to ngspice-lib thru cffi).

@DerThorsten
Copy link
Contributor

curious if https://github.com/conda-forge/pyspice-feedstock/ would need to be repackaged as well, or if it can simply be taken from conda-forge (since it seems that it is pure python and calling out to ngspice-lib thru cffi).

All noarch pks can be used from conda-forge

@proppy
Copy link
Author

proppy commented May 13, 2023

All noarch pks can be used from conda-forge

It doesn't look like pyspice is currently tagged as noarch: https://anaconda.org/conda-forge/pyspice/files

Does noarch needs to be transitive? While PySpice doesn't build any C code, it does depends on arch specific packages (ngspice-lib and cffi)?

maybe @stuarteberg knows more?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably need to do smth like

# CLI
... -DCMAKE_PROJECT_INCLUDE=overwriteProp.cmake
# overwriteProp.cmake
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS TRUE)
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS "-s SIDE_MODULE=1")
set(CMAKE_STRIP FALSE)  # used by default in pybind11 on .so modules

See emscripten-core/emscripten#15276 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise cmake refused to build shared libraries with emscripten

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise cmake refused to build shared libraries with emscripten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants