# Poudriere fails to build Nginx, missing dependency package libxslt



## novaldex (Sep 23, 2019)

Hi, I think i'm missing something pretty obvious, but I can't seem to find what.

I'm starting to convert over to Poudriere built packages, and all has been going well up till Nginx.

I have a custom built install, specifically to add in LDAP support, but without going the whole hog of the 'full' package (which has too many extras for my liking). I've been able to adjust the options for the Nginx build to include LDAP, but it seems support requires libxml2/libxslt to be installed and Poudriere fails at the 'configure' stage.

Is there a way to tell Poudriere that extra libraries are needed to build a package? If so, how can I do it please?

Many thanks in advance..


----------



## SirDice (Sep 23, 2019)

novaldex said:


> Is there a way to tell Poudriere that extra libraries are needed to build a package?


They should be picked up automatically unless the port itself is broken.

As you've been messing with the options try doing a "clean" build by adding the `-c` option to the `bulk` command.


----------



## novaldex (Sep 23, 2019)

Thanks for your advice SirDice, 'clean' build running now.

FYI, the command i'm running is

`poudriere bulk -c -j FreeBSD-12_0-x64 -p HEAD www/nginx`


----------



## novaldex (Sep 23, 2019)

Sorry, seems to have failed for the same reason.

Poudriere output (slightly sanitised)


```
[00:00:01] Creating the reference jail... done
[00:00:01] Mounting system devices for FreeBSD-12_0-x64-HEAD
[00:00:01] Mounting ports/packages/distfiles
[00:00:01] Stashing existing package repository
[00:00:01] Mounting packages from: /poudriere/data/packages/FreeBSD-12_0-x64-HEAD
[00:00:01] Copying /var/db/ports from: /usr/local/etc/poudriere.d/FreeBSD-12_0-x64-HEAD-options
[00:00:01] Appending to make.conf: /usr/local/etc/poudriere.d/FreeBSD-12_0-x64-make.conf
/etc/resolv.conf -> /poudriere/data/.m/FreeBSD-12_0-x64-HEAD/ref/etc/resolv.conf
[00:00:01] Starting jail FreeBSD-12_0-x64-HEAD
[00:00:02] Logs: /poudriere/data/logs/bulk/FreeBSD-12_0-x64-HEAD/2019-09-23_11h06m26s
[00:00:02] Loading MOVED for /poudriere/data/.m/FreeBSD-12_0-x64-HEAD/ref/usr/ports
[00:00:03] Ports supports: FLAVORS SELECTED_OPTIONS
[00:00:03] Gathering ports metadata
[00:00:07] Calculating ports order and dependencies
[00:00:07] (-c) Cleaning all packages... done
[00:00:07] pkg package missing, skipping sanity
[00:00:07] Skipping incremental rebuild and repository sanity checks
[00:00:07] Cleaning the build queue
[00:00:07] Sanity checking build queue
[00:00:07] Processing PRIORITY_BOOST
[00:00:07] Balancing pool
[00:00:07] Recording filesystem state for prepkg... done
[00:00:07] Building 5 packages using 2 builders
[00:00:07] Starting/Cloning builders
[00:00:08] Hit CTRL+t at any time to see build progress and stats
[00:00:08] [01] [00:00:00] Building ports-mgmt/pkg | pkg-1.12.0
[00:02:07] [01] [00:01:59] Finished ports-mgmt/pkg | pkg-1.12.0: Success
[00:02:07] [01] [00:00:00] Building devel/pcre | pcre-8.43_2
[00:02:07] [02] [00:00:00] Building textproc/expat2 | expat-2.2.7
[00:02:23] [02] [00:00:16] Finished textproc/expat2 | expat-2.2.7: Success
[00:02:23] [02] [00:00:00] Building net/openldap24-client | openldap-client-2.4.48
[00:04:01] [02] [00:01:38] Finished net/openldap24-client | openldap-client-2.4.48: Success
[00:04:49] [01] [00:02:42] Finished devel/pcre | pcre-8.43_2: Success
[00:04:49] [01] [00:00:00] Building www/nginx | nginx-1.16.1_3,2
[00:05:59] [01] [00:01:10] Finished www/nginx | nginx-1.16.1_3,2: Failed: configure
[00:06:10] Stopping 2 builders
[00:06:10] Creating pkg repository
Creating repository in /tmp/packages: 100%
Packing files for repository: 100%
[00:06:11] Committing packages to repository: /poudriere/data/packages/FreeBSD-12_0-x64-HEAD/.real_1569233556 via .latest symlink
[00:06:11] Removing old packages
[00:06:11] Built ports: ports-mgmt/pkg textproc/expat2 net/openldap24-client devel/pcre
[00:06:11] Failed ports: www/nginx:configure
[FreeBSD-12_0-x64-HEAD] [2019-09-23_11h06m26s] [committing:] Queued: 5  Built: 4  Failed: 1  Skipped: 0  Ignored: 0  Tobuild: 0   Time: 00:06:09
[00:06:11] Logs: /poudriere/data/logs/bulk/FreeBSD-12_0-x64-HEAD/2019-09-23_11h06m26s
[00:06:11] Cleaning up
[00:06:11] Unmounting file systems
```

And tail'd contents of the nginx.log from the build:


```
checking for libxslt ... not found
checking for libxslt in /usr/local/ ... not found
checking for libxslt in /usr/pkg/ ... not found
checking for libxslt in /opt/local/ ... not found

./configure: error: the HTTP XSLT module requires the libxml2/libxslt
libraries. You can either do not enable the module or install the libraries.

===>  Script "configure" failed unexpectedly.
Please report the problem to joneum@FreeBSD.org [maintainer] and attach the
"/wrkdirs/usr/ports/www/nginx/work/nginx-1.16.1/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. a
/usr/local/sbin/pkg-static info -g -Ea).
*** Error code 1

Stop.                     
make: stopped in /usr/ports/www/nginx
=>> Cleaning up wrkdir
===>  Cleaning for nginx-1.16.1_3,2
build of www/nginx | nginx-1.16.1_3,2 ended at Mon Sep 23 11:12:35 BST 2019
build time: 00:01:21
!!! build failure encountered !!!
```

And finally the Nginx options I've configured


```
# This file is auto-generated by 'make config'.
# Options for nginx-1.16.1_3,2
_OPTIONS_READ=nginx-1.16.1_3,2
_FILE_COMPLETE_OPTIONS_LIST=DEBUG DEBUGLOG DSO FILE_AIO IPV6 THREADS WWW GSSAPI_BASE GSSAPI_HEIMDAL GSSAPI_MIT MAIL MAIL_IMAP MAIL_POP3 MAIL_SMTP MAIL_SSL GOOGLE_PERFTOOLS HTTP HTTP_ADDITION HTTP_AUTH_REQ  HTTP_CACHE HTTP_DAV HTTP_FLV HTTP_GUNZIP_FILTER HTTP_GZIP_STATIC  HTTP_IMAGE_FILTER HTTP_MP4 HTTP_PERL HTTP_RANDOM_INDEX HTTP_REALIP  HTTP_REWRITE HTTP_SECURE_LINK HTTP_SLICE HTTP_SLICE_AHEAD  HTTP_SSL HTTP_STATUS HTTP_SUB HTTP_XSLT HTTPV2 STREAM STREAM_SSL  STREAM_SSL_PREREAD AJP AWS_AUTH BROTLI CACHE_PURGE CLOJURE CT DEVEL_KIT  ARRAYVAR DRIZZLE DYNAMIC_UPSTREAM ECHO ENCRYPTSESSION FASTDFS FORMINPUT  GRIDFS HEADERS_MORE HTTP_ACCEPT_LANGUAGE HTTP_AUTH_DIGEST HTTP_AUTH_KRB5  HTTP_AUTH_LDAP HTTP_AUTH_PAM HTTP_DAV_EXT HTTP_EVAL HTTP_FANCYINDEX  HTTP_FOOTER HTTP_GEOIP2 HTTP_IP2LOCATION HTTP_IP2PROXY HTTP_JSON_STATUS  HTTP_MOGILEFS HTTP_MP4_H264 HTTP_NOTICE HTTP_PUSH HTTP_PUSH_STREAM  HTTP_REDIS HTTP_RESPONSE HTTP_SUBS_FILTER HTTP_TARANTOOL HTTP_UPLOAD  HTTP_UPLOAD_PROGRESS HTTP_UPSTREAM_CHECK HTTP_UPSTREAM_FAIR  HTTP_UPSTREAM_STICKY HTTP_VIDEO_THUMBEXTRACTOR HTTP_ZIP ICONV LET LUA  MEMC MODSECURITY MODSECURITY3 NAXSI NJS PASSENGER POSTGRES RDS_CSV  RDS_JSON REDIS2 RTMP SET_MISC SFLOW SHIBBOLETH SLOWFS_CACHE  SMALL_LIGHT SRCACHE VOD VTS XSS WEBSOCKIFY
OPTIONS_FILE_UNSET+=DEBUG
OPTIONS_FILE_UNSET+=DEBUGLOG
OPTIONS_FILE_SET+=DSO
OPTIONS_FILE_SET+=FILE_AIO
OPTIONS_FILE_SET+=IPV6
OPTIONS_FILE_SET+=THREADS
OPTIONS_FILE_SET+=WWW
OPTIONS_FILE_UNSET+=GSSAPI_BASE
OPTIONS_FILE_UNSET+=GSSAPI_HEIMDAL
OPTIONS_FILE_UNSET+=GSSAPI_MIT
OPTIONS_FILE_SET+=MAIL
OPTIONS_FILE_UNSET+=MAIL_IMAP
OPTIONS_FILE_UNSET+=MAIL_POP3
OPTIONS_FILE_UNSET+=MAIL_SMTP
OPTIONS_FILE_SET+=MAIL_SSL
OPTIONS_FILE_UNSET+=GOOGLE_PERFTOOLS
OPTIONS_FILE_SET+=HTTP
OPTIONS_FILE_SET+=HTTP_ADDITION
OPTIONS_FILE_SET+=HTTP_AUTH_REQ
OPTIONS_FILE_SET+=HTTP_CACHE
OPTIONS_FILE_SET+=HTTP_DAV
OPTIONS_FILE_SET+=HTTP_FLV
OPTIONS_FILE_SET+=HTTP_GUNZIP_FILTER
OPTIONS_FILE_SET+=HTTP_GZIP_STATIC
OPTIONS_FILE_UNSET+=HTTP_IMAGE_FILTER
OPTIONS_FILE_SET+=HTTP_MP4
OPTIONS_FILE_UNSET+=HTTP_PERL
OPTIONS_FILE_SET+=HTTP_RANDOM_INDEX
OPTIONS_FILE_SET+=HTTP_REALIP
OPTIONS_FILE_SET+=HTTP_REWRITE
OPTIONS_FILE_SET+=HTTP_SECURE_LINK
OPTIONS_FILE_SET+=HTTP_SLICE
OPTIONS_FILE_UNSET+=HTTP_SLICE_AHEAD
OPTIONS_FILE_SET+=HTTP_SSL
OPTIONS_FILE_SET+=HTTP_STATUS
OPTIONS_FILE_SET+=HTTP_SUB
OPTIONS_FILE_UNSET+=HTTP_XSLT
OPTIONS_FILE_SET+=HTTPV2
OPTIONS_FILE_SET+=STREAM
OPTIONS_FILE_SET+=STREAM_SSL
OPTIONS_FILE_SET+=STREAM_SSL_PREREAD
OPTIONS_FILE_UNSET+=AJP
OPTIONS_FILE_UNSET+=AWS_AUTH
OPTIONS_FILE_UNSET+=BROTLI
OPTIONS_FILE_UNSET+=CACHE_PURGE
OPTIONS_FILE_UNSET+=CLOJURE
OPTIONS_FILE_UNSET+=CT
OPTIONS_FILE_SET+=DEVEL_KIT
OPTIONS_FILE_UNSET+=ARRAYVAR
OPTIONS_FILE_UNSET+=DRIZZLE
OPTIONS_FILE_UNSET+=DYNAMIC_UPSTREAM
OPTIONS_FILE_UNSET+=ECHO
OPTIONS_FILE_UNSET+=ENCRYPTSESSION
OPTIONS_FILE_UNSET+=FASTDFS
OPTIONS_FILE_UNSET+=FORMINPUT
OPTIONS_FILE_UNSET+=GRIDFS
OPTIONS_FILE_UNSET+=HEADERS_MORE
OPTIONS_FILE_UNSET+=HTTP_ACCEPT_LANGUAGE
OPTIONS_FILE_UNSET+=HTTP_AUTH_DIGEST
OPTIONS_FILE_UNSET+=HTTP_AUTH_KRB5
OPTIONS_FILE_SET+=HTTP_AUTH_LDAP
OPTIONS_FILE_SET+=HTTP_AUTH_PAM
OPTIONS_FILE_SET+=HTTP_DAV_EXT
OPTIONS_FILE_UNSET+=HTTP_EVAL
OPTIONS_FILE_UNSET+=HTTP_FANCYINDEX
OPTIONS_FILE_UNSET+=HTTP_FOOTER
OPTIONS_FILE_UNSET+=HTTP_GEOIP2
OPTIONS_FILE_UNSET+=HTTP_IP2LOCATION
OPTIONS_FILE_UNSET+=HTTP_IP2PROXY
OPTIONS_FILE_UNSET+=HTTP_JSON_STATUS
OPTIONS_FILE_UNSET+=HTTP_MOGILEFS
OPTIONS_FILE_UNSET+=HTTP_MP4_H264
OPTIONS_FILE_UNSET+=HTTP_NOTICE
OPTIONS_FILE_UNSET+=HTTP_PUSH
OPTIONS_FILE_UNSET+=HTTP_PUSH_STREAM
OPTIONS_FILE_UNSET+=HTTP_REDIS
OPTIONS_FILE_UNSET+=HTTP_RESPONSE   
OPTIONS_FILE_UNSET+=HTTP_SUBS_FILTER
OPTIONS_FILE_UNSET+=HTTP_TARANTOOL   
OPTIONS_FILE_UNSET+=HTTP_UPLOAD
OPTIONS_FILE_UNSET+=HTTP_UPLOAD_PROGRESS
OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_CHECK
OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_FAIR
OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_STICKY
OPTIONS_FILE_UNSET+=HTTP_VIDEO_THUMBEXTRACTOR
OPTIONS_FILE_UNSET+=HTTP_ZIP
OPTIONS_FILE_UNSET+=ICONV
OPTIONS_FILE_UNSET+=LET   
OPTIONS_FILE_UNSET+=LUA
OPTIONS_FILE_UNSET+=MEMC 
OPTIONS_FILE_UNSET+=MODSECURITY
OPTIONS_FILE_UNSET+=MODSECURITY3
OPTIONS_FILE_UNSET+=NAXSI
OPTIONS_FILE_UNSET+=NJS
OPTIONS_FILE_UNSET+=PASSENGER
OPTIONS_FILE_UNSET+=POSTGRES
OPTIONS_FILE_UNSET+=RDS_CSV
OPTIONS_FILE_UNSET+=RDS_JSON
OPTIONS_FILE_UNSET+=REDIS2
OPTIONS_FILE_UNSET+=RTMP   
OPTIONS_FILE_UNSET+=SET_MISC
OPTIONS_FILE_UNSET+=SFLOW 
OPTIONS_FILE_UNSET+=SHIBBOLETH
OPTIONS_FILE_UNSET+=SLOWFS_CACHE
OPTIONS_FILE_UNSET+=SMALL_LIGHT
OPTIONS_FILE_UNSET+=SRCACHE
OPTIONS_FILE_UNSET+=VOD
OPTIONS_FILE_UNSET+=VTS
OPTIONS_FILE_UNSET+=XSS
OPTIONS_FILE_UNSET+=WEBSOCKIFY
```


----------



## novaldex (Sep 23, 2019)

I'd changed the Nginx options using the `poudriere options` command, but reviewing the list above I notice that 
	
	



```
OPTIONS_FILE_UNSET+=HTTP_XSLT
```
 is configured.

I've adjusted this one option to be 
	
	



```
OPTIONS_FILE_SET+=HTTP_XSLT
```
 instead, and am re-running.

So far it's already reporting 23 packages to be built, rather than the 5 from the original run.

Will update soon as I know more.


----------



## novaldex (Sep 23, 2019)

Nginx now successfully builds!

I don't know how that option became 'unset', but that appears to be an answer certainly. It's also good to know that dependency package detection is automatic as well.

Thanks for your help!


----------



## SirDice (Sep 23, 2019)

novaldex said:


> I don't know how that option became 'unset', but that appears to be an answer certainly.


It might be a problem with the port itself. I've had something like this happen in the past too, I had set an option specifically to "ON" and it would somehow always save it as "OFF". Can't remember which port that was though, it was quite some time ago, but it got fixed eventually.


----------



## joneum@ (Sep 23, 2019)

FYI, i see you use nginx-1.16.1_3,2
But the current version is 1.16.1_4,2


----------



## novaldex (Sep 23, 2019)

joneum@ said:


> FYI, i see you use nginx-1.16.1_3,2
> But the current version is 1.16.1_4,2



Thanks, I last updated the ports repo on Friday & it came down then as 1.16.1_3,2, i'll check and see which one it's pointing at. I'm just happier it's building!


----------



## novaldex (Sep 23, 2019)

Another refresh & it's now building 1.16.1_4,2

Is there a rough guide to how often sources are updated like this?


----------



## SirDice (Sep 23, 2019)

novaldex said:


> Is there a rough guide to how often sources are updated like this?


The ports tree is updated pretty much constantly.






						[ports] Log of /head
					






					svnweb.freebsd.org


----------



## novaldex (Sep 23, 2019)

Thanks, I may take the approach of being 'reasonably' up to date on a regular basis rather than trying to keep up with the cutting edge all the time.


----------



## SirDice (Sep 23, 2019)

Well, that's the nice thing about your own repository. You get to decide when and how to update. I'm doing more or less weekly updates, sometimes I skip a week, but when I'm working on something I might do a few times a day.


----------

