Build from source: Difference between revisions

Jump to navigation Jump to search
1,239 bytes removed ,  1 March 2012
Line 19: Line 19:
[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
[http://www.gnu.org/software/octave/doc/interpreter/Installation.html#Installation More detailed instructions]
for building from source are included in the Octave manual.
for building from source are included in the Octave manual.
=Build=
After running configure simply run
make
Note that the compilation of Octave can take some time.
==Troubleshooting==
Another possible error occurs at the 'make' stage:
/usr/include/c++/3.3.1/bits/basic_string.h:228: undefined reference to
    `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_S_empty_rep_storage'
collect2: ld returned 1 exit status
make[2]: *** [octave] Error 1
This has something to do with the gcc configuration. Try compiling the following program using g++:
#include <string>
#include <iostream>
using namespace std;
int main (void)
{
  basic_string <char>a = "thing one";
  string b = "thing two";
  cout << a.c_str() << endl;
  return (a == b);
}
If it fails, then your compiler needs to be set-up differently (how?). On my machine I can compile that test program but still get the error making Octave -- how do we solve this? It has something to do with the shared C++ library versions, check for /usr/lib/libstdc++.so.6 and make sure the right version of that library is being used by gcc -- especially if you had to reinstall gcc to build the fortran support. If it still doesn't work, consider installing from the RPMs instead of compiling from source.


=Test=
=Test=

Navigation menu