On Dec 31, 2010, at 5:52 AM, Marc Espie wrote:

> Have you looked for $< around the place in bsd.port.mk where it says it sees
> it ?

A grep reveals no such combination in the file.  :(


> 
> The only thing left is to try removing part of that line until the error
> goes away, and then figure out where it comes from.

I don't know when line #1611 is referenced if it means the actual line number 
or really the start of the line from an execution perspective, I suspect the 
latter. 


# What PACKAGE normally does:
        @${ECHO_MSG} "===>  Building package for ${FULLPKGNAME${_S}}"
        @${ECHO_MSG} "Create ${_PACKAGE_COOKIE${_S}}"
        @cd ${.CURDIR} && \    
        tmp=${_TMP_REPO}${_PKGFILE${_S}} && \
        if deps=`SUBPACKAGE=${_S} ${MAKE} _print-package-args` && \
                ${SUDO} ${_PKG_CREATE} $$deps ${PKG_ARGS${_S}} $$tmp && \
                ${_check_lib_depends} $$tmp && \
                ${_register_plist} $$tmp && \
                mv $$tmp ${_PACKAGE_COOKIE${_S}} && \
                mode=`id -u`:`id -g` && \
line 1611--->   ${SUDO} ${CHOWN} $${mode} ${_PACKAGE_COOKIE${_S}}; then \
                        exit 0; \
        else \
                ${SUDO} rm -f $$tmp; \
            exit 1; \
        fi


If I'm reading this right, the line would actually start at '@cd ${.CURDIR} && 
\'.  If true, then there are a lot of variables in there to trace back.  :)


I've been thinking of other ways to debug/fine tune this problem.  See below, 
installing breaks at that line, while building a package works.  Note before I 
was trying to make package for rsnapshot which had rsync as a dependency.  
Initially I was thinking ports with dependencies might be problem.  rsync 
became a good candidate since it does not have any.  

After making the package, I can install said package.


# pwd                                                 
/usr/ports/net/rsync
# make install
Using $< in a non-suffix rule context is a GNUmake idiom (line 1611 of 
/usr/ports/infrastructure/mk/bsd.port.mk)
*** Error code 2

Stop in /usr/ports/net/rsync (line 2116 of 
/usr/ports/infrastructure/mk/bsd.port.mk).
# make package 
===>  Checking files for rsync-3.0.7
`/usr/ports/distfiles/rsync-3.0.7.tar.gz' is up to date.
>> (SHA256) rsync-3.0.7.tar.gz: OK
===>  Verifying specs:  c c
===>  found c.56.0
===>  Extracting for rsync-3.0.7
===>  Patching for rsync-3.0.7
.
.
.
===>  Faking installation for rsync-3.0.7
install -d -o root -g bin -m 755 
/usr/ports/pobj/rsync-3.0.7/fake-i386/usr/local/share/doc/rsync
install -c -s -o root -g bin -m 555 
/usr/ports/pobj/rsync-3.0.7/rsync-3.0.7/rsync 
/usr/ports/pobj/rsync-3.0.7/fake-i386/usr/local/bin
install -c -o root -g bin -m 444 
/usr/ports/pobj/rsync-3.0.7/rsync-3.0.7/rsync.1 
/usr/ports/pobj/rsync-3.0.7/fake-i386/usr/local/man/man1
install -c -o root -g bin -m 444 
/usr/ports/pobj/rsync-3.0.7/rsync-3.0.7/rsyncd.conf.5 
/usr/ports/pobj/rsync-3.0.7/fake-i386/usr/local/man/man5
install -c -o root -g bin -m 444 
/usr/ports/pobj/rsync-3.0.7/rsync-3.0.7/tech_report.tex 
/usr/ports/pobj/rsync-3.0.7/fake-i386/usr/local/share/doc/rsync
===>  Building package for rsync-3.0.7
Create /usr/ports/packages/i386/all/rsync-3.0.7.tgz
Link to /usr/ports/packages/i386/ftp/rsync-3.0.7.tgz
Link to /usr/ports/packages/i386/cdrom/rsync-3.0.7.tgz
#

After installing rsync, I went back to rsnapshot and it has the same behavior 
as rsync does above, that is make install fails, while make package works.  
Though an install of subsequent package fails, but due to a problem with what 
appears to be a missed dependency.   While that error needs to be cleaned up, 
I'm focusing on the bigger issue.

# pkg_add /usr/ports/packages/i386/all/rsnapshot-1.3.1p0.tgz                    
                                                                    
Can't find p5-Lchown-1.01
--- p5-Lchown-1.01 -------------------
Can't install p5-Lchown-1.01: not found
Can't use string ("p5-Lchown-1.01") as a HASH ref while "strict refs" in use at 
/usr/libdata/perl5/OpenBSD/PkgAdd.pm line 883.
# 


-Chad



Reply via email to