|
From: Quentin S. <qsp...@ie...> - 2006-05-02 16:15:31
|
Alexander Barth wrote:
> Quentin Spencer wrote:
>> Alexander Barth wrote:
>>> I downloaded the 2006.03.17 release and I found a bug in the
>>> configure.add script. I attached the corrected version which simply
>>> replaces the version you have.
>> Thanks. That seems to fix the configuration problem.
>>
>>
>>> The current CVS version doesn't work with octave-2.9.4-8.fc5. I
>>> needed to undo some changes ("Commit changes from JWE for
>>> octave_value/octave_base_value changes in 2.9.5+") made by adb014
>>> (David Bateman ?) in my local copy to make things work. But I
>>> haven't had time to dig in this problem.
>> It doesn't work with 2.9.5 either. The problem appears to be that
>> "which ov-netcdf" does not give the path to ov-netcdf.oct as
>> expected. As far as I can tell, this appears to be due to the
>> presence of the "-" character, which seems to be confusing the octave
>> parser. I don't know if this is intended behavior in octave or not,
>> but you could work around it by renaming ov-netcdf.oct to
>> ov_netcdf.oct (and making the appriopriate changes to all the other
>> things that link to it).
> Are you packing the CVS version of octave-forge or release 2006.03.17 ?
I'm using 2006.03.17, with a lot of patches for compatibility with
octave 2.9.5.
> On my end, octcdf from release 2006.03.17 compiled from source
> actually do work with octave-2.9.4-8.fc5 and octave-2.9.5-2.fc5. In
> case you are using the CVS version, you would need the CVS version of
> today (2nd May) for octcdf.
>
> Concerning the hyphen in ov-netcdf.oct, I can make the change if it is
> really necessary, but it never posed a problem to me. Instead of
> "which ov-netcdf" you can type "which netcdf":
> octave:1> which netcdf
> netcdf is the dynamically-linked function from the file
> /home/abarth/Octave/octcdf/netcdf.oct
>
> Did you tried to run example_netcdf.m or nctest.m ?
>
> In order to verify if ov-netcdf.oct contains undefined symbol, you can
> check the linked libraries with:
> $ ldd ov-netcdf.oct
> libnc-dap.so.3 => /usr/lib64/libnc-dap.so.3 (0x00002aaaaabfc000)
> [...]
> The ov-netcdf.oct file in octave-forge seems not to be linked against
> nc-dap (or netcdf).
With your configure.add patch, there's no problem linking to the
libraries. The problem is that with octave 2.9.5 and later, octave-forge
no longer creates symbolic links for cases where a DLD_FUNCTION a is
found in b.oct. Instead, it uses the autoload function, using syntax
something like: autoload("a","b.oct"). (This was done to for the benefit
of cygwin, which I understand doesn't deal with symlinks well.) So, when
you build octave-forge, instead of symlinking ncatt.oct to
ov-netcdf.oct, it does this:
autoload ("ncatt", which ("ov-netcdf"));
It turns out the problem with this is not the '-' character in
ov-netcdf, but the fact that octave apparently can't find ov-netcdf if
it does not contain a DLD_FUNCTION ov-netcdf, although I'm sure it
probably couldn't given C naming rules. I tried patching the Makefile to
name the file ov_netcdf.oct, but that doesn't solve the problem.
However, naming it netcdf.oct does, because it contains a function
called netcdf.oct. The reason you are not seeing this problem is
probably that you are not building all of octave-forge but only octcdf.
The Makefile in the octcdf directory does something different in that
case--it creates the symbolic links. That still works with octave-2.9.4
and 2.9.5, but it doesn't solve the problem for someone packing all of
octave-forge. You can go ahead and send a bug report if you think octave
shouldn't do this, but regardless, I was able to get it to work properly
with the following patch:
Index: main/octcdf/Makefile
===================================================================
RCS file: /cvsroot/octave/octave-forge/main/octcdf/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- main/octcdf/Makefile 19 Apr 2006 19:09:51 -0000 1.6
+++ main/octcdf/Makefile 28 Apr 2006 17:51:17 -0000
@@ -34,7 +34,7 @@
RM = rm -f
endif
-NCTARGET = ov-netcdf.oct
+NCTARGET = netcdf.oct
NCSOURCES = ov-netcdf.cc ov-ncfile.cc ov-ncvar.cc ov-ncatt.cc ov-ncdim.cc
OBJECTS = $(patsubst %.cc,%.o,$(NCSOURCES))
|