Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72066 - nettop fails to build, installs anyway (patch inside)
Summary: nettop fails to build, installs anyway (patch inside)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-22 05:57 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2004-11-22 09:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2004-11-22 05:57:58 UTC
When compiling nettop, the make phase fails with the following:

nettop.c: In function `main':
nettop.c:219: warning: use of cast expressions as lvalues is deprecated
nettop.c:219: warning: use of cast expressions as lvalues is deprecated
nettop.c:224: warning: use of cast expressions as lvalues is deprecated
nettop.c:224: warning: use of cast expressions as lvalues is deprecated
nettop.c:229: warning: use of cast expressions as lvalues is deprecated
nettop.c:229: warning: use of cast expressions as lvalues is deprecated
nettop.c:234: warning: use of cast expressions as lvalues is deprecated
nettop.c:234: warning: use of cast expressions as lvalues is deprecated
nettop.c: In function `ts_run':
nettop.c:364: error: label at end of compound statement
make: *** [nettop.o] Error 1

A quick googling hints at the warnings being caused by newer gcc (>=3.3.3) versions, which deprecate certain typecasts.

The error is also caused by a stricter gcc, adding a break fixes this:

--- nettop.corig        2004-11-22 14:52:16.722176214 +0100
+++ nettop.c    2004-11-22 14:51:37.370640962 +0100
@@ -361,6 +361,7 @@
                                }
                                break;
                        default:
+                       break;
                        }
                }
        }




Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Despite the original error above the ebuild happily continues installing non-
existing files:

[SNIP]
>>> Install nettop-0.2.3 into /var/tmp/portage/nettop-0.2.3/image/ category net-
analyzer
>>> dosbin: making nettop executable...
install: cannot stat `nettop': No such file or directory
man:
prepallstrip:
strip:
>>> Completed installing into /var/tmp/portage/nettop-0.2.3/image/

>>> Merging net-analyzer/nettop-0.2.3 to /
--- /usr/
--- /usr/sbin/
--- /usr/share/
--- /usr/share/doc/
--- /usr/share/doc/nettop-0.2.3/
>>> /usr/share/doc/nettop-0.2.3/README.gz
>>> /usr/share/doc/nettop-0.2.3/THANKS.gz
>>> /usr/share/doc/nettop-0.2.3/ChangeLog.gz
>>> Safely unmerging already-installed instance...
[SNIP]

fix here is to use "emake || die" instead of just emake in src_compile().

Ebuild incorporating these minor fixes will follow ASAP.
Comment 1 Eldad Zack (RETIRED) gentoo-dev 2004-11-22 09:08:56 UTC
can you attach the patch for nettop.c ?

(no need to attach an ebuild. I've fixed it to die on failed emake)
Comment 2 Eldad Zack (RETIRED) gentoo-dev 2004-11-22 09:18:08 UTC
fixed in portage.
Comment 3 Eldad Zack (RETIRED) gentoo-dev 2004-11-22 09:18:21 UTC
closing