bugGNU Octave - Bugs: bug #43345, [octave forge] (lssa) fails to...

 
 

bug #43345: [octave forge] (lssa) fails to build using llvm libc++ 3.4 and later

Submitter:  Alexander Hansen <alexkhansen>
Submitted:  Thu 02 Oct 2014 03:14:33 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  1 - Later Item Group:  Build Failure
Status:  Fixed Assigned to:  lostbard
Originator Name:  Open/Closed:  * Closed
Release:  * other Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 23 Jul 2018 05:18:27 PM UTC, comment #6: 

Since this bug report is now over 4 years old, and the code fixes here were changed on another ticket, will close as fixed.

Can reopen if anthing else has changed.

John Donoghue <lostbard>
Group Member
Mon 23 Jul 2018 05:02:05 PM UTC, comment #5: 

Bug #48425 changes the function which probally also fixes the compile issue reported here.

John Donoghue <lostbard>
Group Member
Thu 02 Oct 2014 01:32:35 PM UTC, comment #4: 

Can you please test the following patch?


diff --git a/src/fastlscomplex.cc b/src/fastlscomplex.cc
--- a/src/fastlscomplex.cc
+++ b/src/fastlscomplex.cc
@@ -372,8 +372,7 @@ bool flscomplex (const RowVector & tvec,

                             --tpra;
                             h = *tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                record_current->power_series[p] += conj(h);

                             if (++exp_ptr >= exp_pse_ptr )
diff --git a/src/fastlscomplex.cc b/src/fastlscomplex.cc
--- a/src/fastlscomplex.cc
+++ b/src/fastlscomplex.cc
@@ -372,8 +372,7 @@ bool flscomplex (const RowVector & tvec,

                             --tpra;
                             h = *tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                record_current->power_series[p] += conj(h);

                             if (++exp_ptr >= exp_pse_ptr )
diff --git a/src/fastlscomplex.cc b/src/fastlscomplex.cc
--- a/src/fastlscomplex.cc
+++ b/src/fastlscomplex.cc
@@ -372,8 +372,7 @@ bool flscomplex (const RowVector & tvec,

                             --tpra;
                             h = *tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                record_current->power_series[p] += conj(h);

                             if (++exp_ptr >= exp_pse_ptr )
                               break;
@@ -386,8 +385,7 @@ bool flscomplex (const RowVector & tvec,

                             --tpra;
                             h = -*tpra * *exp_ptr;
-                            record_current->power_series[p].real() -= h.imag();
-                            record_current->power_series[p].imag() += h.real();
+                record_current->power_series[p] += conj(h);

                             if (++exp_ptr >= exp_pse_ptr)
                               break;
@@ -422,8 +420,7 @@ bool flscomplex (const RowVector & tvec,

                                   tprb -= 2;
                                   h = *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                  record_current->power_series[p] += conj(h);

                                   if ( ++exp_ptr >= exp_pse_ptr )
                                     break;
@@ -436,8 +433,7 @@ bool flscomplex (const RowVector & tvec,

                                   tprb -= 2;
                                   h = - *tprb * *exp_ptr;
-                                  record_current->power_series[p].real() -= h.imag();
-                                  record_current->power_series[p].imag() += h.real();
+                  record_current->power_series[p] += conj(h);

                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -467,8 +463,7 @@ bool flscomplex (const RowVector & tvec,

                                   --tpra;
                                   h = *tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                  record_next->power_series[q] += conj(h);

                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;
@@ -481,8 +476,7 @@ bool flscomplex (const RowVector & tvec,

                                   --tpra;
                                   h = -*tpra * *exp_ptr;
-                                  record_next->power_series[q].real() -= h.imag();
-                                  record_next->power_series[q].imag() += h.real();
+                  record_next->power_series[q] += conj(h);

                                   if (++exp_ptr >= exp_pse_ptr)
                                     break;


Sorry for the spacing change. I've also reindented the code, but I didn't include all of the whitespace changes in this patch.

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 02 Oct 2014 01:27:11 PM UTC, comment #3: 

Thanks.  I forgot about my mailing list report and I didn't remember the Xcode <-> LLVM mapping for the compiler version (I knew it was Apple's clang-5, though). 

Unsurprisingly, this also affects builds against Octave 3.8.2.

Alexander Hansen <alexkhansen>
Thu 02 Oct 2014 01:14:52 PM UTC, comment #2: 

Recent versions of gcc also fail to compile this:

http://melpon.org/wandbox/permlink/foenoEwwmY0sETnE

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 02 Oct 2014 01:02:39 PM UTC, comment #1: 

Actually, you noticed this almost a year ago, with clang 3.3:

http://octave.1599824.n4.nabble.com/Build-issue-with-lssa-0-1-2-on-OS-X-10-9-td4659560.html

Jordi Gutiérrez Hermoso <jordigh>
Group Member
Thu 02 Oct 2014 03:14:33 AM UTC, original submission:  

(number based on the LLVM numbering rather than Apple's)

It worked for me for prior compiler versions, but now I get the following:

...
mkdir (/var/tmp/oct-WjkD9c)
untar (./lssa.tar, /var/tmp/oct-WjkD9c)
fastlscomplex.cc:65:9: warning: add explicit braces to avoid dangling else [-Wdangling-else]
        else
        ^
fastlscomplex.cc:377:68: error: expression is not assignable
                            record_current->power_series[p].real() -= h_i;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:378:68: error: expression is not assignable
                            record_current->power_series[p].imag() += h_r;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:391:68: error: expression is not assignable
                            record_current->power_series[p].real() -= h_i;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:392:68: error: expression is not assignable
                            record_current->power_series[p].imag() += h_r;
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:427:74: error: expression is not assignable
                                  record_current->power_series[p].real() -= h_i;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:428:74: error: expression is not assignable
                                  record_current->power_series[p].imag() += h_r;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:441:74: error: expression is not assignable
                                  record_current->power_series[p].real() -= h_i;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:442:74: error: expression is not assignable
                                  record_current->power_series[p].imag() += h_r;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:472:71: error: expression is not assignable
                                  record_next->power_series[q].real() -= h_i;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:473:71: error: expression is not assignable
                                  record_next->power_series[q].imag() += h_r;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:486:71: error: expression is not assignable
                                  record_next->power_series[q].real() -= h_i;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fastlscomplex.cc:487:71: error: expression is not assignable
                                  record_next->power_series[q].imag() += h_r;
                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
1 warning and 12 errors generated.
make: * [fastlscomplex.oct] Error 1
'make' returned the following error: /sw/bin/mkoctfile-3.6.4 fastlscomplex.cc
...

$ cc --version
Apple LLVM version 6.0 (clang-600.0.51) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

I first noticed the error for clang from LLVM3.4svn.

Alexander Hansen <alexkhansen>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by jwe (Updated the item)
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by alexkhansen (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-24 mtmiller Carbon-CopyRemoved 80942 -
    2018-07-23 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2018-07-23 lostbard StatusPatch Submitted Ready For Test
        Assigned toNone lostbard
    2018-07-02 jwe Summary[octave-forge] (lssa) fails to build using llvm libc++ 3.4 and later [octave forge] (lssa) fails to build using llvm libc++ 3.4 and later
    2017-08-11 jwe Summarylssa package: fails to build using llvm libc++ 3.4 and later [octave-forge] (lssa) fails to build using llvm libc++ 3.4 and later
    2016-03-29 mtmiller Priority5 - Normal 1 - Later
        Release3.6.4 other
        Operating SystemMac OS Any
        Summarylssa fails to build using clang-3.4 and later lssa package: fails to build using llvm libc++ 3.4 and later
    2014-10-02 jordigh StatusConfirmed Patch Submitted
    2014-10-02 jordigh StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code