llvmlite icon indicating copy to clipboard operation
llvmlite copied to clipboard

Add support for importing symbols from static library

Open testhound opened this issue 3 years ago • 12 comments

This pull request adds support for importing symbols from a static library into the execution engine.

testhound avatar Feb 03 '23 06:02 testhound

@gmarkall I made fixes/updates for all your comments.

testhound avatar Feb 06 '23 17:02 testhound

cc1: fatal error: /home/vsts/miniconda3/envs/cienv/lib/python3.8/site-packages/llvmlite/tests/a.c: No such file or directory

see error log at https://dev.azure.com/numba/numba/_build/results?buildId=14315&view=logs&j=fd18f1e2-1ae3-5f4d-9319-996752c1f67c&t=85c24074-1b78-5ee7-1f6d-6e0b210c5911&l=27

You'll need to add the .c files as package data. They are not being installed.

sklam avatar Feb 14 '23 00:02 sklam

@sklam and @gmarkall all errors resolved.

testhound avatar Feb 14 '23 04:02 testhound

@gmarkall all feedback incorporated.

testhound avatar Feb 14 '23 21:02 testhound

@gmarkall ready for review.

testhound avatar Feb 28 '23 02:02 testhound

@apmasell all your feedback has been incorporated and the PR is ready for further review.

testhound avatar Apr 21 '23 03:04 testhound

@apmasell and @gmarkall I have updated the code. I am skipping the test on Windows and provided a detailed comment at the top of the test class. There is a error on macOS/Python 3.9 that appears related to a missing llvm-ar. All other versions of macOS succeed.

testhound avatar May 10 '23 22:05 testhound

Note for https://github.com/numba/llvmlite/pull/902/commits/269cd6d713d00be8cf77d856d8c967029bf3e2ea The Anaconda build of Python 3.9 is using a hardcoded path for llvm-ar from the build environment. I tested it on conda-forge build of Python 3.9 and it works without problem.

sklam avatar May 11 '23 20:05 sklam

@apmasell and @gmarkall ready for review.

testhound avatar May 11 '23 20:05 testhound

If there's a way to get the binary to load on Windows using a non-distutils tool chain, that should be done rather than skipping the test.

apmasell avatar May 15 '23 14:05 apmasell

If there's a way to get the binary to load on Windows using a non-distutils tool chain, that should be done rather than skipping the test.

Are there other

If there's a way to get the binary to load on Windows using a non-distutils tool chain, that should be done rather than skipping the test.

@apmasell unless you are aware of another solution it appears I will need to invoke the visual studio c++ compiler directly from the Python code for Windows plaltforms.

testhound avatar May 15 '23 17:05 testhound

@apmasell, @sklam and @gmarkall Windows error resolved and ready for review.

testhound avatar Jun 02 '23 18:06 testhound