Bug 193136 - [PATCH] sysutils/syslog-ng: unbreak make stage
Summary: [PATCH] sysutils/syslog-ng: unbreak make stage
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-29 23:42 UTC by leres
Modified: 2014-11-12 04:09 UTC (History)
0 users

See Also:


Attachments
example make output (891 bytes, text/plain)
2014-10-29 18:12 UTC, leres
no flags Details
Typescript output (172.76 KB, text/plain)
2014-10-29 20:01 UTC, Cy Schubert
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description leres 2014-08-29 23:42:03 UTC
Although tinderbox does not consider the error to be fatal, it's not
currently possible to install sysutils/syslog-ng on 9.1-RELEASE because
make stage fails:

    fun 157 # make install
    ===>  Found saved configuration for syslog-ng-3.5.6_1
    ===>   syslog-ng-3.5.6_3 depends on file: /usr/local/sbin/pkg - found
[...]
     ( cd
'/home/fun/u2/src/FreeBSD-current/ports/sysutils/syslog-ng/work/stage/
usr/local/lib/syslog-ng/libtest' && ranlib libtest/libsyslog-ng-test.a )
    ranlib: 'libtest/libsyslog-ng-test.a': No such file
    gmake[4]: *** [install-libtestLIBRARIES] Error 1
    gmake[3]: *** [install-am] Error 2
    gmake[2]: *** [install-recursive] Error 1
    gmake[1]: *** [install] Error 2
    gmake: *** [install-strip] Error 2
    *** [do-install] Error code 2

    Stop in /home/fun/u2/src/FreeBSD-current/ports/sysutils/syslog-ng.
    *** [stage] Error code 1

    Stop in /home/fun/u2/src/FreeBSD-current/ports/sysutils/syslog-ng.

Removing files/patch-Makefile.in solves this.

Here is a redports log that shows sysutils/syslog-ng building
successfully after removing patch-Makefile.in

    https://redports.org/~leres/20140829232748-71777-238626/syslog-ng-3.5.6_3.log

Here's the test ports build dir:

    https://redports.org/browser/leres/sysutils/syslog-ng
Comment 1 John Marino freebsd_committer 2014-08-30 20:17:16 UTC
over to maintainer
Comment 2 Cy Schubert freebsd_committer 2014-08-31 04:11:10 UTC
It builds successfully on redports and locally. I will confer with our upline, the author of syslog-ng and who supplied the port.

This may only affect 9.1 and earlier.

Have you tried syslog-ng-devel? It does not support 8.4 and I suspect it will not support 9.1. Our upline would like to hear about any issues with it as well.
Comment 3 Cy Schubert freebsd_committer 2014-08-31 04:36:59 UTC
With the suggested patch in this PR the build fails with:

/bin/sh /export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/syslog-ng-3.5.6/install-sh -d /export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage//usr/local/share/syslog-ng/include/scl
(cd ./scl; tar cf - system pacct syslogconf rewrite) | (cd /export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage//usr/local/share/syslog-ng/include/scl && tar xf -)
chmod -R u+rwX /export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage//usr/local/share/syslog-ng/include/scl
 /bin/mkdir -p '/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage/usr/local/include/syslog-ng/filter'
 install   -m 444 lib/filter/filter-expr.h lib/filter/filter-op.h lib/filter/filter-cmp.h lib/filter/filter-in-list.h lib/filter/filter-tags.h lib/filter/filter-netmask.h lib/filter/filter-call.h lib/filter/filter-re.h lib/filter/filter-pri.h lib/filter/filter-pipe.h lib/filter/filter-expr-parser.h '/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage/usr/local/include/syslog-ng/filter'
 /bin/mkdir -p '/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage/usr/local/lib/syslog-ng/libtest'
 install   -m 444  libtest/libsyslog-ng-test.a '/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage/usr/local/lib/syslog-ng/libtest'
 ( cd '/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/stage/usr/local/lib/syslog-ng/libtest' && ranlib libsyslog-ng-test.a )
ranlib: fatal: Failed to open 'libsyslog-ng-test.a'
gmake[6]: *** [install-libtestLIBRARIES] Error 70
gmake[5]: *** [install-am] Error 2
gmake[4]: *** [install-recursive] Error 1
gmake[3]: *** [install] Error 2
gmake[2]: *** [install-strip] Error 2
gmake[2]: Leaving directory `/export/wrkdir/amd64/export/home/cy/freebsd/redports/cy/sysutils/syslog-ng/work/syslog-ng-3.5.6'
*** Error code 2

Stop.
make[1]: stopped in /export/home/cy/freebsd/redports/cy/sysutils/syslog-ng
*** Error code 1

Stop.
make: stopped in /export/home/cy/freebsd/redports/cy/sysutils/syslog-ng
slippy$ 

Removal of patch-Makefile.in would cause regression.
Comment 4 leres 2014-09-01 17:15:57 UTC
Here are redports build logs for 10.0-RELEASE and 11-CURRENT that were successful with patch-Makefile.in removed:

    https://redports.org/~leres/20140901163733-40119-239884/syslog-ng-3.5.6_3.log
    https://redports.org/~leres/20140901163724-82120-239883/syslog-ng-3.5.6_3.log

In particular, there is no error when ranlib is run on libsyslog-ng-test.a:

     ( cd '/work/a/ports/sysutils/syslog-ng/work/stage/usr/local/lib/syslog-ng/libtest' && ranlib libsyslog-ng-test.a )
     /bin/mkdir -p '/work/a/ports/sysutils/syslog-ng/work/stage/usr/local/include/syslog-ng/libtest'

There's clearly something different about our home build environments. Do you have a redports log that shows the ranlib error with the patch removed? What release are you running?

The redports builds on 9.2-RELEASE, 10.0-RELEASE and 11-CURRENT I've done with the patch removed exactly mirror what I see on my 9.1-RELEASE system; ranlib runs successfully.

Here's a redports log from a few weeks ago (3.5.5) with the patch intact that shows the error:

    https://redports.org/~leres/20140808004908-38165-231231/syslog-ng-3.5.5.log

     ( cd '/work/a/ports/sysutils/syslog-ng/work/stage/usr/local/lib/syslog-ng/libtest' && ranlib libtest/libsyslog-ng-test.a )
    ranlib: warning: libtest/libsyslog-ng-test.a: no such file

For whatever reason tinderbox does not consider the ranlib warning fatal. However when you build on a live system, make does consider it fatal and stops the build at that point.

The archive is in work/stage/usr/local/lib/syslog-ng/libtest/libsyslog-ng-test.a on my systems and in the 3 most recent redports builds I've done. It looks like on your system it's in .../syslog-ng/libtest/libtest/libsyslog-ng-test.a -- I believe that is the key to why we're not seeing the same results.
Comment 5 commit-hook freebsd_committer 2014-09-02 19:40:28 UTC
A commit references this bug:

Author: cy
Date: Tue Sep  2 19:39:54 UTC 2014
New revision: 367075
URL: http://svnweb.freebsd.org/changeset/ports/367075

Log:
  Properly fix stage error when building non-root.

  PR:		193136

Changes:
  head/sysutils/syslog-ng/Makefile
  head/sysutils/syslog-ng/files/patch-Makefile.in
Comment 6 Cy Schubert freebsd_committer 2014-09-02 19:41:19 UTC
Fix committed.
Comment 7 leres 2014-10-29 18:12:00 UTC
Created attachment 148771 [details]
example make output

Example make output that shows the error.
Comment 8 leres 2014-10-29 18:17:14 UTC
This is still broken; see the attachment called trace.log. The problem is with files/patch-Makefile.in. It changes the relative file path used by ranlib. It's easy to see why it doesn't work; it does a cd to [...]/work/stage/usr/
local/lib/syslog-ng/libtest and then tries to ranlib libtest/libsyslog-ng-test.a. Since there is no directory [...]/work/stage/usr/
local/lib/syslog-ng/libtest/libtest/, ranlib fails, exits with a non-zero status and make exits without completing the build.

As suggested before, removing this patch fixes the problem.
Comment 9 Cy Schubert freebsd_committer 2014-10-29 20:01:42 UTC
Created attachment 148777 [details]
Typescript output

See typscript output with the patch.
Comment 10 commit-hook freebsd_committer 2014-10-29 20:03:55 UTC
A commit references this bug:

Author: cy
Date: Wed Oct 29 20:03:13 UTC 2014
New revision: 371702
URL: https://svnweb.freebsd.org/changeset/ports/371702

Log:
  The problem the ranlib patch addressed has since been resolved. Remove it.

  PR:		193136

Changes:
  head/sysutils/syslog-ng/Makefile
  head/sysutils/syslog-ng/files/patch-Makefile.in
Comment 11 commit-hook freebsd_committer 2014-10-29 20:05:56 UTC
A commit references this bug:

Author: cy
Date: Wed Oct 29 20:05:42 UTC 2014
New revision: 371703
URL: https://svnweb.freebsd.org/changeset/ports/371703

Log:
  Remove patch for resolved issue. Flag -devel port IGNORE until new
  -devel branch is released.

  PR:		193136

Changes:
  head/sysutils/syslog-ng-devel/Makefile
  head/sysutils/syslog-ng-devel/files/patch-Makefile.in
Comment 12 Cy Schubert freebsd_committer 2014-11-12 04:09:28 UTC
Patch committed.