delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/01/13/06:18:21

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; q=dns; s=default; b=XGXBLf36hzo/JcrEY0iuMnYUfD9hH
Tc1spd3GRLw1gUAidtUGRC+pHfwhBpKWjO+uZ4bWpMm5C2ZzoE7ooy+OX/++8eMd
s7U5gokI29NGLqWCi5ahmw9GcGnaAMT+hOdLerSDYWWAbfyUKkX/d+NA+LebQqj7
t/QVUTMpj+nQmU=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type; s=default; bh=fhSOLbrVz3NG3YojXkASaAEiw6c=; b=qV8
v7W7eYTih2VZj06/MzxC8jLrKUBvUXTvkTvIldxyGGhAs8AOZaGC5HUfyo6qTZl4
ATIer+ejzIqCpygyh9V0fb4IS1PXiZcHCvdh7qanaufqU+gzN07/JWYsJvp+fc5b
CpgNuQFfkFefnhq3N9CChgAIEwfe5hhl9h6LRrXk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,URI_HEX autolearn=no version=3.3.2
X-HELO: mx1.ist.ac.at
Message-ID: <52D3CB60.6000808@ist.ac.at>
Date: Mon, 13 Jan 2014 12:17:52 +0100
From: Alois Schloegl <alois DOT schloegl AT ist DOT ac DOT at>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: patch for octave's mex.h - fix compiling mex files

--------------030409050001070708020503
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit



When trying to compile the mex-files of the Octave packages NaN-toolbox
and biosig, the error below is observed with the recent version of
octave in Cygwin,

According to

http://octave.1599824.n4.nabble.com/Problems-with-mkoctfile-using-GCC-4-8-1-td4657964.html

http://hg.savannah.gnu.org/hgweb/octave/file/811019b9ef57/libinterp/corefcn/mex.h#l67

the attached patch fixes this for Octave 3.6.4. I suggest to apply this
patch to Octave in Cygwin.


Cheers,
   Alois




schloegl AT WT7 /cygdrive/l/src/octave-forge/extra/NaN/src
$ mkoctfile --mex xptopen.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 xptopen.cpp:64:
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib: In function
‘long long int std::abs(long long int)’:
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/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/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:166:3: error:
previous declaration ‘long int std::abs(long int)’ here
   abs(long __i) { return __builtin_labs(__i); }
   ^
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib: In function
‘__int128 std::abs(__int128)’:
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:179:19: error:
declaration of C function ‘__int128 std::abs(__int128)’ conflicts with
   abs(__int128 __x) { return __x >= 0 ? __x : -__x; }
                   ^
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:174:3: error:
previous declaration ‘long long int std::abs(long long int)’ here
   abs(long long __x) { return __builtin_llabs (__x); }
   ^
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:179:19: error:
declaration of C function ‘__int128 std::abs(__int128)’ conflicts with
   abs(__int128 __x) { return __x >= 0 ? __x : -__x; }
                   ^
/usr/lib/gcc/x86_64-pc-cygwin/4.8.2/include/c++/cstdlib:166:3: error:
previous declaration ‘long int std::abs(long int)’ here
   abs(long __i) { return __builtin_labs(__i); }
   ^



--------------030409050001070708020503
Content-Type: text/x-patch;
 name="cygwin_octave364.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="cygwin_octave364.patch"

--- /usr/include/octave-3.6.4/octave/mex.h.orig	2014-01-10 12:17:09.668140800 +0100
+++ /usr/include/octave-3.6.4/octave/mex.h	2014-01-10 12:18:07.926966100 +0100
@@ -64,6 +64,8 @@
 
 #define mxMAXNAME 64
 
+#include "mexproto.h"
+
 #if defined (__cplusplus)
 extern "C" {
 #endif
@@ -74,8 +76,6 @@
 void mexFunction (int nlhs, mxArray* plhs[], int nrhs, const mxArray *prhs[]);
 #endif
 
-#include "mexproto.h"
-
 /* V4 floating point routines renamed in V5.  */
 #define mexIsNaN mxIsNaN
 #define mexIsFinite mxIsFinite


--------------030409050001070708020503
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------030409050001070708020503--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019