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

package swig bindings as shared libraries #2308

Open
proppy opened this issue Sep 27, 2022 · 8 comments
Open

package swig bindings as shared libraries #2308

proppy opened this issue Sep 27, 2022 · 8 comments

Comments

@proppy
Copy link
Contributor

proppy commented Sep 27, 2022

In order to be able to import them from .py script, the swig binding needs to be built as shared libraries.

Currently the swig_library helper forces static linking, see:
https://github.com/The-OpenROAD-Project/OpenROAD/blob/master/src/cmake/swig_lib.cmake#L74

@maliberty is the .a actually needed by something else in the build? do we need to build both or can we get away with only building the .so?

/cc @QuantamHD

@proppy proppy changed the title package swig binding as shared libraries package swig bindings as shared libraries Sep 27, 2022
@QuantamHD
Copy link
Collaborator

@proppy I have a demo working for one of them

@maliberty
Copy link
Member

The .a are used to build a statically linked binary which is much simpler for users as it doesn't require setting up an LD_LIBRARY_PATH entry.

@proppy
Copy link
Contributor Author

proppy commented Sep 27, 2022

@maliberty understood, but curious if there a usecase for having the swig bindings openroad_swig_py.a as a static library? Is it meant for users that'd like to link and extend them?

@maliberty
Copy link
Member

openroad -python needs the swig bindings and is statically linked.

@QuantamHD
Copy link
Collaborator

@proppy We need to set up the infrastructure to build and package the so's for pip.

@QuantamHD
Copy link
Collaborator

#2311

@maliberty
Copy link
Member

@macd FYI

@macd
Copy link
Collaborator

macd commented Sep 27, 2022

It would be nice to be able to import into an unmodified Python. I will take a look at @QuantamHD changes (I have PoC wrappers for about 10 of the tools/libs at present). How many versions of Python do you envision building against?

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

No branches or pull requests

4 participants