Opened 7 years ago

Closed 7 years ago

#1268 closed defect (invalid)

A regression

Reported by: osokin@… Owned by:
Priority: blocker Milestone:
Component: nginx-core Version: 1.11.x
Keywords: Cc:
uname -a: FreeBSD 11.0-STABLE #5: Sun Apr 16 05:20:30 EDT 2017
nginx -V: nginx 1.12.0

Description

Hi,

I've got a report from FreeBSD maillist about a regression in nginx 1.12.0:

o) it's impossible to link a nginx with libressl (libressl 2.5.4 installed, DEFAULT_VERSIONS+=ssl=libressl enabled in /etc/make.conf) if `-DNGX_HAVE_INET6=0' defined with the error:

objs/src/event/ngx_event_openssl.o: In function `ngx_ssl_get_ciphers':

src/event/ngx_event_openssl.c:(.text+0x3de6): undefined reference to SSL_CIPHER_find' src/event/ngx_event_openssl.c:(.text+0x3e66): undefined reference to SSL_CIPHER_find' cc: error: linker command failed with exit code 1 (use -v to see invocation)

* Error code 1

o) however the linker runs without an issue if `-DNGX_HAVE_INET6=0' hasn't defined yet.

Could you please investigate.
Thanks in advance.

Change History (1)

comment:1 by Maxim Dounin, 7 years ago

Resolution: invalid
Status: newclosed

The problem is that port's IPv6 option defines its own --with-cc-opt configure argument, and thus effectively removes one previously defined:

CONFIGURE_ARGS+=--prefix=${ETCDIR} \
                --with-cc-opt="-I ${LOCALBASE}/include" \
                --with-ld-opt="-L ${LOCALBASE}/lib" \

...

.if empty(PORT_OPTIONS:MIPV6)
CONFIGURE_ARGS+=--with-cc-opt="-DNGX_HAVE_INET6=0"
.else
CATEGORIES+=    ipv6
.endif

As a result, nginx uses libraries from ${LOCALBASE}/lib, but headers from /usr/include. If these differ from the library used, building fails for obvious reasons. Fixing the port to avoid redefining --with-cc-opt should resolve this.

Note: See TracTickets for help on using tickets.