ibr-ds / sgx-perf

High-level performance analyser toolkit for Intel SGX
MIT License
39 stars 11 forks source link

Stripped symbols #3

Open letmaik opened 5 years ago

letmaik commented 5 years ago

I just had some fun figuring out how to get PSW to have symbols. The prebuilt packages seem to be all stripped now. Building from source by default also gets you stripped libraries. The solution was to use export DEB_BUILD_OPTIONS="nostrip" which Intel mentions only in connection with Ubuntu 16.04 and debug information, whereas I'm on 18.04 and don't care about debug information. Long story short, it's probably helpful to mention this environment variable in the readme and the fact that you have to build from source.

andrade commented 5 years ago

I had the same issue with SGX v2.6 on Ubuntu 18.04.

$ LD_PRELOAD=path/to/lib/liblogger.so ./app
=== Initializing sgx-perf
(i) No config file found, load defaults
!!! Could not get CEnclavePool::instance(). Check urts for stripped symbols
!!! Error initializing!

The solution was to compile and install the PSW from source with nostrip, as pointed out by @letmaik. I kept the prebuilt driver and SDK, and only reinstalled the PSW.

Note: PSW didn't compile with protobuf v3.9.0 from snap, used instead 3.0.0 from apt repositories.