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

Can ego run dl workload in enclave using https://github.com/sugarme/gotch? #143

Closed
TYTaO opened this issue Jun 17, 2022 · 1 comment
Closed

Comments

@TYTaO
Copy link

TYTaO commented Jun 17, 2022

Issue description

When I try to run ml or dl using gotch(Go binding for Pytorch C++ API), ego sign will go wrong. like symbol not found

ldd gotchTest
        linux-vdso.so.1 (0x00007fff719fb000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fac7fb4c000)
        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fac7f96b000)
        libc10.so => /usr/local/lib/libtorch/lib/libc10.so (0x00007fac7f8e8000)
        libtorch_cpu.so => /usr/local/lib/libtorch/lib/libtorch_cpu.so (0x00007fac68733000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fac685e4000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fac685c7000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fac683d5000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fac8010e000)
        libgomp-52f2fd74.so.1 => /usr/local/lib/libtorch/lib/libgomp-52f2fd74.so.1 (0x00007fac681a2000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fac68197000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fac68191000)

Cgo may cause this, Is there a simple way to solve this problem?

@thomasten
Copy link
Member

Yes, cgo support in EGo doesn't allow dynamic linking. You'd need to change gotch such that the following is linked statically:

        libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fac7f96b000)
        libc10.so => /usr/local/lib/libtorch/lib/libc10.so (0x00007fac7f8e8000)
        libtorch_cpu.so => /usr/local/lib/libtorch/lib/libtorch_cpu.so (0x00007fac68733000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fac685c7000)
        libgomp-52f2fd74.so.1 => /usr/local/lib/libtorch/lib/libgomp-52f2fd74.so.1 (0x00007fac681a2000)

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

2 participants