bugGNU Octave - Bugs: bug #29462, compile fails: strerror is not a...

 
 

bug #29462: compile fails: strerror is not a member of gnulib

Submitted by:  Petr Mikulik <mikulik>
Submitted on:  Wed 07 Apr 2010 12:21:08 PM UTC  
 
Category: Configuration and Build SystemSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Build Failure
Status: InvalidAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 08 Apr 2010 06:02:11 PM UTC, comment #5:

I don't think any 3.x version of GCC has sufficient template capabilities to properly compile Octave. Or maybe it was some other problem. I don't remember exactly what the problems were.

I expect any 4.3.x (with x != 2) will work, as I think the bug you hit was introduced in 4.3.2 and removed in 4.3.3.

The default compiler on Debian testing is what I typically use. Currently that seems to be GCC 4.4.3.

I haven't tried lately, but I would expect Octave to build with at least some other GCC 4.x versions.

John W. Eaton <jwe>
Project Administrator
Thu 08 Apr 2010 01:45:20 PM UTC, comment #4:

Ok, I tried other compilers, in particular g++ 3.3.3 and g++ 4.1.3. Bad luck with these as well :-((

1. g++ 3.3.3
./configure CC=gcc-3.3 CXX="g++-3.3" CPP="gcc-3.3 -E"
CXXCPP="g++-3.3 -E" F77=g77-3.3
=>
...
checking whether we are using the GNU C++ compiler... yes
checking whether g++-3.3 accepts -g... yes
checking dependency style of g++-3.3... gcc3
checking how to run the C++ preprocessor... g++-3.3 -E
configure: error: g++ version 3.3.3-hammer will probably fail to compile Octave

2. g++ 4.1.3
./configure CC=gcc-4.1 CXX="g++-4.1" CPP="gcc-4.1 -E" CXXCPP="g++-4.1 -E" F77=gfortran-4.1
=> octave compiles OK, but fails during making docs. The reason is:
$ ./run-octave
Neoprávněný přístup do paměti (SIGSEGV)

Do all the Octave developers use only the cutting-edge GCC 4.4?

Hmm ... then I went into /usr/include/c++/4.3 and replaced "#include_next" by "#include" in all files => now Octave compiles even with 4.3.2. A small success at the end.

Petr Mikulik <mikulik>
Wed 07 Apr 2010 09:00:10 PM UTC, comment #3:

No, it is not a bug in Octave. It is a bug in your compiler, which has already been fixed in a later version.

John W. Eaton <jwe>
Project Administrator
Wed 07 Apr 2010 08:51:31 PM UTC, comment #2:

Except for OpenSUSE, the same problem I see in Debian as well (both with g++ 4.3.2). I really cannot exchange g++ there.

The error message says:
error: ‘strerror’ is not a member of ‘gnulib’
Thus I wonder how "gnulib" as a GNU library can be a part of C++ standard library -- I guess it is some kind of GNU extension. So why exchange compiler?

I replaced
gnulib::strerror (errno);
by
strerror (errno);
and then Octave compiles OK. So it looks to me like a bug in Octave.

I think that a solution could be
HAVE_GNULIB_STRERROR
which switches between both cases.

Can you please fix it in Octave?

Petr Mikulik <mikulik>
Wed 07 Apr 2010 05:34:14 PM UTC, comment #1:

I think this is the same as the problem we discussed last month on the maintainers list:

https://www-old.cae.wisc.edu/pipermail/octave-maintainers/2010-March/015660.html

So either upgrade to a newer GCC, or apply the referenced patch to your C++ headers so they use #include instead of #include_next.

I'm closing this report as I don't think it is really a bug in Octave. If the problem you are having is something different, then please file another bug report with more info.

John W. Eaton <jwe>
Project Administrator
Wed 07 Apr 2010 12:21:08 PM UTC, original submission:

Neither the current cvs nor 3.3.51 can be compiled because "make" fails here:

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -I../libgnu -I../libgnu -I../libcruft/misc -g -O2 -DHAVE_CONFIG_H -mieee-fp -I/usr/include/freetype2 -Wall -W -Wshadow -Wold-style-cast -Wformat -g -O2 -pthread -g -O2 -MT liboctave_la-dir-ops.lo -MD -MP -MF .deps/liboctave_la-dir-ops.Tpo -c dir-ops.cc -fPIC -DPIC -o .libs/liboctave_la-dir-ops.o
dir-ops.cc: In member function ‘bool dir_entry::open(const std::string&)’:
dir-ops.cc:61: error: ‘strerror’ is not a member of ‘gnulib’
make[3]: *** [liboctave_la-dir-ops.lo] Error 1

In the bug mailing list, there was a hint to do "mv gnulib gnulib.save; ./autogen.sh" but this does not help.

I use OpenSUSE 11.1 with gcc 4.3.2.

Petr Mikulik <mikulik>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by mikulik (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 07 Apr 2010 05:34:14 PM UTCjweStatusNone=>Invalid
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1