For some tests I needed to build and install ports as a regular user, leveraging 'make INSTALL_AS_USER=1 install'. Sadly, textproc/flex errors out as follows: : install -s -m 555 'flex' '/home/gerald/8-i386/bin/flex' test -z "/home/gerald/8-i386/lib" || /bin/sh ./mkinstalldirs "/home/gerald/8-i386/lib" install -m 444 'libfl.a' '/home/gerald/8-i386/lib/libfl.a' install -m 444 'libfl_pic.a' '/home/gerald/8-i386/lib/libfl_pic.a' ranlib '/home/gerald/8-i386/lib/libfl.a' ranlib: fatal: Failed to open '/home/gerald/8-i386/lib/libfl.a' ranlib '/home/gerald/8-i386/lib/libfl_pic.a' ranlib: fatal: Failed to open '/home/gerald/8-i386/lib/libfl_pic.a' gmake[3]: *** [install-libLIBRARIES] Error 70 gmake[3]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35' gmake[2]: *** [install-am] Error 2 gmake[2]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35' gmake[1]: *** [install-recursive] Error 1 gmake[1]: Leaving directory `/scratch/tmp/gerald/dumpster/home/gerald/ports/flex/work/flex-2.5.35' gmake: *** [install] Error 2 *** Error code 2 Fix: I believe the problem may be running ranlib on the two .a files which have permissions r--r--r--. How-To-Repeat: env PREFIX=$HOME/...; make INSTALL_AS_USER=1 install
Responsible Changed From-To: freebsd-ports-bugs->johans johans@stack.nl => johans@ (via the GNATS Auto Assign Tool)
Maintainer of textproc/flex, Please note that PR ports/143933 has just been submitted. If it contains a patch for an upgrade, an enhancement or a bug fix you agree on, reply to this email stating that you approve the patch and a committer will take care of it. The full text of the PR can be found at: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/143933 -- Edwin Groothuis via the GNATS Auto Assign Tool edwin@FreeBSD.org
State Changed From-To: open->feedback Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Gerald Pfeifer wrote: > I believe the problem may be running ranlib on the two .a files > which have permissions r--r--r-- This is indeed the problem, if you run make with an additional INSTALL_DATA="install -m 644" it should install flex just fine. However I'm not sure how to fix this for the flex port. Adding said option to the general case seems inappropriate. Besides, there are quite a number of other ports that use $(INSTALL_DATA) to install libraries as well, and thus will suffer the same problem. I'll probably add a hack to chown the two library files before running ranlib. Suggestions for a better fix are welcome. Johan
On Sun, 14 Feb 2010, Johan van Selst wrote: > Suggestions for a better fix are welcome. I cannot think of any, but if you have a patch you are happy about I will be glad to commit it for you. Gerald
Hi Gerald, Please try replacing the post-patch section with this and let me know if this does the trick. post-patch: .SILENT ${REINPLACE_CMD} -Ee 's/tests//' \ -e 's/^([[:space:]]*)\$$\(RANLIB\) ([^ ]*)/\1chmod u+w \2;&/' \ ${WRKSRC}/Makefile.in ${REINPLACE_CMD} -e 's/@MAKEINFO@/& --no-split/g' \ ${WRKSRC}/doc/Makefile.in ${RM} -f ${WRKSRC}/doc/*.info* The same as a diff for patch(1): --- flex/Makefile 2009-12-28 08:31:06.000000000 +0100 +++ flex/Makefile 2010-02-16 09:50:28.000000000 +0100 @@ -36,7 +36,9 @@ .endif post-patch: .SILENT - ${REINPLACE_CMD} -e 's/tests//' ${WRKSRC}/Makefile.in + ${REINPLACE_CMD} -Ee 's/tests//' \ + -e 's/^([[:space:]]*)\$$\(RANLIB\) ([^ ]*)/\1chmod u+w \2;&/' \ + ${WRKSRC}/Makefile.in ${REINPLACE_CMD} -e 's/@MAKEINFO@/& --no-split/g' \ ${WRKSRC}/doc/Makefile.in ${RM} -f ${WRKSRC}/doc/*.info*
johans 2010-02-26 08:12:39 UTC FreeBSD ports repository Modified files: textproc/flex Makefile Log: Fix port installation for the INSTALL_AS_USER case. This doesn't affect regular (root) installs. PR: ports/143933 Submitted by: gerald Feature safe: yes Revision Changes Path 1.11 +3 -1 ports/textproc/flex/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
State Changed From-To: feedback->closed Committed the patch that has been tested by gerald.