Build error with GLIBC/makefs_ext4

#1

Hello,

I'm trying to build openwrt with glibc. I have the following options:

Target System Options:

Target System (x86)
Subtarget (x86_64)
[] Advanced configuration options (for developers) --->
[
] Toolchain Options --->
C Library implementation (Use glibc) --->

During build I get the error

/mnt/data/openwrt/staging_dir/host/bin/make_ext4fs -l 268435456 -b 4096 -m 0 -J -T 1555016085 /mnt/data/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/root.ext4 /mnt/data/openwrt/build_dir/target-x86_64_glibc/root-x86/
Creating filesystem with parameters:
    Size: 268435456
    Block size: 4096
    Blocks per group: 32768
    Inodes per group: 8192
    Inode size: 256
    Journal blocks: 0
    Label: 
    Blocks: 65536
    Block groups: 2
    Reserved blocks: 0
    Reserved block group size: 15
/mnt/data/openwrt/include/image.mk:306: recipe for target '/mnt/data/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/root.ext4' failed
make[5]: *** [/mnt/data/openwrt/build_dir/target-x86_64_glibc/linux-x86_64/root.ext4] Segmentation fault (core dumped)

My host is Ubuntu 18.04

Linux user-KVM 4.15.0-46-generic #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Any ideas what could be causing this problem? I did notice some modifications to image.mk recently. I'm on the 18.06 branch. I tried using previous versions of 18.06 with git checkout which only gave the same error. I also noticed that the source for makefs_ext4 has not modified in a long time--so I don't believe that is the issue. I wonder if the the inputs to makefs_ext4 are somehow incorrect? Is it not getting what is expected?

0 Likes

#2

Tried changing the rootfs size?

CONFIG_TARGET_ROOTFS_PARTSIZE=3072

many packages?

Linux user-KVM

Is that a native host? I wonder if there is some underlying cgroup / priv issue.....

0 Likes

#3

Thanks wulfy23--that segfault isn't very indicative of the sizing issue. However, that does seem to resolve the issue.

And yes, it's a virtual machine as the build system (host).

0 Likes

#4

Yeah, I cheated....

I had this error on another target.... soon after 06.2 was released..... I think some sort of change happened to the BR then...

There were some mentions about that....

Certainly puzzled me... segfault.... but I don't have the skills to investigate the source for makefs_ext4. So after blindly repeating the command 5 or so times.... I guessed it was related to size.....

Interestingly.... the older style change in the target definition did not work as it did previously.... I .......... I don't actually remember how I got around it..... O' I didn't..... I disabled ext4 and just extracted from the other created images......

So I think your suspicions re: image.mk have some validity. Maybe slh will school us.

0 Likes