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

glibc 2.27 or older: fcntl@GLIBC_2.2.5 not found when build for armv7 #143

Open
Dirreke opened this issue Jun 13, 2023 · 0 comments
Open

Comments

@Dirreke
Copy link

Dirreke commented Jun 13, 2023

I created an Issue on zig, ziglang/zig#16002
I get it when I build for armv7-unknown-linux-gnueabihf

  = note: ld.lld: error: undefined symbol: fcntl@GLIBC_2.2.5
          >>> referenced by fs_posix.cc:157 (rocksdb/env/fs_posix.cc:157)
          >>>               fs_posix.o:(rocksdb::(anonymous namespace)::PosixFileSystem::NewSequentialFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, rocksdb::FileOptions const&, std::__1::unique_ptr<rocksdb::FSSequentialFile, std::__1::default_delete<rocksdb::FSSequentialFile> >*, rocksdb::IODebugContext*)) in archive .../armv7-unknown-linux-gnueabihf/debug/deps/liblibrocksdb_sys-6aa47adaadf43187.rlib
          >>> referenced by fs_posix.cc:157 (rocksdb/env/fs_posix.cc:157)
          >>>               fs_posix.o:(rocksdb::(anonymous namespace)::PosixFileSystem::NewSequentialFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, rocksdb::FileOptions const&, std::__1::unique_ptr<rocksdb::FSSequentialFile, std::__1::default_delete<rocksdb::FSSequentialFile> >*, rocksdb::IODebugContext*)) in archive .../armv7-unknown-linux-gnueabihf/debug/deps/liblibrocksdb_sys-6aa47adaadf43187.rlib
          >>> referenced by fs_posix.cc:157 (rocksdb/env/fs_posix.cc:157)
          >>>               fs_posix.o:(rocksdb::(anonymous namespace)::PosixFileSystem::NewRandomAccessFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, rocksdb::FileOptions const&, std::__1::unique_ptr<rocksdb::FSRandomAccessFile, std::__1::default_delete<rocksdb::FSRandomAccessFile> >*, rocksdb::IODebugContext*)) in archive .../armv7-unknown-linux-gnueabihf/debug/deps/liblibrocksdb_sys-6aa47adaadf43187.rlib
          >>> referenced 12 more times
          >>> did you mean: fcntl
          >>> defined in: ~/.cache/zig/o/f9d9fcf846b561cef901d9b46b123fcc/libpthread.so.0

And I found that ~/.cache/zig/o/.../c.o has fcntl@GLIBC_2.4 but not fcntl@GLIBC_2.2.5. I don't know why

I noticed that cargo-zigbuild create fcntl.h and fcntl.map to help finish the compile. Therefore, I want to know if cargo-zigbuild know why and if cargo-zigbuild can solve this by adding some code to fcntl.h and fcntl.map

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

1 participant