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

Bug 226655

Summary: net-firewall/conntrack-tools-0.9.7 compile fails with PATH_MAX undeclared
Product: Gentoo Linux Reporter: Adrian Bassett <Adrian.Bassett>
Component: Current packagesAssignee: Cédric Krier <cedk>
Status: RESOLVED FIXED    
Severity: normal CC: bsd, netmon
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 198121    
Attachments: Temporary fix for PATH_MAX
New patch with INT_MAX support

Description Adrian Bassett 2008-06-14 14:17:53 UTC
With glibc-2.8 and gcc-4.3.1 conntrack-tools-0.9.7 fails with PATH_MAX undeclared:

...
creating libct_proto_icmpv6.la
(cd .libs && rm -f libct_proto_icmpv6.la && ln -s ../libct_proto_icmpv6.la libct_proto_icmpv6.la)
Making all in src
main.c: In function 'main':
main.c:81: error: 'PATH_MAX' undeclared (first use in this function)
main.c:81: error: (Each undeclared identifier is reported only once
main.c:81: error: for each function it appears in.)
main.c:81: error: empty scalar initializer
main.c:81: error: (near initialization for 'config_file')
main.c:81: warning: unused variable 'config_file'
make[1]: *** [main.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all-recursive] Error 1

# emerge -pv conntrack-tools
[ebuild  N    ] net-firewall/conntrack-tools-0.9.7

# emerge -pv glibc
[ebuild   R   ] sys-libs/glibc-2.8_p20080602  USE="gd glibc-omitfp nls -debug -glibc-compat20 (-hardened) (-multilib) -profile (-selinux) -vanilla"

# emerge -pv gcc      
[ebuild   R   ] sys-devel/gcc-4.3.1  USE="fortran gcj gtk multislot nls objc objc++ objc-gc openmp (-altivec) -bootstrap -build -doc (-hardened) -ip28 -ip32r10k -libffi -mudflap (-multilib) (-n32) (-n64) -nocxx -test -vanilla"

# emerge -pv linux-headers
[ebuild   R   ] sys-kernel/linux-headers-2.6.25-r4

# emerge -pv vanilla-sources
[ebuild   R   ] sys-kernel/vanilla-sources-2.6.26_rc6  USE="-build -symlink"





Reproducible: Always

Steps to Reproduce:
1.emerge conntrack-tools
2.
3.

Actual Results:  
Compilation fails as described.

Expected Results:  
Successful build.
Comment 1 Chí-Thanh Christopher Nguyễn gentoo-dev 2008-06-14 15:44:41 UTC
this is a glibc-2.8 problem and should block bug 225459
Comment 2 Bandan 2008-06-14 16:01:54 UTC
Created attachment 156757 [details, diff]
Temporary fix for PATH_MAX

This should fix it.
Comment 3 Cédric Krier gentoo-dev 2008-06-14 16:41:39 UTC
Fix in cvs
Thanks.
Comment 4 Adrian Bassett 2008-06-14 18:29:25 UTC
(In reply to comment #3)
> Fix in cvs
> Thanks.
> 

Well, it get's us a bit further but the compile then fails at ignore_pool.c:70:

ignore_pool.c: In function 'ignore_pool_create':
ignore_pool.c:70: error: 'INT_MAX' undeclared (first use in this function)
ignore_pool.c:70: error: (Each undeclared identifier is reported only once
ignore_pool.c:70: error: for each function it appears in.)
make[1]: *** [ignore_pool.o] Error 1
make[1]: Leaving directory `/tmp_portage/portage/net-firewall/conntrack-tools-0.9.7/work/conntrack-tools-0.9.7/src'

INT_MAX is defined in /usr/include/limits.h and the following patch fixes things (needs re-working before incorporating in ebuild):

diff -u ignore_pool.c.dist ignore_pool.c
--- ignore_pool.c.dist	2008-06-14 19:23:14.603919857 +0100
+++ ignore_pool.c	2008-06-14 19:21:45.347920202 +0100
@@ -16,6 +16,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <limits.h>
 #include "ignore.h"
 #include "jhash.h"
 #include "hash.h"

Thanks.

Comment 5 Cédric Krier gentoo-dev 2008-06-14 18:39:59 UTC
Reopen
Comment 6 Cédric Krier gentoo-dev 2008-06-14 18:42:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Fix in cvs
> > Thanks.
> > 
> 
> Well, it get's us a bit further but the compile then fails at ignore_pool.c:70:
> 
> INT_MAX is defined in /usr/include/limits.h and the following patch fixes
> things (needs re-working before incorporating in ebuild):
> 

Is it compile completely with this patch? 
Comment 7 Adrian Bassett 2008-06-14 18:48:05 UTC
> Is it compile completely with this patch? 

It does.

Comment 8 Bandan 2008-06-14 18:51:10 UTC
Created attachment 156769 [details, diff]
New patch with INT_MAX support

Included limits.h if INT_MAX isn't defined. Should compile fine now.
Comment 9 Cédric Krier gentoo-dev 2008-06-14 19:21:09 UTC
Fix in cvs
Comment 10 Adrian Bassett 2008-06-15 09:29:58 UTC
(In reply to comment #9)
> Fix in cvs
> 

Have re-installed from the net-firewall/conntrack-tools-0.9.7-r2 ebuild and it all compiles fine now.

Thanks.