# Cannot build glib20



## tarkhil (Jan 26, 2021)

FreeBSD 12.1-RELEASE amd64

Fresh ports

glib 2.66.4-1


```
[288/1061] cc -Iglib/tests/testing-helper.p -Iglib/tests -I../glib/tests -I. -I.. -Iglib -I../glib -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3 -D_GNU_SOURCE -fno-strict-aliasing -DG_DISABLE_CAST_CHECKS -Wimplicit-fallthrough -Wstrict-prototypes -Wunused -Wno-unused-parameter -Wno-bad-function-cast -Wno-pedantic -Wno-format-zero-length -Werror=declaration-after-statement -Werror=format=2 -Werror=implicit-function-declaration -Werror=init-self -Werror=missing-include-dirs -Werror=missing-prototypes -Werror=pointer-arith -O2 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -pthread '-DG_LOG_DOMAIN="GLib"' -UG_DISABLE_ASSERT -MD -MQ glib/tests/testing-helper.p/testing-helper.c.o -MF glib/tests/testing-helper.p/testing-helper.c.o.d -o glib/tests/testing-helper.p/testing-helper.c.o -c ../glib/tests/testing-helper.c
ninja: build stopped: subcommand failed.
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
```

The problem seems to be related to gtester, which coredumps on signal 11; sometimes, I was able to build glib in non-jailed environment.


----------



## SirDice (Jan 26, 2021)

tarkhil said:


> ```
> ninja: build stopped: subcommand failed.
> ```


This appears to happen when you run out of memory. Try rebooting and starting the build from a "freshly" booted system, that usually helps on my systems.


----------



## tarkhil (Jun 7, 2022)

Got it!
It fails when I've made (can't recall the reason) /usr/include/sys/mnttab.h symlink somewhere into /usr/src. My fault 100%


----------

