Package Details: tcptrack 1.4.3-2

Git Clone URL: https://aur.archlinux.org/tcptrack.git (read-only, click to copy)
Package Base: tcptrack
Description: A sniffer which displays information about TCP connections it sees on a network interface
Upstream URL: https://github.com/bchretien/tcptrack
Licenses: GPL-2.1
Submitter: bchretien
Maintainer: envolution
Last Packager: envolution
Votes: 21
Popularity: 1.00
First Submitted: 2016-02-11 13:13 (UTC)
Last Updated: 2024-12-03 12:34 (UTC)

Dependencies (1)

Required by (0)

Sources (2)

Latest Comments

envolution commented on 2024-12-03 15:17 (UTC)

@zoltix - i believe your error was fixed today

zoltix commented on 2024-06-22 15:11 (UTC) (edited on 2024-06-22 15:12 (UTC) by zoltix)

I have an issue and could you take a look ? - command yay -S tcptrack - Error :

==> Starting build()...
make  all-recursive
make[1]: Entering directory '/home/lli/.cache/yay/tcptrack/src/tcptrack-1.4.3'
Making all in src
make[2]: Entering directory '/home/lli/.cache/yay/tcptrack/src/tcptrack-1.4.3/src'
g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wno-deprecated -Wall -g -O2 -MT Collector.o -MD -MP -MF .deps/Collector.Tpo -c -o Collector.o Collector.cc
mv -f .deps/Collector.Tpo .deps/Collector.Po
g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wno-deprecated -Wall -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.cc
mv -f .deps/main.Tpo .deps/main.Po
g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wno-deprecated -Wall -g -O2 -MT TCContainer.o -MD -MP -MF .deps/TCContainer.Tpo -c -o TCContainer.o TCContainer.cc
mv -f .deps/TCContainer.Tpo .deps/TCContainer.Po
g++ -DHAVE_CONFIG_H -I. -I..    -Werror -Wno-deprecated -Wall -g -O2 -MT TextUI.o -MD -MP -MF .deps/TextUI.Tpo -c -o TextUI.o TextUI.cc
TextUI.cc: In member function ‘void TextUI::drawui()’:
TextUI.cc:312:34: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  312 |                         printw("%ds",ic->getIdleSeconds());
      |                                 ~^   ~~~~~~~~~~~~~~~~~~~~
      |                                  |                     |
      |                                  int                   time_t {aka long int}
      |                                 %ld
TextUI.cc:314:34: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  314 |                         printw("%dm",ic->getIdleSeconds()/60);
      |                                 ~^   ~~~~~~~~~~~~~~~~~~~~~~~
      |                                  |                       |
      |                                  int                     time_t {aka long int}
      |                                 %ld
TextUI.cc:316:34: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘time_t’ {aka ‘long int’} [-Werror=format=]
  316 |                         printw("%dh",ic->getIdleSeconds()/3600);
      |                                 ~^   ~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  |                       |
      |                                  int                     time_t {aka long int}
      |                                 %ld
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:319: TextUI.o] Error 1
make[2]: Leaving directory '/home/lli/.cache/yay/tcptrack/src/tcptrack-1.4.3/src'
make[1]: *** [Makefile:258: all-recursive] Error 1
make[1]: Leaving directory '/home/lli/.cache/yay/tcptrack/src/tcptrack-1.4.3'
make: *** [Makefile:196: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: tcptrack-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
tcptrack - exit status 4

Da_Coynul commented on 2022-12-15 16:31 (UTC) (edited on 2022-12-15 16:40 (UTC) by Da_Coynul)


From 1da89bc566798c2d55ff0aaf5bdc5dcf08a68871 Mon Sep 17 00:00:00 2001
From: jonathan <jonathan@noreply.localhost>
Date: Thu, 15 Dec 2022 11:27:41 -0500
Subject: [PATCH] Update 'PKGBUILD'

From https://stackoverflow.com/questions/12875571/format-d-expects-argument-of-type-int-but-argument-2-has-type-size-t-w

"strlen(3) returns size_t. Use %zu to print it"

---
 PKGBUILD | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PKGBUILD b/PKGBUILD
index a91b4e5..4aeaa2f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,6 +12,9 @@ sha256sums=('8725205ecbeddc3f891e3345e70f150d87705b099eafd8780f4739ab14f8c862')
 prepare() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   ./configure --prefix=/usr
+  sed -i 's/%ds/%zus/' src/TextUI.cc
+  sed -i 's/%dm/%zum/' src/TextUI.cc
+  sed -i 's/%dh/%zuh/' src/TextUI.cc
 }

 build() {

df8oe commented on 2022-01-24 11:43 (UTC)

Does not build because of "all warnings are treted as errors"...