Skip to content

Commit 635ab24

Browse files
authored
Readme: added section to chromium build for std::bad_alloc (#882)
This adds a section to the readme, explaining the solution to a build error discussed in #845. Adding this in the readme makes it easier to be found. Signed-off-by: Matthias Schoepfer <msc@fp-robotics.com>
1 parent 155dc69 commit 635ab24

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

meta-chromium/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,36 @@ host. clang-native from the meta-clang layer is used to build those binaries.
8282
Additionally, make sure the machine being used to build Chromium is powerful
8383
enough: a x86-64 machine with at least 16GB RAM is recommended.
8484

85+
### Troubleshooting Build Error: std::bad_alloc
86+
If you encounter a build error similar to the following:
87+
88+
```
89+
terminate called after throwing an instance of 'std::bad_alloc'
90+
what(): std::bad_alloc
91+
terminate called recursively
92+
terminate called recursively
93+
```
94+
You might be experiencing what has been descibed in
95+
[this issue](https://github.com/OSSystems/meta-browser/issues/845#issuecomment-2664769837).
96+
97+
You can try to increase the
98+
[vm.max_map_count](https://docs.kernel.org/admin-guide/sysctl/vm.html#max-map-count)
99+
value to allow your system to handle more memory mappings.
100+
101+
1. Temporarily Set vm.max_map_count:
102+
103+
```
104+
# echo 1048576 > /proc/sys/vm/max_map_count
105+
```
106+
This change will only persist until the system is rebooted.
107+
108+
2. Permanently Set vm.max_map_count:
109+
To make this change permanent, you need to modify `/etc/sysctl.conf` and add:
110+
```bash
111+
vm.max_map_count=1048576
112+
```
113+
A reboot may be required for the new value to get picked up (or run `sysconf -p`).
114+
85115
## PACKAGECONFIG knobs
86116

87117
* component-build: (off by default)

0 commit comments

Comments
 (0)