bugGNU Octave - Bugs: bug #43220, libgnu/math.h conflicting...

 
 

bug #43220: libgnu/math.h conflicting declaration of C function 'int signbit(double)'

Submitter:  None
Submitted:  Sun 14 Sep 2014 05:42:10 AM UTC
   
 
Category:  Configuration and Build System Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Build Failure
Status:  Duplicate Assigned to:  mtmiller
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 22 May 2015 12:44:17 PM UTC, comment #6: 

Yes, I just downloaded SuiteSparse 4.3.1 and it looks like it is a bug in SuiteSparse 4.3.x. You will need to either patch one of the SuiteSparse header files or upgrade to a 4.4.x version. I'm going to close this report again since it's not a bug in Octave, it's a bug in the SuiteSparse library that has been fixed. If you need further help diagnosing or fixing this, please mail the help list.

Mike Miller <mtmiller>
Group Member
Fri 22 May 2015 12:35:39 PM UTC, comment #5: 

Yes, I have the same values.

The two configure output files are config.status and config.h, here's what I have in an unmodified configure of Octave:


$ grep -i signbit config.h
/* #undef DBL_SIGNBIT_BIT */
/* #undef DBL_SIGNBIT_WORD */
/* #undef FLT_SIGNBIT_BIT */
/* #undef FLT_SIGNBIT_WORD */
/* Define to 1 when the gnulib module signbit should be tested. */
#define GNULIB_TEST_SIGNBIT 1
/* Define to 1 if <cmath> provides signbit. */
#define HAVE_CMATH_SIGNBIT 1
/* Define to 1 if <cmath> provides float variant of signbit. */
#define HAVE_CMATH_SIGNBITF 1
/* Define to 1 if you have the declaration of `signbit', and to 0 if you
#define HAVE_DECL_SIGNBIT 1
/* Define to 1 if you have the `signbit' function. */
/* #undef HAVE_SIGNBIT */
/* #undef LDBL_SIGNBIT_BIT */
/* #undef LDBL_SIGNBIT_WORD */

$ grep -i signbit config.status
S["REPLACE_SIGNBIT_USING_GCC"]="1"
S["REPLACE_SIGNBIT"]="0"
S["GNULIB_SIGNBIT"]="1"
D["GNULIB_TEST_SIGNBIT"]=" 1"
D["HAVE_CMATH_SIGNBIT"]=" 1"
D["HAVE_CMATH_SIGNBITF"]=" 1"
D["HAVE_DECL_SIGNBIT"]=" 1"


It's possible that a bug was introduced in SuiteSparse 4.3.x, but I only have 4.2.x and 4.4.x easily available to me to test with. If it's possible for you to upgrade to 4.4.x, I would try that first and see if the error is resolved.

Mike Miller <mtmiller>
Group Member
Fri 22 May 2015 05:32:50 AM UTC, comment #4: 

I'm on gcc 4.8.2, Slackware64-14.1, have not tried SuiteSparse 4.4.x yet.

I tried removing AC_CHECK_FUNCS(signbit) and AC_CHECK_DECLS(signbit).  The configure test failure goes away, but it still appears to be using gnulib's signbit and the build fails in the same spot.

I have these at the end of config.log, does yours match?

GNULIB_SIGNBIT='1'
REPLACE_SIGNBIT='0'
REPLACE_SIGNBIT_USING_GCC='1'
#define GNULIB_TEST_SIGNBIT 1

It'll be a few days before I can dig into this again.

Anonymous
Thu 21 May 2015 12:11:31 PM UTC, comment #3: 

It can be reopened, but you're going to have to provide more information about this failure and how to fix it.

I see the exact same output in config.log and I do not have a compilation failure, so I think the results you are seeing in the configure stage are perfectly natural, this is not enough to indicate what the problem is.

What version of gcc and on what operating system are you building Octave? Have you tried SuiteSparse 4.4.x?

Mike Miller <mtmiller>
Group Member
Thu 21 May 2015 06:13:28 AM UTC, comment #2: 

I'm seeing this issue with 4.0.0-rc4 and suitesparse 4.3.x even though bug #43063 is closed.  Can this be reopened?

More details:  I'm thinking there is a problem with detecting if signbit exists, so it falls back to gnulib's implementation which causes more problems.

checking for signbit macro... yes
checking for signbit compiler built-ins... yes
...
checking for std::signbit in <cmath>... yes
checking for std::signbit (float variant) in <cmath>... yes
...
checking for signbit... no
...
checking whether signbit is declared... yes


I'm wondering if the last two are necessary.  Here is the one that failed:

configure:70761: checking for signbit
configure:70761: gcc -o conftest -O2 -fPIC -pthread -fopenmp   conftest.c -lm   >&5  
conftest.c:845:6: warning: conflicting types for built-in function 'signbit' [enabled by default]
 char signbit ();
      ^
/tmp/ccoCkqt6.o: In function `main':
conftest.c:(.text.startup+0x7): undefined reference to `signbit'
collect2: error: ld returned 1 exit status

Anonymous
Mon 15 Sep 2014 03:12:28 PM UTC, comment #1: 

Thanks for your bug report. This problem is already part of bug #43063 and fixes are under discussion there. Closing as a duplicate.

Mike Miller <mtmiller>
Group Member
Sun 14 Sep 2014 05:42:10 AM UTC, original submission:  

When compiling on os x 10.9.4, I encountered such errors:

In file included from /usr/local/include/SuiteSparse_config.h:47:0,
                 from /usr/local/include/amd.h:46,
                 from ./util/oct-sparse.h:33,
                 from numeric/sparse-base-chol.h:27,
                 from numeric/SparseCmplxCHOL.h:27,
                 from numeric/SparseCmplxCHOL.cc:28:
../libgnu/math.h: In function 'int signbit(double)':
../libgnu/math.h:2576:1: error: conflicting declaration of C function 'int signbit(double)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
 ^
../libgnu/math.h:2576:1: note: previous declaration 'int signbit(float)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
 ^
../libgnu/math.h: In function 'int signbit(long double)':
../libgnu/math.h:2576:1: error: conflicting declaration of C function 'int signbit(long double)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
 ^
../libgnu/math.h:2576:1: note: previous declaration 'int signbit(double)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
 ^
../libgnu/math.h:2576:1: error: conflicting declaration of C function 'int signbit(long double)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
 ^
../libgnu/math.h:2576:1: note: previous declaration 'int signbit(float)'
 _GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)


and my configure option is:

./configure --prefix=/usr/local --disable-atomic-refcount --disable-octave-allocator --enable-bounds-check --disable-gui --with-shell=/usr/local/bin/bash --with-framework-opengl --with-lapack="-llapack" --with-colamd-libdir=/usr/local/lib --with-colamd-includedir=/usr/local/include --with-ccolamd-includedir=/usr/local/include --with-ccolamd-libdir=/usr/local/lib --with-arpack-includedir=/usr/local/include --with-arpack-libdir=/usr/local/lib --with-colamd="-lcolamd" --with-ccolamd="-lccolamd" --enable-readline

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #32090:  configured.log added by None (69KiB - application/octet-stream)

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  •  

    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 12 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-05-22 mtmiller StatusNeed Info Duplicate
        Open/ClosedOpen Closed
    2015-05-22 mtmiller Assigned toNone mtmiller
        Operating SystemMac OS Any
    2015-05-21 mtmiller Open/ClosedClosed Open
    2015-05-21 mtmiller StatusDuplicate Need Info
        Release3.8.2 dev
    2014-09-15 mtmiller CategoryPlotting with OpenGL Configuration and Build System
        StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #43063
    2014-09-14 None Attached File- Added configured.log, #32090

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code