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

Add elf_aux_info() support for OpenBSD #12967

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Aug 24, 2024

No description provided.

@brad0
Copy link
Contributor Author

brad0 commented Sep 6, 2024

Ping.

1 similar comment
@brad0
Copy link
Contributor Author

brad0 commented Sep 20, 2024

Ping.

@brad0
Copy link
Contributor Author

brad0 commented Sep 24, 2024

cc @ajkr

@brad0
Copy link
Contributor Author

brad0 commented Oct 12, 2024

Ping.

@brad0
Copy link
Contributor Author

brad0 commented Oct 25, 2024

cc @adamretter

@adamretter
Copy link
Collaborator

@brad0 I was able to checkout your branch and compile it. However, at the moment I keep running out of memory when running gmake check (I suspect that is unrelated to your change). My system (OpenBSD 7.6 x64) has 32GB or RAM and 16GB Swap file. Have you been able to run check?

@brad0
Copy link
Contributor Author

brad0 commented Oct 26, 2024

@adamretter You would have to use ulimit -d to increase the datasize. Make sure to add the user account to the staff login class. You can do so with usermod -L staff [user]. The default value is quite low.

I have not tried that. I tried running gmake check and it would not build on either amd64 or arm64 with the same linking issue..

  CCLD     db_bench
ld: error: undefined symbol: typeinfo for rocksdb::FileSystemWrapper
>>> referenced by simulated_hybrid_file_system.cc
>>>               tools/simulated_hybrid_file_system.o:(typeinfo for rocksdb::SimulatedHybridFileSystem)
>>> did you mean: vtable for rocksdb::FileSystemWrapper
>>> defined in: ./librocksdb.so

ld: error: undefined symbol: rocksdb::SyncPoint::GetInstance()
>>> referenced by mock_time_env.h:90 (./test_util/mock_time_env.h:90)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))
>>> referenced by mock_time_env.h:92 (./test_util/mock_time_env.h:92)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))
>>> referenced by mock_time_env.h:93 (./test_util/mock_time_env.h:93)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))

ld: error: undefined symbol: rocksdb::SyncPoint::Process(rocksdb::Slice const&, void*)
>>> referenced by sync_point.h:132 (./test_util/sync_point.h:132)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))
>>> referenced by sync_point.h:132 (./test_util/sync_point.h:132)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))
>>> referenced by sync_point.h:132 (./test_util/sync_point.h:132)
>>>               test_util/testutil.o:(rocksdb::MockSystemClock::TimedWait(rocksdb::port::CondVar*, std::__1::chrono::duration<long long, std::__1::ratio<1ll, 1000000ll>>))

ld: error: undefined symbol: typeinfo for rocksdb::MemTableRep
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::test::(anonymous namespace)::SpecialMemTableRep)

ld: error: undefined symbol: typeinfo for rocksdb::Customizable
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::Comparator)
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::CompactionFilter)
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::CompactionFilterFactory)
>>> referenced 1 more times

ld: error: undefined symbol: typeinfo for rocksdb::MergeOperator
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::test::ChanglingMergeOperator)

ld: error: undefined symbol: typeinfo for rocksdb::SystemClockWrapper
>>> referenced by testutil.cc
>>>               test_util/testutil.o:(typeinfo for rocksdb::MockSystemClock)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

@adamretter
Copy link
Collaborator

@brad0 I don't get those errors. Instead I get this:

./db_bloom_filter_test >&t/log-db_bloom_filter_test

ld.so: db_bloom_filter_test: can't load library 'librocksdb.so.9.8'
Killed

@brad0
Copy link
Contributor Author

brad0 commented Oct 27, 2024

@brad0 I don't get those errors. Instead I get this:

./db_bloom_filter_test >&t/log-db_bloom_filter_test

ld.so: db_bloom_filter_test: can't load library 'librocksdb.so.9.8'
Killed

Is that the version that is built? so.9.8? It looks like the dynamic linker having difficulty finding the built copy of librocksdb. Where is it relative to the db_bloom_filter_test test?

@adamretter
Copy link
Collaborator

@brad0 The files are all in: /home/openbsd/rocksdb

-rwxr-xr-x  1 openbsd  openbsd  9030080 Oct 26 08:49 db_bloom_filter_test
lrwxr-xr-x  1 openbsd  openbsd         19 Oct 26 08:48 librocksdb.so -> librocksdb.so.9.8.0
lrwxr-xr-x  1 openbsd  openbsd         19 Oct 26 08:48 librocksdb.so.9 -> librocksdb.so.9.8.0
lrwxr-xr-x  1 openbsd  openbsd         19 Oct 26 08:48 librocksdb.so.9.8 -> librocksdb.so.9.8.0
-rwxr-xr-x  1 openbsd  openbsd  155654080 Oct 26 08:48 librocksdb.so.9.8.0
-rw-r--r--  1 openbsd  openbsd  388336908 Oct 26 08:48 librocksdb_env_basic_test.a
-rw-r--r--  1 openbsd  openbsd    3368262 Oct 26 08:48 librocksdb_stress_debug.a
-rwxr-xr-x  1 openbsd  openbsd   10039960 Oct 26 08:48 librocksdb_test_debug.so
-rwxr-xr-x  1 openbsd  openbsd    6216600 Oct 26 08:48 librocksdb_tools_debug.so

Maybe this is helpful?

$ ldd db_bloom_filter_test
db_bloom_filter_test:
ld.so: db_bloom_filter_test: can't load library 'librocksdb_test_debug.so'
db_bloom_filter_test: signal 9

$ file db_bloom_filter_test
db_bloom_filter_test: ELF 64-bit LSB shared object, x86-64, version 1

$ ldd librocksdb_test_debug.so
librocksdb_test_debug.so:
Cannot load specified object
librocksdb_test_debug.so: exit status 1

$ file librocksdb_test_debug.so
librocksdb_test_debug.so: ELF 64-bit LSB shared object, x86-64, version 1

@brad0
Copy link
Contributor Author

brad0 commented Nov 8, 2024

@adamretter objdump -p on the same files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants