Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 260481

Summary: net-firewall/ipset-2.4.[8-9] gethostbyname alignment issue
Product: Gentoo Linux Reporter: Antixrict <antixrict>
Component: New packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: antixrict, hppa, pva
Priority: High    
Version: unspecified   
Hardware: HPPA   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 371525    
Attachments: debug logs
debug logs
test ebuild for ipset 2.4.9
patch for ipset.c
new patch from netfilter.org

Description Antixrict 2009-02-27 09:51:37 UTC
When i compile ipset 2.4.8 and i have 2.4.9 ebuild but problem the same. Problem in ipset.c.



Reproducible: Always

Steps to Reproduce:
1. emerge =net-firewall/ipset-2.4.8
2.
3.

Actual Results:  
cc -O2 -Wall -Wextra -Waggregate-return -Wbad-function-cast -Wcast-align -Wformat=2 -Wfloat-equal -Winit-self -Winline -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked -Wredundant-decls -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch-default -Wswitch-enum -Wundef -Wwrite-strings -Wno-missing-field-initializers -Werror -Ikernel/include -I.  -DIPSET_VERSION=\"2.4.9\" -DIPSET_LIB_DIR=\"/usr/local/lib/ipset\" -c -o ipset.o ipset.c
cc1: warnings being treated as errors
ipset.c: In function 'parse_ip':
ipset.c:628: warning: cast increases required alignment of target type
make: *** [ipset.o] Error 1




I try compile with many gcc options, and 2 version gcc and glibc testing, result the same. ipset.c can't compile. But ofcourse if i comment that function all compile ok...

Portage 2.1.6.7 (default/linux/hppa/2008.0, gcc-4.2.4, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r2 parisc)
=================================================================
System uname: Linux-2.6.28-gentoo-r2-parisc-PA8600_-PCX-W+-with-glibc2.2
Timestamp of tree: Fri, 27 Feb 2009 02:45:02 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.63
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="hppa"
CBUILD="hppa2.0-unknown-linux-gnu"
CFLAGS="-O2 -pipe -mschedule=8000 -march=2.0"
CHOST="hppa2.0-unknown-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -mschedule=8000 -march=2.0"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.tups.lv/source/ http://ftp.linux.ee/pub/gentoo/distfiles/"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="apache2 bash-completion berkdb bzip2 cli cracklib crypt cups firefox fontconfig foomaticdb fortran gd gdbm gif gpm hardenedphp hppa iconv imlib isdnlog jbig jpeg libwww midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre pear perl php png pppd python readline reflection session spell spl ssl sysfs tcpd tiff truetype unicode xml xml2 xorg xulrunner zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Peter Volkov (RETIRED) gentoo-dev 2009-02-27 10:23:04 UTC
Please, attach full build.log. Also as I see there is no ebuild for ipset-2.4.9 and ipset-2.4.8 has all -W options disabled so I don't get what you are talking about...
Comment 2 Antixrict 2009-02-27 13:52:35 UTC
Ok. i attached that. Yes i can compile 2.4.8 because all warnings are off, but i can't load some modules after install - example : ipt_set and ipt_SET.
Debug:
 gcc-4.2.4-r1
 modprobe ipt_set ... Unknown symbol in module, or unknown parameter 
dmesg:
ipt_SET: Unknown symbol ip_set_put_byindex
ipt_set: Unknown symbol ip_set_put_byindex
 
I also attache ebuild for 2.4.9 (it's my test ebuild ofcourse) and logs for that. 

I can compile without any problem at that moment with gcc-4.1.2 and glibc-2.9_p20081201-r2
Then 2.4.8 works correctly.

Comment 3 Antixrict 2009-02-27 13:53:45 UTC
Created attachment 183364 [details]
debug logs
Comment 4 Antixrict 2009-02-27 13:54:04 UTC
Created attachment 183365 [details]
debug logs
Comment 5 Antixrict 2009-02-27 13:54:43 UTC
Created attachment 183367 [details]
test ebuild for ipset 2.4.9
Comment 6 Antixrict 2009-02-27 21:22:21 UTC
Created attachment 183412 [details, diff]
patch for ipset.c 

It's small patch and after patching all compiling done successful with all errors on. I compile it with gcc-4.1.2.
Comment 7 Antixrict 2009-02-27 21:23:23 UTC
Comment on attachment 183367 [details]
test ebuild for ipset 2.4.9

ebuild don't work correctly and don't use it.
Comment 8 Jeroen Roovers (RETIRED) gentoo-dev 2009-02-28 13:40:14 UTC
*** Bug 260483 has been marked as a duplicate of this bug. ***
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2009-02-28 14:04:59 UTC
> Yes i can compile 2.4.8 because all warnings are off, but
> i can't load some modules after install - example : ipt_set and ipt_SET.
> Debug:
>  gcc-4.2.4-r1
>  modprobe ipt_set ... Unknown symbol in module, or unknown parameter 
> dmesg:
> ipt_SET: Unknown symbol ip_set_put_byindex
> ipt_set: Unknown symbol ip_set_put_byindex

What happens if you ran depmod -a? Also provide full build log for the modules build.

> I can compile without any problem at that moment with gcc-4.1.2 and
> glibc-2.9_p20081201-r2. Then 2.4.8 works correctly.

You mean if you build with older compiler it works right?... Or why did you mention glibc version here?

(In reply to comment #6)
> Created an attachment (id=183412) [edit]
> patch for ipset.c 

What bug it fixes? Also I don't get why you need to + 0. any number + 0 == any number so this patch looks like fixing nothing...

(In reply to comment #7)
> (From update of attachment 183367 [details] [edit])
> ebuild don't work correctly and don't use it.

What's broken with that?

Sorry you are posting many different issues to this bug so I'm not quite following what you did and what you got. The only problem I see is modprobe issue with gcc-4.2.4 and it looks like compiler issue. Have you tried with newer compiler too?
Comment 10 Peter Volkov (RETIRED) gentoo-dev 2009-03-02 12:26:48 UTC
Without additional information I don't know what to do here.
Comment 11 Antixrict 2009-03-03 12:05:39 UTC
(In reply to comment #9)
> > Yes i can compile 2.4.8 because all warnings are off, but
> > i can't load some modules after install - example : ipt_set and ipt_SET.
> > Debug:
> >  gcc-4.2.4-r1
> >  modprobe ipt_set ... Unknown symbol in module, or unknown parameter 
> > dmesg:
> > ipt_SET: Unknown symbol ip_set_put_byindex
> > ipt_set: Unknown symbol ip_set_put_byindex
> 
> What happens if you ran depmod -a? Also provide full build log for the modules
> build.
i test that also tha same messages.

> 
> > I can compile without any problem at that moment with gcc-4.1.2 and
> > glibc-2.9_p20081201-r2. Then 2.4.8 works correctly.
> 
> You mean if you build with older compiler it works right?... Or why did you
> mention glibc version here?
yes i men with older gcc version all ok. glibc i don't know maybe also, i only post that i compile with that version of glibc.
> 
> (In reply to comment #6)
> > Created an attachment (id=183412) [edit]
> > patch for ipset.c 
> 
> What bug it fixes? Also I don't get why you need to + 0. any number + 0 == any
> number so this patch looks like fixing nothing...

it's fixing :) you can't compile 2.4.9 version ipset on hppa without that "+0" and 2.4.8 compiling because there all warning off. 
 
> Sorry you are posting many different issues to this bug so I'm not quite
> following what you did and what you got. The only problem I see is modprobe
> issue with gcc-4.2.4 and it looks like compiler issue. Have you tried with
> newer compiler too?

no 4.3 i don't test but i can do that i post.
 

Comment 12 Antixrict 2009-03-03 12:12:45 UTC
Created attachment 183759 [details, diff]
new patch from netfilter.org

It's moree correct patch from netfilter.org http://bugzilla.netfilter.org/show_bug.cgi?id=582
Comment 13 Peter Volkov (RETIRED) gentoo-dev 2009-03-03 13:10:58 UTC
Thank you for feedback. I'll apply patch from upstream...
Comment 14 Peter Volkov (RETIRED) gentoo-dev 2009-03-03 13:16:03 UTC
Patch applied in ipset-2.4.9-r1. Thank you for report. Fixed.