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
static compilation option? #82
Comments
Hi @shakfu This is something that I'd like to see as well---among other things, it is major PITA to deal with weird cluster environments when you have dynamic libraries. However, there are currently two major roadblocks:
For this reason, we provide two small runtime libraries with minimal dependencies that can be copied together with the executable and distributed accordingly. I'll keep this one open for now—if anybody has an idea how to fix these issues, we will be happy to consider them. |
I would like this feature too, if static linkable support. The build binary could deploy or share more easier. liudonghua@DESKTOP-DELL:~/codon$ cat fib.py
def fib(n):
a, b = 0, 1
while a < n:
print(a, end=' ')
a, b = b, a+b
print()
fib(1000)
liudonghua@DESKTOP-DELL:~/codon$
liudonghua@DESKTOP-DELL:~/codon$ codon build -release fib.py
liudonghua@DESKTOP-DELL:~/codon$
liudonghua@DESKTOP-DELL:~/codon$ ldd fib
linux-vdso.so.1 (0x00007ffc321eb000)
libcodonrt.so => /home/liudonghua/.codon/lib/codon/libcodonrt.so (0x00007fd26297e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fd262742000)
libomp.so => /home/liudonghua/.codon/lib/codon/libomp.so (0x00007fd262658000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fd262653000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fd26264e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd262647000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fd262560000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fd262540000)
/lib64/ld-linux-x86-64.so.2 (0x00007fd262e60000)
liudonghua@DESKTOP-DELL:~/codon$ |
I would like this feature too. |
After I successfully compiled a test python program using
codon build <demo.py>
, on macOS Monterey (intel), I checked the dependencies as per the following:The two
@rpath
dependencies,libcodonrt.dylib
andlibomp.dylib
are included in thecodon
distribution, they are 1.2M and 772K respectively so not so large.Is there any thought to having static libraries of these two dependencies available so one may statically compile the executable instead to make it more relocatable?
The text was updated successfully, but these errors were encountered: