Skip to content
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

sim: add ngspice #271

Merged
merged 1 commit into from
Jan 16, 2023
Merged

sim: add ngspice #271

merged 1 commit into from
Jan 16, 2023

Conversation

proppy
Copy link
Contributor

@proppy proppy commented Dec 24, 2022

This a simpler version than https://github.com/conda-forge/ngspice-feedstock maintained @stuarteberg with minimal dependencies and no gui (see #193 and #250 for rational).

This will allow us to build an installer for the sky130/gf180 analog flow (per #245).

Fixes #49.

@proppy
Copy link
Contributor Author

proppy commented Dec 24, 2022

Warning audit from https://github.com/hdl/conda-eda/actions/runs/3769993252/jobs/6409553706

022-12-24T05:26:12.2894616Z Warning: rpath /home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib is outside prefix /home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ (removing it)

must be due to build dependencies (c, cxx compilers?)

2022-12-24T05:26:12.2895578Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libmenu.a)
2022-12-24T05:26:12.2896243Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libhistory.a)
2022-12-24T05:26:12.2896895Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libformw.a)
2022-12-24T05:26:12.2897530Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libopcodes.a)
2022-12-24T05:26:12.2898217Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libreadline.a)
2022-12-24T05:26:12.2898844Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libncursesw.a)
2022-12-24T05:26:12.2899529Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libpanelw.a)
2022-12-24T05:26:12.2900150Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libtinfo.a)
2022-12-24T05:26:12.2900785Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libctf-nobfd.a)
2022-12-24T05:26:12.2901420Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libctf.a)
2022-12-24T05:26:12.2902050Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libbfd.a)
2022-12-24T05:26:12.2902734Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/gcc/x86_64-conda-linux-gnu/11.2.0/libiberty.a)
2022-12-24T05:26:12.2903461Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/gcc/x86_64-conda-linux-gnu/11.2.0/libgcov.a)
2022-12-24T05:26:12.2904172Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/gcc/x86_64-conda-linux-gnu/11.2.0/libgcc.a)
2022-12-24T05:26:12.2904886Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/gcc/x86_64-conda-linux-gnu/11.2.0/libgcc_eh.a)
2022-12-24T05:26:12.2905616Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/5.34.0/x86_64-linux-thread-multi/CORE/libperl.a)
2022-12-24T05:26:12.2906351Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib64/librpcsvc.a)
2022-12-24T05:26:12.2907110Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib64/libbsd-compat.a)
2022-12-24T05:26:12.2907879Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib64/libpthread_nonshared.a)
2022-12-24T05:26:12.2908637Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/sysroot/usr/lib64/libc_nonshared.a)
2022-12-24T05:26:12.2909358Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/lib64/libstdc++.a)
2022-12-24T05:26:12.2910047Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/lib64/libsupc++.a)
2022-12-24T05:26:12.2910750Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/x86_64-conda-linux-gnu/lib64/libstdc++fs.a)

harmless per #165 (comment)

@mithro @msaligane @ajelinski does it look good to you?

Copy link
Contributor

@ajelinski ajelinski left a comment

Choose a reason for hiding this comment

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

LGTM after fixing these minor issues.

@ajelinski
Copy link
Contributor

022-12-24T05:26:12.2894616Z Warning: rpath /home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib is outside prefix /home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_ (removing it)

Perhaps Conda prefers the built executable's RPATH to be already set to a path inside $PREFIX (_h_env_...) but I can see it's set properly and especially that only c/cxx libraries are used I think it's nothing to really worry about:

$ readelf --dynamic bin/ngspice | egrep '(NEEDED|RPATH)'
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libstdc++.so.6]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib]
2022-12-24T05:26:12.2895578Z WARNING :: Failed to get_static_lib_exports(/home/runner/work/conda-eda/conda-eda/workdir/conda-env/conda-bld/ngspice_1671859346053/_build_env/lib/libmenu.a)
(...)

harmless per #165 (comment)

I have no idea why conda-build issues such warnings especially that all of them are in the build environment. I don't think these can cause any problems.

@ajelinski
Copy link
Contributor

Oh, also it'd be ideal to have even the simplest functional test run after running ngspice --version in the test phase unless it's very difficult to do so.

@proppy
Copy link
Contributor Author

proppy commented Jan 12, 2023

PTAL

@proppy proppy requested a review from ajelinski January 15, 2023 04:59
Copy link
Contributor

@ajelinski ajelinski left a comment

Choose a reason for hiding this comment

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

LGTM, could you please squash the commits before merging?
Unfortunately squash+merge is disabled for this repository.

@proppy
Copy link
Contributor Author

proppy commented Jan 16, 2023

LGTM, could you please squash the commits before merging?

rebased

@proppy proppy merged commit 928c25c into hdl:master Jan 16, 2023
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.

Add ngspice package
2 participants