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

Support resolving cross dependencies #473

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

citrus-it
Copy link
Member

@citrus-it citrus-it commented Feb 19, 2024

Now that python 3.12 has been fixed so that it properly detects the
host triple, shared objects include this triple in the filename.
This means that the filename search list for a module called foo is
now:

        pkg.debug.depend.file=64/foo.abi3.so
        pkg.debug.depend.file=64/foo.cpython-312-x86_64-pc-solaris2.so
        pkg.debug.depend.file=64/foo.so
        pkg.debug.depend.file=foo.abi3.so
        pkg.debug.depend.file=foo.cpython-312-x86_64-pc-solaris2.so
        pkg.debug.depend.file=foo.py
        pkg.debug.depend.file=foo.pyc
        pkg.debug.depend.file=foo.pyo
        pkg.debug.depend.file=foo.so
        pkg.debug.depend.file=foo/__init__.py

This obviously doesn't work for aarch64, and we were effectively
getting away with it before because the shared objects were just named
foo.cpython-312.so. With this patch, if the environment contains

        PKG_CROSS_DEPEND=aarch64-unknown-solaris2

the search list is:

        pkg.debug.depend.file=foo.abi3.so
        pkg.debug.depend.file=foo.cpython-312-aarch64-unknown-solaris2.so
        pkg.debug.depend.file=foo.py
        pkg.debug.depend.file=foo.pyc
        pkg.debug.depend.file=foo.pyo
        pkg.debug.depend.file=foo.so
        pkg.debug.depend.file=foo/__init__.py

Note also that the 64/ paths have been removed for cross targets.

@citrus-it citrus-it marked this pull request as ready for review February 19, 2024 20:08
Now that python 3.12 has been fixed so that it properly detects the
host triple, shared objects include this triple in the filename.
This means that the filename search list for a module called `foo` is
now:

        pkg.debug.depend.file=64/foo.abi3.so
        pkg.debug.depend.file=64/foo.cpython-312-x86_64-pc-solaris2.so
        pkg.debug.depend.file=64/foo.so
        pkg.debug.depend.file=foo.abi3.so
        pkg.debug.depend.file=foo.cpython-312-x86_64-pc-solaris2.so
        pkg.debug.depend.file=foo.py
        pkg.debug.depend.file=foo.pyc
        pkg.debug.depend.file=foo.pyo
        pkg.debug.depend.file=foo.so
        pkg.debug.depend.file=foo/__init__.py

This obviously doesn't work for aarch64, and we were effectively
getting away with it before because the shared objects were just named
foo.cpython-312.so. With this patch, if the environment contains

	PKG_CROSS_DEPEND=aarch64-unknown-solaris2

the search list is:

        pkg.debug.depend.file=foo.abi3.so
        pkg.debug.depend.file=foo.cpython-312-aarch64-unknown-solaris2.so
        pkg.debug.depend.file=foo.py
        pkg.debug.depend.file=foo.pyc
        pkg.debug.depend.file=foo.pyo
        pkg.debug.depend.file=foo.so
        pkg.debug.depend.file=foo/__init__.py

Note also that the 64/ paths have been removed.
@hadfl hadfl merged commit e9dba29 into omniosorg:master Feb 20, 2024
1 check passed
@citrus-it citrus-it deleted the crossdep branch February 21, 2024 11:55
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