Skip to content

Commit d6b92da

Browse files
[libyang1] Adding LFS support for arm32 (#6346)
In the emulated armhf environment, the function readdir()returns NULL on a ext4 file system directory. When running the libyang1 test cases, it will require to load the plugins from the files (such as metadata.so), because the readdir() is failing, the plugins can’t be loaded in the emulated armhf environment, so it causes libyang1 test error. This error is a combination of the following reasons. • Emulation of a 32-bit target from a 64-bit host –> qemu from x86_64 to armhf • Glibc version > 2.27 – Debian buster is using glibc 2.28 - How I did it Enabled large file support by setting _FILE_OFFSET_BITS=64 for libyang1. Signed-off-by: Sabareesh Kumar Anandan <[email protected]>
1 parent 9e57f51 commit d6b92da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/libyang1/Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ $(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
2828
pushd libyang-$(LIBYANG1_VERSION)
2929
sed -i 's/set(LIBYANG_MAJOR_SOVERSION 1)/set(LIBYANG_MAJOR_SOVERSION 2)/' CMakeLists.txt
3030
sed -i 's/libyang1/libyang2/' debian/libyang1.install
31+
# Enable large file support for 32-bit arch
32+
echo 'add_definitions(-D_FILE_OFFSET_BITS=64)' >> CMakeLists.txt
33+
3134
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
3235
popd
3336

0 commit comments

Comments
 (0)