Re: 4.8-release, unable to build any port

2010-12-31 Thread Marc Espie
Have you looked for $ around the place in bsd.port.mk where it says it sees
it ?

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.



Re: 4.8-release, unable to build any port

2010-12-31 Thread Chad M Stewart

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





Re: 4.8-release, unable to build any port

2010-12-31 Thread Chad M Stewart

Off list someone suggested using 'env -i make package' and that worked.  That 
solves my immediate problem.   I'm using ESXi so I can easily create new 
systems for testing, etc..   I did a fresh install from install48.iso and a 
downloaded ports.tar.gz file.  I then 'ssh r...@host' to connect and the 
problem shows up.  I'm saying that something in the default environment for the 
root user is causing the problem.  I'll see if I can figure out what exactly.


-Chad


Re: 4.8-release, unable to build any port

2010-12-31 Thread Chad M Stewart

On Dec 31, 2010, at 1:00 PM, Chad M Stewart wrote:

 
 Off list someone suggested using 'env -i make package' and that worked.  That 
 solves my immediate problem.   I'm using ESXi so I can easily create new 
 systems for testing, etc..   I did a fresh install from install48.iso and a 
 downloaded ports.tar.gz file.  I then 'ssh r...@host' to connect and the 
 problem shows up.  I'm saying that something in the default environment for 
 the root user is causing the problem.  I'll see if I can figure out what 
 exactly.


Once I was looking in the right direction, it didn't take too long.


TERMCAP=vt100|vt100-am:5i:am:bs:ms:xn:xo:co#80:it#8:li#24:vt#3:DO=\E[%dB:LE=\E[%dD:RA=\E[?7l:RI=\E[%dC:SA=\E[?7h:UP=\E[%dA:ac=\140\140aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~:ae=^O:as=^N:bl=^G:cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:do=^J:eA=\E(B\E)0:ho=\E[H:kb=^H:kd=\EOB:ke=\E[?1l\E:kl=\EOD:kr=\EOC:ks=\E[?1h\E=:ku=\EOA:l1=pf1:l2=pf2:l3=pf3:l4=pf4:le=^H:mb=\E[5m:md=\E[1m:me=\E[0m:mr=\E[7m:nd=\E[C:pf=\E[4i:po=\E[5i:ps=\E[0i:rc=\E8:rs=\E\E[?3l\E[?4l\E[?5l\E[?7h\E[?8h:..sa=\E[0%?%p1%p6%|%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;m%?%p9%t\016%e\017%;$2:sc=\E7:se=\E[m:sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:ue=\E[m:up=\E[A:us=\E[4m:k0=\EOy:k5=\EOt:k6=\EOu:k7=\EOv:k8=\EOl:k9=\EOw:k;=\EOx:@8=\EOM:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:K1=\EOq:K2=\EOr:K3=\EOs:K4=\EOp:K5=\EOn:


From root's .profile

if [ -x /usr/bin/tset ]; then
   if [ X$XTERM_VERSION = X ]; then
   eval `/usr/bin/tset -sQ '-munknown:?vt220' $TERM`
   else
   eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM`
   fi
fi

When I connect via ssh from my Mac (using Terminal.app) the problem happens.  
When I login on the console, problem does not show up.  Personally I'm fine 
with commenting out the above and replacing with export TERM=vt100 and in the 
past that is something I've done.  Guess I'll be continuing to do that.  :)


A big thank you to: Ed, Patrick, Marc, Ian, Dan, Mark, and Jacob.  Without your 
thoughts and questions I'd still be wondering.


Thank you,
Chad



Re: 4.8-release, unable to build any port

2010-12-31 Thread Dan Harnett
On Fri, Dec 31, 2010 at 01:19:26PM -0500, Chad M Stewart wrote:
 
 From root's .profile
 
 if [ -x /usr/bin/tset ]; then
if [ X$XTERM_VERSION = X ]; then
eval `/usr/bin/tset -sQ '-munknown:?vt220' $TERM`
else
eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM`
fi
 fi
 

This is reproduceable in -current.

  [d...@m ~] $ export TERM=vt100
  [d...@m ~] $ eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM`
  [d...@m ~] $ cd /usr/ports/net/rsnapshot
  [d...@m /usr/ports/net/rsnapshot] $ make install
  Using $ in a non-suffix rule context is a GNUmake idiom (line 1721 of 
/usr/ports/infrastructure/mk/bsd.port.mk)
  *** Error code 2

  Stop in /usr/ports/net/rsnapshot (line 2232 of 
/usr/ports/infrastructure/mk/bsd.port.mk).


Unsetting TERMCAP allows a port to build.

  [d...@m /usr/ports/net/rsnapshot] $ make clean
  [d...@m /usr/ports/net/rsnapshot] $ unset TERMCAP
  [d...@m /usr/ports/net/rsnapshot] $ make install
  ===  Checking files for rsnapshot-1.3.1p1
  `/home/ports/distfiles/rsnapshot-1.3.1.tar.gz' is up to date.
   (SHA256) rsnapshot-1.3.1.tar.gz: OK
  ===  rsnapshot-1.3.1p1 depends on: rsync-* - found
  ===  rsnapshot-1.3.1p1 depends on: groff-=1.15.4.7p2 - found
  ===  Extracting for rsnapshot-1.3.1p1
  ===  Patching for rsnapshot-1.3.1p1
  ===  Configuring for rsnapshot-1.3.1p1
  [...]

The failure occurs with any TERMCAP entry that uses '$n' terminfo
style delay capabilities (for example: vt100, vt220-old, vt420, etc).
It seems that somewhere it is not being quoted correctly.
 
  [d...@m /usr/ports/net/rsnapshot] $ make show=_TERM_ENV
  Using $ in a non-suffix rule context is a GNUmake idiom (line 3352 of 
/usr/ports/infrastructure/mk/bsd.port.mk)



Re: 4.8-release, unable to build any port

2010-12-30 Thread Mark Solocinski
Do you have anything in /etc/mk.conf? Just a thought.


On Thu, 30 Dec 2010 17:48:04 -0500, Chad M Stewart c...@balius.com wrote:
 Fresh install of 4.8, all sets installed, from install48.iso plus the
 ports.tar.gz from ftp site.  At first I thought this was a problem with
a
 specific port, but alas my testing is showing that no ports will work. 
I'm
 not new to working with ports, but I have not come across this error
 before.  
 
 I tried using 4.8-stable (kernel, userland, and ports) but that gave me
 the same problem.  I can build kernel and userland without a problem. 
 There are zero packages installed on the system.  I've read the FAQ
 regarding ports and I think I have done everything required.  I'm
running
 as root so perms should not be an issue. 
 
 The error indicates to me something with GNUmake but that does not make
 sense either as GNU make is not installed.  I tried to reduce this to as
 basic a system as possible to eliminate as many variables as possible.
 
 Ideas?
 
 
 # pwd
 /usr
 # tar xfz /net/cvs3/pub/OpenBSD/4.8-release/ports.tar.gz  
 # sysctl kern.version   


 kern.version=OpenBSD 4.8 (GENERIC.MP) #359: Mon Aug 16 09:16:26 MDT 2010
 dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC.MP
 
 # cd /usr/ports/net/rsnapshot/  

 
 # 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/rsnapshot (line 2116 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 # head /usr/ports/infrastructure/mk/bsd.port.mk 


 #-*- mode: Makefile; tab-width: 4; -*-
 # ex:ts=4 sw=4 filetype=make:
 #   $OpenBSD: bsd.port.mk,v 1.1026 2010/08/07 19:41:21 espie Exp $
 #   $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
 #   $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
 #
 #   bsd.port.mk - 940820 Jordan K. Hubbard.
 #   This file is in the public domain.
 
 
 and with postfix
 
 # make package 
 === mail/postfix/stable
 ===  Checking files for postfix-2.7.1
 Fetch

ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-2.7.1.tar.gz
 postfix-2.7.1.tar.gz 100%

|**|
  3338 KB00:04
 (SHA256) postfix/postfix-2.7.1.tar.gz: OK
 ===  postfix-2.7.1 depends on: pcre-* - not found
 ===  Verifying install for pcre-* in devel/pcre
 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/devel/pcre (line 2116 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix/stable (line 1765 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix/stable (line 2168 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix/stable (line 1580 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix/stable (line 2136 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix/stable (line 2116 of
 /usr/ports/infrastructure/mk/bsd.port.mk).
 === Exiting mail/postfix/stable with an error
 *** Error code 1
 
 Stop in /usr/ports/mail/postfix (line 135 of
 /usr/ports/infrastructure/mk/bsd.port.subdir.mk).
 # 
 
 
 Thank you,
 Chad

-- 
Regards,

Mark



Re: 4.8-release, unable to build any port

2010-12-30 Thread Jacob Meuser
why aren't you using packages?  I bet you'd be done setting up your
system already.

-- 
jake...@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org



Re: 4.8-release, unable to build any port

2010-12-30 Thread Chad M Stewart

On Dec 30, 2010, at 7:42 PM, Jacob Meuser wrote:

 why aren't you using packages?  I bet you'd be done setting up your
 system already.

Various reasons, but your right using packages would be faster.  This really 
gets me as I've built many ports before, usually very easy to do.  


-Chad


Re: 4.8-release, unable to build any port

2010-12-30 Thread Edd Barrett
On Thu, Dec 30, 2010 at 08:09:54PM -0500, Chad M Stewart wrote:
 Various reasons, but your right using packages would be faster.  This really 
 gets me as I've built many ports before, usually very easy to do.  
 

Have you aliased 'make' to anything?

Checked mk.conf?

Where did you get ports from?

-- 
Best Regards
Edd Barrett

http://www.theunixzoo.co.uk



Re: 4.8-release, unable to build any port

2010-12-30 Thread Chad M Stewart

On Dec 30, 2010, at 8:33 PM, Edd Barrett wrote:

 On Thu, Dec 30, 2010 at 08:09:54PM -0500, Chad M Stewart wrote:
 Various reasons, but your right using packages would be faster.  This really 
 gets me as I've built many ports before, usually very easy to do.  
 
 
 Have you aliased 'make' to anything?

No.
autoload='typeset -fu'
functions='typeset -f'
hash='alias -t'
history='fc -l'
integer='typeset -i'
local=typeset
login='exec login'
nohup='nohup '
r='fc -e -'
stop='kill -STOP'
suspend='kill -STOP $$'
type='whence -v'


 
 Checked mk.conf?

Does not exist.

 
 Where did you get ports from?

I don't recall right now, but to rule that out I grabbed a new copy from a 
mirror I've never used and then

cd /usr
mv ports ports.old  rm -rf ports.old
tar xfz /root/ports.tar.gz

Exact same problem continues, ran a diff -b on both sources of the ports.tar.gz 
file, no differences.  Then grabbed it from a mirror outside of the US, no 
difference from the other two.  The sha is SHA256 (ports.tar.gz) = 
e748cb13a47b1bd6bbafa7f85acc108ebd8a59f4101c5b37570bc327dfe876a9

I've even tried ports from -stable via CVS, same error.  For kicks, I tried 
-current ports (with the rest of the system being -release) and it gives the 
same error.  I didn't expect -current to work, but figured it was worth a try.

I'm at a loss.


-Chad