Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262892 - sci-mathematics/octave-3.0.3 USE=sparse compile error (const *char) w/ fix
Summary: sci-mathematics/octave-3.0.3 USE=sparse compile error (const *char) w/ fix
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 10:10 UTC by Peter Gantner (a.k.a. nephros)
Modified: 2009-07-08 01:54 UTC (History)
2 users (show)

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


Attachments
octave-3.0.3-sparse-fix.patch: sparse fix for 3.0.3 (octave-3.0.3-sparse-fix.patch,1.85 KB, patch)
2009-03-18 10:10 UTC, Peter Gantner (a.k.a. nephros)
Details | Diff
emerge log showing the error (20090318-080715.log,60.37 KB, text/plain)
2009-03-18 10:13 UTC, Peter Gantner (a.k.a. nephros)
Details
emerge --info (emerge.info,4.14 KB, text/plain)
2009-03-18 10:14 UTC, Peter Gantner (a.k.a. nephros)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Gantner (a.k.a. nephros) 2009-03-18 10:10:04 UTC
+++ This bug was initially created as a clone of Bug #245707 +++

trying to compile:
sci-mathematics/octave-3.0.3  USE="curl doc fftw hdf5 readline sparse* zlib -debug -emacs -xemacs"

fails with this (I have MAKEOPTS="-s", sorry for that):

mkdir pic
touch stmp-pic
CSparse.cc: In member function ‘ComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const Matrix&, octave_idx_type&, double&, void (*)(double), bool) const’:
CSparse.cc:5769: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’
CSparse.cc: In member function ‘SparseComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const SparseMatrix&, octave_idx_type&, double&, void (*)(double), bool) co
nst’:
CSparse.cc:6012: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’
CSparse.cc: In member function ‘ComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const ComplexMatrix&, octave_idx_type&, double&, void (*)(double), bool) const’:
CSparse.cc:6303: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’
CSparse.cc: In member function ‘SparseComplexMatrix SparseComplexMatrix::fsolve(MatrixType&, const SparseComplexMatrix&, octave_idx_type&, double&, void (*)(double), b
ool) const’:
CSparse.cc:6525: error: invalid conversion from ‘void (*)(int, char*, int, char*)’ to ‘void (*)(int, const char*, int, const char*)’

Google found these wrt to that error:
http://www.nabble.com/Re:-Octave-3.0.3-and-GCC-4.4-p22174693.html
http://hg.tw-math.de/release-3-0-x/rev/712d9e045b1e

So I included a slightly modified version of the patch here:
http://hg.tw-math.de/release-3-0-x/rev/712d9e045b1e

to make it compile again.

ebuild change is simply (not sure about the if use bracketing, could omit it I guess):
--- portage/sci-mathematics/octave/octave-3.0.3.ebuild     2009-03-04 22:37:25.000000000 +0100
+++ overlay/sci-mathematics/octave/octave-3.0.3.ebuild     2009-03-18 09:46:30.695456738 +0100
@@ -50,6 +50,9 @@
        epatch "${FILESDIR}"/${P}-test-fix.patch
        epatch "${FILESDIR}"/${PN}-3.0.1-fix_handle_for_plotyy.patch
        epatch "${FILESDIR}"/${PN}-3.0.1-no_helvetica.patch
+       if use sparse ; then
+               epatch "${FILESDIR}"/${P}-sparse-fix.patch
+       fi
 }

 src_compile() {

I'll attach the patch and log files below.
Comment 1 Peter Gantner (a.k.a. nephros) 2009-03-18 10:10:58 UTC
Created attachment 185395 [details, diff]
octave-3.0.3-sparse-fix.patch: sparse fix for 3.0.3
Comment 2 Peter Gantner (a.k.a. nephros) 2009-03-18 10:13:26 UTC
Created attachment 185400 [details]
emerge log showing the error
Comment 3 Peter Gantner (a.k.a. nephros) 2009-03-18 10:14:17 UTC
Created attachment 185401 [details]
emerge --info
Comment 4 Alexander Bezrukov 2009-04-12 13:44:23 UTC
I can confirm correctness of the fix (done myself exactly the same, then discovered this bug).

Please include this patch into next octave ebuild revision as "USE=sparse" is very important for many uses of octave.
Comment 5 Alexander Bezrukov 2009-06-03 10:21:08 UTC
Hello, any news?
Comment 6 Some stupid real name 2009-06-22 03:42:02 UTC
(In reply to comment #5)
Patch works for me, and PLEASE add it to portage quickly or cause tons of duplicate bugs reports. :)

Comment 7 Peter Gantner (a.k.a. nephros) 2009-06-22 07:10:25 UTC
This was fixed in later releases.

#264757 is the version bump request bug, once octave is at 3.0.5 or even 3.2 this here can be closed.
Comment 8 Markus Dittrich (RETIRED) gentoo-dev 2009-07-08 01:54:13 UTC
This should be fixed in octave-3.2 which just hit the tree. Please re-open
if the problem persists.

Thanks,
Markus