Tencent / flare

Flare是广泛投产于腾讯广告后台的现代化C++开发框架,包含了基础库、RPC、各种客户端等。主要特点为易用性强、长尾延迟低。
Other
1.33k stars 200 forks source link

Unable to link, ubuntu 20.04 #22

Closed CodEnFisH closed 3 years ago

CodEnFisH commented 3 years ago

blade build ... works, no errors, however when running blade test, many .so cannot be correctly linked. Latest head of flare, latest head of blade-build

Details

blade test flare/base:endian_test Blade(info): Loading BUILD files... Blade(info): Loading done. Blade(info): Analyzing dependency graph... Blade(info): Analyzing done. Blade(info): Generating backend build code... Blade(info): Generating done. Blade(info): Building... Blade(info): Adjust build jobs number(-j N) to be 20 ninja: warning: bad deps log signature or version; starting over [46/46] LINK BINARY build64_release/flare/base/endian_test Blade(info): Build success. Blade(info): Adjust test jobs number(-j N) to be 10 Blade(notice): 1 tests to run Blade(info): Spawn 1 worker thread(s) to run concurrent tests repo/flare/build64_release/flare/base/endian_test: error while loading shared libraries: libgtest_main.so: cannot open shared object file: No such file or directory Blade(info): [1/0/1] Test //flare/base:endian_test finished : FAILED:127

ldd result:

~/repo/flare$ ldd blade-bin/flare/base/endian_test linux-vdso.so.1 (0x00007ffc89d05000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007feb7aab2000) libgtest_main.so => not found libgtest.so => not found libtcmalloc.so.4 => not found libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007feb7a8d1000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007feb7a8b6000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007feb7a6c2000) /lib64/ld-linux-x86-64.so.2 (0x00007feb7aafe000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007feb7a573000)

I wonder how does link work in blade?

0x804d8000 commented 3 years ago

It seems that LD_LIBRARY_PATH is not in effect on Ubuntu. @chen3feng do you mind taking a look at this?

0x804d8000 commented 3 years ago

After merging #26, blade test ... works on my Ubuntu 20.04 (running in docker), though I still think the error you were seeing is a separate issue..

0x804d8000 commented 3 years ago

After merging #26, blade test ... works on my Ubuntu 20.04 (running in docker), though I still think the error you were seeing is a separate issue..

Just reproduced the error about not finding xxx.so when running tests, even with #26 merged. The issue here should be a separate one.

0x804d8000 commented 3 years ago

See chen3feng/blade-build#938.

Should be fixed by #34, feel free to reopen this issue if it doesn't work for you.