help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem compiling 2.1.65 on solaris


From: John W. Eaton
Subject: problem compiling 2.1.65 on solaris
Date: Fri, 18 Feb 2005 14:49:35 -0500

On 18-Feb-2005, Dmitri A. Sergatskov <address@hidden> wrote:

| g++ -c  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -I../glob 
-I../glob -DHAVE_CONFIG_H  -Wall -W -Wshadow -O2 -mcpu=ultrasparc 
-mtune=ultrasparc -pipe 
| file-ops.cc -o pic/file-ops.o
| file-ops.cc: In static member function `static std::string 
file_ops::canonicalize_file_name(const std::string&, std::string&)':
| file-ops.cc:358: error: no matching function for call to 
`octave_env::make_absolute(const std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >&)'
| oct-env.h:44: note: candidates are: static std::string 
octave_env::make_absolute(const std::string&, const std::string&)
| file-ops.cc:368: error: `resolved_len' undeclared (first use this function)
| file-ops.cc:368: error: (Each undeclared identifier is reported only once for 
each function it appears in.)
| file-ops.cc:368: error: cannot convert `const std::basic_string<char, 
std::char_traits<char>, std::allocator<char> >' to `const char*' for argument 
`1' to `int 
| resolvepath(const char*, char*, size_t)'
| make[2]: *** [pic/file-ops.o] Error 1
| 
| I can compile 2.1.64 fine. Also 2.1.65 compiles fine on linux with the same 
compiler (gcc 3.4.3)

The difference is that the GNU/Linux system has the GNU C library,
which provides a canonicalize_file_name function, and the Solaris
system has resolvepath.  Unfortunately, I missed testing the
Solaris-specific code.

Please try the following patch and let me know whether it works
correctly.  For example, try

  canonicalize_file_name ("/some/file/name/that/includes/symbolic/links")

and verify that it returns the real name of the file.

Thanks,

jwe


liboctave/ChangeLog

2005-02-18  John W. Eaton  <address@hidden>

        * file-ops.cc (file_ops::canonicalize_file_name): Pass current
        directory to octave_env::make_absolute.
        Provide decl for resolved_len.


Index: liboctave/file-ops.cc
===================================================================
RCS file: /usr/local/cvsroot/octave/liboctave/file-ops.cc,v
retrieving revision 1.36.2.2
diff -u -r1.36.2.2 file-ops.cc
--- liboctave/file-ops.cc       9 Feb 2005 23:11:11 -0000       1.36.2.2
+++ liboctave/file-ops.cc       18 Feb 2005 19:38:32 -0000
@@ -355,7 +355,7 @@
   // relative names into absolute ones, so prepend the working
   // directory if the path is not absolute.
 
-  name = octave_env::make_absolute (name);
+  name = octave_env::make_absolute (name, octave_env::getcwd ());
 
   size_t resolved_size = name.length ();
 
@@ -365,7 +365,7 @@
 
       OCTAVE_LOCAL_BUFFER (char, resolved, resolved_size);
 
-      resolved_len = ::resolvepath (name, resolved, resolved_size);
+      int resolved_len = ::resolvepath (name, resolved, resolved_size);
 
       if (resolved_len < 0)
        break;



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]