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

Bug 296964

Summary: Patch dev-libs/gmp-4.3.1 to build with Clang
Product: Gentoo Linux Reporter: Andrew Jeffery <andrew>
Component: New packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix the configure ANSI compiler check
New ebuild for ANSI check patch

Description Andrew Jeffery 2009-12-14 23:24:04 UTC
I've been playing around trying to build the system set with Clang[1]. dev-libs/gmp fails a configure check out of the box causing it not to build. The build error is related to converting the source using ansi2knr; the call to ansi2knr is missing in the commandline, making the build fail. The configure check controlling ansi/knr compile modes is failing due to some over-eager style checks by clang, erroring on the main function signature (argv is declared char *argv, not char **argv).

[1] http://clang.llvm.org/

Reproducible: Always

Steps to Reproduce:
1. $ CC=/path/to/clang emerge -av --oneshot dev-libs/gmp
Actual Results:  
libgmp fails to build, with a bad command for ansi2knr conversion.

Expected Results:  
libgmp to be built and installed successfully

Patch and a new ebuild to fix this are attached. Note the patch doesn't address the missing call the ansi2knr, it instead fixes the configure script to make clang pass the ANSI test.
Comment 1 Andrew Jeffery 2009-12-14 23:25:22 UTC
Created attachment 213047 [details, diff]
Fix the configure ANSI compiler check
Comment 2 Andrew Jeffery 2009-12-14 23:28:46 UTC
Created attachment 213049 [details]
New ebuild for ANSI check patch
Comment 3 SpanKY gentoo-dev 2009-12-15 11:14:32 UTC
the real bug is lack of quoting in acinclude.m4.  it tries to use *argv[], but the [] is consumed by m4.

gmp upstream has fixed this already in their mercurial repo:
http://gmplib.org:8000/gmp/rev/43784518850d

when posting ebuilds, please attach diffs and not entire files

http://sources.gentoo.org/dev-libs/gmp/gmp-4.3.1.ebuild?r1=1.9&r2=1.10