Bug 166594

Summary: security/dropbear doesn't build on 9-Stable
Product: Ports & Packages Reporter: graham
Component: Individual Port(s)Assignee: Alex Kozlov <ak>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description graham 2012-04-03 00:30:02 UTC
Building security/dropbear port on 9-Stable (as of 2012-03-15) fails with:

cc -O2 -pipe -fno-strict-aliasing -I./libtomcrypt/src/headers/  -I. -I.  -O2 -pipe -fno-strict-aliasing -DDROPBEAR_SERVER -DDROPBEAR_CLIENT   -c -o loginrec.o loginrec.c
loginrec.c:477: warning: 'struct utmp' declared inside parameter list
loginrec.c:477: warning: its scope is only this definition or declaration, which is probably not what you want
loginrec.c:491: warning: 'struct utmp' declared inside parameter list
loginrec.c: In function 'construct_utmp':
loginrec.c:496: error: dereferencing pointer to incomplete type

Full log attached.

It seems that "make config" correctly detects that "struct utmp" is not defined and that "struct utmpx" is defined, but it goes ahead and uses utmp anyway.

Fix: Patch attached with submission follows:
How-To-Repeat: cd /usr/ports/security/dropbear
make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2012-04-03 00:41:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ak

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Alex Kozlov 2012-04-03 02:13:42 UTC
Hi, Graham

I can't reproduce your issue. I tried on live system, local tinderbox,
redports.org (http://redports.org/buildarchive/20120403000923-37693/)
Do You have any nonstandard settings?


--
Adios
Comment 3 graham 2012-04-03 22:25:34 UTC
On 03/04/2012 11:13, Alex Kozlov wrote:
> I can't reproduce your issue. I tried on live system, local tinderbox,
> redports.org (http://redports.org/buildarchive/20120403000923-37693/)
> Do You have any nonstandard settings?
>
Hi Alex,

Thanks for replying.

No, I don't have any non-standard settings. Make.conf and src.conf are 
empty (except for a PERL_VERSION= line). In the dropbear config, I have 
WITH_STATIC set to off.

I have had it happen on two machines. The only thing in common for them 
is that they both use the same csup server. I've done another csup on 
one of them and I'm building world at the moment. After that finishes, 
I'll try building dropbear again and see what happens.

Thanks,
     Graham
Comment 4 Alex Kozlov 2012-04-05 21:31:16 UTC
On Wed, Apr 04, 2012 at 10:48:14AM +1000, Graham Menhennitt wrote:
> Alex,
> 
> This email is not copied to the list because of the attachments.
> 
> I finished my csup and make world. The results are the same as before.
> 
> Attached are the results of the "configure" script from the port's 
> work/dropbear directory. Could you please compare them with yours. I 
> would look at redports and do it myself, but redports seems to be down.
That's one nasty configure script.
Please remove /var/log/wtmp, /var/log/lastlog.
You may also want to do make check-old -C /usr/src; make delete-old -C /usr/src
after major version upgrade.


--
Adios
Comment 5 graham 2012-04-06 05:29:25 UTC
On 06/04/2012 06:31, Alex Kozlov wrote:
> Please remove /var/log/wtmp, /var/log/lastlog. You may also want to do 
> make check-old -C /usr/src; make delete-old -C /usr/src after major 
> version upgrade.

Thanks Alex,

After looking in /usr/src/UPDATING for utmp (as a result of your clues 
above), I did:
     cd /usr/src
     make delete-old delete-old-libs
     rm /var/run/utmp /var/log/lastlog /var/log/wtmp*

Then
     cd /usr/ports/security/dropbear
     make clean
     make
and it built correctly.

Please close this PR.

Thanks for your help,
     Graham
Comment 6 Alex Kozlov 2012-04-06 16:38:56 UTC
On Fri, Apr 06, 2012 at 02:29:25PM +1000, Graham Menhennitt wrote:
> On 06/04/2012 06:31, Alex Kozlov wrote:
> > Please remove /var/log/wtmp, /var/log/lastlog. You may also want to do 
> > make check-old -C /usr/src; make delete-old -C /usr/src after major 
> > version upgrade.
> 
> Thanks Alex,
> 
> After looking in /usr/src/UPDATING for utmp (as a result of your clues 
> above), I did:
>      cd /usr/src
>      make delete-old delete-old-libs
>      rm /var/run/utmp /var/log/lastlog /var/log/wtmp*
> 
> Then
>      cd /usr/ports/security/dropbear
>      make clean
>      make
> and it built correctly.
> 
> Please close this PR.
I will contact the upstream, though. It's bad way to detect utmp.


--
Adios
Comment 7 Alex Kozlov freebsd_committer freebsd_triage 2012-04-06 16:43:06 UTC
State Changed
From-To: open->closed

Closed on submitter request. Thanks!