GraphScope icon indicating copy to clipboard operation
GraphScope copied to clipboard

[BUG] Figure out why `LD_LIBRARY_PATH` is needed to run otel

Open zhanglei1949 opened this issue 11 months ago • 4 comments

In hqps-db-ci.yaml, /usr/local/lib need to be added into LD_LIBRARY_PATH, which is wield. Figure out the reason and fix it.

zhanglei1949 avatar Mar 14 '24 13:03 zhanglei1949

The reason is the binary interactive-server needs to find the libotel*.so, which is installed to the /usr/local/lib, and the mechanism is rely on LD_LIBRARY_PATH to find libraries. Generally this directory is within the default library search path, but sometimes its not. It's quite normal to add /usr/local/lib to the LD_LIBRARY_PATH in practice.

If u want to get rid of that, there are several ways:

  1. Build static libraries of otel
  2. Add the environment in the Dockerfile
  3. Add option to compile without otel

siyuan0322 avatar Mar 15 '24 02:03 siyuan0322

The reason is the binary interactive-server needs to find the libotel*.so, which is installed to the /usr/local/lib, and the mechanism is rely on LD_LIBRARY_PATH to find libraries. Generally this directory is within the default library search path, but sometimes its not. It's quite normal to add /usr/local/lib to the LD_LIBRARY_PATH in practice.

If u want to get rid of that, there are several ways:

  1. Build static libraries of otel
  2. Add the environment in the Dockerfile
  3. Add option to compile without otel

yes, but In the Dockerfile for building the imagehqps-server-base:v0.0.10, flex/Dockerfile, we have already added the path "/usr/local/lib/" to the LD_LIBRARY_PATH environment variable. Moreover, I did not encounter this issue while developing on the devcontainer, which is also build upon hqps-server-base:v0.0.10.

zhanglei1949 avatar Mar 15 '24 07:03 zhanglei1949

This line was added after I built the image and found this issue. If u build it again, it should work.

siyuan0322 avatar Mar 15 '24 07:03 siyuan0322

Moreover, I did not encounter this issue while developing on the devcontainer, which is also build upon hqps-server-base:v0.0.10

As previously said, generally this directory is within the default library search path, but sometimes its not. The environment is quite diverse. So if it doesn't find, just add that.

siyuan0322 avatar Mar 15 '24 07:03 siyuan0322