Bug 227865 - sysutils/apachetop: Fails to build when ADNS=on (or adns is installed, even when ADNS=off)
Summary: sysutils/apachetop: Fails to build when ADNS=on (or adns is installed, even w...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
: 230737 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-04-30 07:24 UTC by Thomas-Henning von Kamptz
Modified: 2018-12-18 22:04 UTC (History)
7 users (show)

See Also:
lukasz: maintainer-feedback+


Attachments
Fixes compile (346 bytes, patch)
2018-08-26 05:35 UTC, Nathan
no flags Details | Diff
Removed patches and fixes build (9.79 KB, patch)
2018-08-27 13:27 UTC, Nathan
no flags Details | Diff
Fix compile; Fix mis-spelled word (12.92 KB, patch)
2018-08-28 11:41 UTC, Nathan
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas-Henning von Kamptz 2018-04-30 07:24:01 UTC
When ADNS is configured in, or even when just adns.h is present build is broken:

source='log.cc' object='log.o' libtool=no  depfile='.deps/log.Po' tmpdepfile='.deps/log.TPo'  depmode=gcc3 /bin/sh ../config/depcomp  c++ -DHAVE_CONFIG_H -I. -I. -I..    -I/usr/local/include -I /usr/local/include  -O2 -pipe -fstack-protector -fno-strict-aliasing -c -o log.o `test -f log.cc || echo './'`log.cc
In file included from log.cc:3:
... [lots of warnings] ...
log.cc:75:8: error: C-style cast from 'nullptr_t' to 'adns_queryflags' is not
      allowed
                            (adns_queryflags) NULL, NULL, b->dns_query);
                            ^~~~~~~~~~~~~~~~~~~~~~
... [more warnings] ...
10 warnings and 1 error generated.
*** Error code 1

Stop.

The following makes the compiler go ahead:
diff -c log.cc log.cc-fixed
*** log.cc      Mon Apr 30 09:12:55 2018
--- log.cc-fixed        Mon Apr 30 09:22:22 2018
***************
*** 72,78 ****
                        /* fire off a query with adns */
                        b->dns_query = new adns_query;
                        adns_submit(adns, ptr, adns_r_a,
!                           (adns_queryflags) NULL, NULL, b->dns_query);
  
                        b->ip_pos = im->insert(RESOLVING_STRING);
                        b->ip_hash = TTHash(RESOLVING_STRING);
--- 72,78 ----
                        /* fire off a query with adns */
                        b->dns_query = new adns_query;
                        adns_submit(adns, ptr, adns_r_a,
!                           (adns_queryflags) 0, NULL, b->dns_query);
  
                        b->ip_pos = im->insert(RESOLVING_STRING);
                        b->ip_hash = TTHash(RESOLVING_STRING);
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-26 04:36:14 UTC
*** Bug 230737 has been marked as a duplicate of this bug. ***
Comment 2 Nathan 2018-08-26 05:35:55 UTC
Created attachment 196553 [details]
Fixes compile
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-27 07:14:49 UTC
(In reply to Nathan from comment #2)

Per our IRC conversation, the existing port patches were added *in favour* of and *instead* of using -cxxstd [1].

*if* CXXSTD is going to be used, the existing patches that fix those errors should removed, OR, the rest of the sources should be patched so that the cxxstd is not required, as provided in comment 0, and should be sent upstream.

[1] ports r460880
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2018-08-27 07:15:56 UTC
See bug 225649 comment 2
Comment 5 Nathan 2018-08-27 13:01:37 UTC
(In reply to Kubilay Kocak from comment #4)
Weird I thought I deleted them but will take care of
Comment 6 Nathan 2018-08-27 13:27:36 UTC
Created attachment 196595 [details]
Removed patches and fixes build
Comment 7 Alexey Dokuchaev freebsd_committer 2018-08-28 06:05:01 UTC
There's also a typo (PCRE_CO*FN*IGURE), however, I don't see why we would fallback to C++98 rather than fix the sloppy code and push the changes upstream.
Comment 8 Nathan 2018-08-28 11:35:34 UTC
(In reply to Alexey Dokuchaev from comment #7)
I am no programmer but got it fixed without the cxx98
Comment 9 Nathan 2018-08-28 11:41:22 UTC
Created attachment 196637 [details]
Fix compile; Fix mis-spelled word
Comment 10 Lukasz Wasikowski 2018-08-28 11:51:24 UTC
(In reply to Alexey Dokuchaev from comment #7)

There is no active upstream, at least the original one. I think that apachetop is now developed here: https://github.com/tessus/apachetop/ and contains some fixes and improvements. I'll test it and prepare update of this port.
Comment 11 Nathan 2018-08-28 11:53:03 UTC
(In reply to Lukasz Wasikowski from comment #10)
Just uploaded new patch with fixes
Comment 12 Lukasz Wasikowski 2018-08-28 11:55:01 UTC
(In reply to Nathan from comment #11)

Great, thank you.
Comment 13 Lukasz Wasikowski 2018-08-31 23:52:05 UTC
Comment on attachment 196637 [details]
Fix compile; Fix mis-spelled word

It looks good, please commit it.
Comment 14 Kurt Jaeger freebsd_committer 2018-12-18 22:04:13 UTC
Committed, thanks!
Comment 15 commit-hook freebsd_committer 2018-12-18 22:04:44 UTC
A commit references this bug:

Author: pi
Date: Tue Dec 18 22:03:44 UTC 2018
New revision: 487774
URL: https://svnweb.freebsd.org/changeset/ports/487774

Log:
  sysutils/apachetop: update 0.12.6 -> 0.18.4

  - moved to github
  - Fix compile
  - Fix mis-spelled word

  PR:		227865
  Submitted by:	ndowens@yahoo.com
  Reported by:	Thomas-Henning von Kamptz <tomsoft@mac.com>
  Reviewed by:	koobs, danfe
  Approved by:	Lukasz Wasikowski <lukasz@wasikowski.net> (maintainer)

Changes:
  head/sysutils/apachetop/Makefile
  head/sysutils/apachetop/distinfo
  head/sysutils/apachetop/files/patch-apachetop.h
  head/sysutils/apachetop/files/patch-resolver.h
  head/sysutils/apachetop/files/patch-src_apachetop.cc
  head/sysutils/apachetop/files/patch-src_display.cc
  head/sysutils/apachetop/files/patch-src_hits__circle.cc
  head/sysutils/apachetop/files/patch-src_inlines.cc
  head/sysutils/apachetop/files/patch-src_log.cc
  head/sysutils/apachetop/files/patch-src_ohtbl.cc
  head/sysutils/apachetop/pkg-descr