You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general, the build is 100% failing when /etc/resolv.conf is absent. See error below.
A specific way to reproduce this is to build a Tengine package with Mock.
Mock allows building RPMs in a clean environment. However, Tengine build fails because it relies on /etc/resolv.conf and the
related define is not set because the file is not present:
In file included from src/core/ngx_core.h:55,
from src/core/ngx_resolver.c:9:
src/core/ngx_resolver.c: In function 'ngx_resolver_create':
src/core/ngx_resolver.c:283:41: error: 'NGX_RESOLVER_FILE' undeclared (first use in this function); did you mean 'T_NGX_RESOLVER_FILE'?
ngx_str_t default_file = ngx_string(NGX_RESOLVER_FILE);
^~~~~~~~~~~~~~~~~
src/core/ngx_string.h:40:38: note: in definition of macro 'ngx_string'
#define ngx_string(str) { sizeof(str) - 1, (u_char *) str }
^~~
src/core/ngx_resolver.c:283:41: note: each undeclared identifier is reported only once for each function it appears in
ngx_str_t default_file = ngx_string(NGX_RESOLVER_FILE);
^~~~~~~~~~~~~~~~~
src/core/ngx_string.h:40:38: note: in definition of macro 'ngx_string'
#define ngx_string(str) { sizeof(str) - 1, (u_char *) str }
^~~
How to reproduce it
install mock in an RPM distro
attempt to build RPM for Tengine
build always fails with error above because /etc/resolv.conf is not there, and thus NGX_RESOLVER_FILE is undefined
Alternative way reproduce it
Delete /etc/resolve.conf
attempt to build normally
build fails same as above
PR with fixes will follow.
The text was updated successfully, but these errors were encountered:
dvershinin
changed the title
Failure to build when /etcv/resolv.conf is missing (e.g. with Mock)
Failure to build when /etc/resolv.conf is missing (e.g. with Mock)
Mar 31, 2021
In general, the build is 100% failing when
/etc/resolv.conf
is absent. See error below.A specific way to reproduce this is to build a Tengine package with Mock.
Mock allows building RPMs in a clean environment. However, Tengine build fails because it relies on
/etc/resolv.conf
and therelated define is not set because the file is not present:
How to reproduce it
mock
in an RPM distro/etc/resolv.conf
is not there, and thusNGX_RESOLVER_FILE
is undefinedAlternative way reproduce it
/etc/resolve.conf
PR with fixes will follow.
The text was updated successfully, but these errors were encountered: