building perl5.30 with a clean PREFIX completes, but include path is not added, so some perl modules fail to build. Pkg tools installed on different PREFIX /etc/make.conf PKG_PREFIX=/usr/pkgng PKG_BIN=${PKG_PREFIX}/sbin/pkg-static Diff of configure stage: ===> Configuring for perl5-5.30.1 [...] Any additional cc flags? -[-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong] +[-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include] [...] -Directory /usr/local/bin doesn't exist. Use that name anyway? [y] [...] -Directory /usr/local/bin doesn't exist. Use that name anyway? [y] [...] -Directory /usr/local/bin doesn't exist. Use that name anyway? [y] [...] -cflags.SH: ccflags = -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 +cflags.SH: ccflags = -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DUSE_THREAD_SAFE_LOCALE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 crude Workaround: Makefile.local: pre-configure: /bin/mkdir -p ${PREFIX}/include /bin/mkdir -p ${PREFIX}/lib /bin/mkdir -p ${PREFIX}/bin