Bug 8806

Summary: gnuplot not building wxt terminal because of problem with configure
Product: Mageia Reporter: Konrad Bernlöhr <Konrad.Bernloehr>
Component: RPM PackagesAssignee: Olivier Thauvin <nanardon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Normal CC: cjw
Version: Cauldron   
Target Milestone: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Source RPM: gnuplot CVE:
Status comment:
Attachments: Possible solution to configure gnuplot with usable C++ compiler

Description Konrad Bernlöhr 2013-01-24 17:35:01 CET
Created attachment 3430 [details]
Possible solution to configure gnuplot with usable C++ compiler

The gnuplot package is built without support for the wxt package.

Reproducing that here from gnuplot-4.6.1-3.mga3.src.rpm shows that
configure claims that there is no C++ compiler installed.
Actually this results from the %configure2_5x macro in the .spec
file expanding to

./configure --build=x86_64-mageia-linux-gnu ...

without a matching --host=x86_64-mageia-linux-gnu
but configure (line 37 in configure.in) checks
if test "${build}" != "${host}"
and sets CXX to a bad value if they don't match 
(for cross-compilation, I guess).

A possible solution affecting only the gnuplot package
(rather than including a matching --host=... definition
in general in the Mageia %configure2_5x macro) would be to
add 
    --host=`uname -m`-mageia-linux-gnu
to the %configure2_5x lines in the gnuplot.spec file
(lines 94 and 104). See patch attached.
There may be more elegant solutions than that - like
fixing configure (configure.in).


P.S.:
Unrelated in gnuplot.spec: several Conflicts: lines like
Conflicts:	gnuplot-nox < 4.4.4-3
do not match the current version (and release) numbers.
Manuel Hiebel 2013-01-25 23:47:25 CET

Assignee: bugsquad => nanardon
Source RPM: (none) => gnuplot

Comment 1 Christiaan Welvaart 2013-01-26 22:40:13 CET
Should be fixed with gnuplot-4.6.1-4.mga3 .

My (not really current) autoconf documentation says that cross compilation mode is activated when --host is set, so it is probably not a very good idea to set it in a spec file. Instead I added a test for empty $host in configure.in. This should match autoconf behavior.


gnuplot and gnuplot-nox don't have file conflicts, so the conflicts are really only for those old versions. The gnuplot package actually requires gnuplot-nox now.

CC: (none) => cjw

Comment 2 Konrad Bernlöhr 2013-01-29 15:47:06 CET
Indeed, the change to configure.in looks like the better solution.
Problem solved with gnuplot-4.6.1-4.mga3. Thanks.

Status: NEW => RESOLVED
Resolution: (none) => FIXED