Opened 8 years ago

Closed 8 years ago

#986 closed defect (fixed)

configure not passing additional --with-ld-opt to obj/Makefile

Reported by: michalschott@… Owned by:
Priority: minor Milestone:
Component: nginx-package Version: 1.10.x
Keywords: Cc:
uname -a: Linux localhost.localdomain 3.10.0-327.10.1.el7.x86_64 #1 SMP Tue Feb 16 17:03:50 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: 1.10.0



Recently I was trying to build nginx 1.10.0 from source and add nginx-x-rid-header custom module ( using rpmbuild. Obviously I had to edit provided nginx.spec file. First attempt was to add both --add-module=../git/nginx-x-rid-header and --with-ld-opt=-lossp-uuid to configure command, but unfortunately compilation was failing due to missing --with-ld-opt=-lossp-uuid in obj/Makefile while I was using provided nginx.spec.

Here's part of diff, which I had to add to specfile. It will add missing ld-opt parameter to obj/Makefile after ./configure finishes.

--- nginx.spec  2016-04-26 15:10:05.000000000 +0000
+++      2016-05-25 06:47:05.786017002 +0000
@@ -121,6 +121,7 @@
         --with-mail_ssl_module \
         --with-file-aio \
         --with-ipv6 \
+        --add-module=%{_builddir}/%{name}-%{main_version}/nginx-x-rid-header \

 Summary: High performance web server
@@ -223,6 +226,7 @@
     --with-cc-opt="%{WITH_CC_OPT}" \
     %{?perlldopts} \
+sed -i 's/\-Wl\,\-E$/\-Wl\,\-E \-lossp-uuid/g' /home/builder/rpmbuild/BUILD/nginx-1.10.0/objs/Makefile
 make %{?_smp_mflags}
 %{__mv} %{bdir}/objs/nginx \
@@ -241,6 +245,7 @@
 ./configure %{COMMON_CONFIGURE_ARGS} \
     --with-cc-opt="%{WITH_CC_OPT}" \
+sed -i 's/\-Wl\,\-E$/\-Wl\,\-E \-lossp-uuid/g' /home/builder/rpmbuild/BUILD/nginx-1.10.0/objs/Makefile
 make %{?_smp_mflags}


Additional info:
[vagrant@localhost ~]$ cat /etc/centos-release
CentOS Linux release 7.2.1511 (Core)

I think it must be something with moving common configure args to macro (according to Changelog - in version 1.9.12, so earlier versions might be affected to). Basicly I can't add any extra parameter using --extra-ld-opt.

Change History (2)

comment:1 by Maxim Dounin, 8 years ago

Component: othernginx-package

Looks like the problem you are seeing is because --with-ld-opt added in spec file for perl overrides the one you've added. This doesn't looks like a bug - rather, you've edited the spec file incorrectly.

Let our package maintainers to take a look if it is possible to easily improve things and make editing spec file simplier. As far as I understand, --with-ld-opt="-Wl,-E" added for perl should not be needed at all now, as it's anyway added by nginx for dynamic modules support since nginx 1.9.11. Removing it should resolve the problem.

comment:2 by thresh, 8 years ago

Resolution: fixed
Status: newclosed

Correct, it's not needed to pass the option these days. I've removed it from the spec files now, and passing the extra arguments should now be possible.

Note: See TracTickets for help on using tickets.