Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#35383 - [octave] including mex.h does not work with g++ 4.8

Attached to Project: Arch Linux
Opened by Clemens Buchacher (drizzd) - Monday, 20 May 2013, 14:55 GMT
Last edited by Ronald van Haren (pressh) - Tuesday, 04 June 2013, 06:33 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

From the upstream bug report https://savannah.gnu.org/bugs/?38746 :

When including mex.h from a C++ source file, and compiling with G++ 4.8, the compilation crashes.

Despite available patches, this bug report has not received any attention from upstream for several weeks. When asking about support for g++ 4.8 on the mailing list I also got no reply. I doubt that this will ever be fixed any time soon, and will probably be an issue still with the next major release.

I therefore suggest applying the patch attached to the bug report. Otherwise Arch users will remain unable to use C++ mex files with Octave.

Additional info:

octave 3.6.4-1
gcc 4.8.0-4

Steps to reproduce:

$ cat >mex_empty.cpp <<EOF
#include "mex.h"
void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {}
EOF
$ octave --eval 'mex mex_empty.cpp'
In file included from /usr/include/octave-3.6.4/octave/mexproto.h:52:0,
from /usr/include/octave-3.6.4/octave/mex.h:77,
from mex_empty.cpp:1:
/usr/include/c++/4.8.0/cstdlib: In function ‘long long int std::abs(long long int)’:
/usr/include/c++/4.8.0/cstdlib:174:20: error: declaration of C function ‘long long int std::abs(long long int)’ conflicts with
abs(long long __x) { return __builtin_llabs (__x); }
^
/usr/include/c++/4.8.0/cstdlib:166:3: error: previous declaration ‘long int std::abs(long int)’ here
abs(long __i) { return __builtin_labs(__i); }
^
[...]
This task depends upon

Closed by  Ronald van Haren (pressh)
Tuesday, 04 June 2013, 06:33 GMT
Reason for closing:  Implemented
Additional comments about closing:  3.6.4-2
Comment by Michel (xantares) - Monday, 03 June 2013, 07:27 GMT
Hi,
I stepped on this one too,

It has since been fixed upstream:
http://hg.savannah.gnu.org/hgweb/octave/rev/122d3f62e179

Can it be included ?

Regards,
x.
Comment by Ronald van Haren (pressh) - Monday, 03 June 2013, 11:27 GMT
Yes, I just have to upload and push it to the repos when I'm home.

Loading...