This weekend I decided it was time to update my Mac's software and, after 
finishing with Software Update and a couple of individual applications, I 
remembered Octave which I had installed using FinkCommander.

First I updated Fink itself (Selfupdate), and then I followed its 
recommendation to Update-all.  However, Octave failed to update.

Following the suggestion I again used Selfupdate and tried again.  No luck.

This time I paid attention to what the error was and experimented a couple of 
times with the Source commands on just the octave-atlas bundle, until the 
failing step appeared first in the printout.  What it showed is detailed in the 
"update_failure …" attachment.  The package that won't install is 
netcdf-oct364-1.0.1-1.

Now, I have no known need for netcdf, but I do need a couple of packages that 
won't install until it completes.

Some detective work (outlined in the attachment of that name) pinpointed my 
problem as follows.  The Makefile contains a provision to generate a header 
file "netcdf_constants.h" to agree with the contents of /sw/include/netcdf.h, 
but a file "netcef_constants.h" is already present in the  
/sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/src directory so that line 
never executes.  The existing netcdf_constants.h was apparently built for an 
earlier version of netcdf than is currently installed.  

I naively tried deleting the offending file (it reappeared) and replacing it 
with a corrected version (the bad one reappeared again).  I'm not really 
surprised:  not being sophisitcated enough to resume the installation from the 
command line, I must start the process from the beginning, and it is not 
unexpected that all the files (including the tar archive in 
/sw/src/fink.build/netcdf-oct364-1.0.1-1) would be regenerated from a source 
that I don't know how to locate.

Any suggestions?

The following package will be installed or updated:
 bundle-octave-atlas
The following 17 additional packages will be installed:
 bundle-octave364-atlas communications-oct364 data-smoothing-oct364
 econometrics-oct364 ga-oct364 image-oct364 netcdf-oct364 nlwing2-oct364
 nnet-oct364 nurbs-oct364 ocs-oct364 optim-atlas-oct364 secs3d-oct364
 signal-oct364 statistics-oct364 struct-oct364 vrml-oct364
Do you want to continue? [Y/n] 
Setting runtime build-lock...
dpkg-deb -b /sw/src/fink.build/root-fink-buildlock-netcdf-oct364-1.0.1-1 
/sw/src/fink.build
dpkg-deb: building package `fink-buildlock-netcdf-oct364-1.0.1-1' in 
`/sw/src/fink.build/fink-buildlock-netcdf-oct364-1.0.1-1_2014.02.24-21.06.11_darwin-x86_64.deb'.
Installing build-lock package...
/sw/bin/dpkg-lockwait -i 
/sw/src/fink.build/fink-buildlock-netcdf-oct364-1.0.1-1_2014.02.24-21.06.11_darwin-x86_64.deb
Selecting previously deselected package fink-buildlock-netcdf-oct364-1.0.1-1.
(Reading database ... 79598 files and directories currently installed.)
Unpacking fink-buildlock-netcdf-oct364-1.0.1-1 (from 
.../fink-buildlock-netcdf-oct364-1.0.1-1_2014.02.24-21.06.11_darwin-x86_64.deb) 
...
Setting up fink-buildlock-netcdf-oct364-1.0.1-1 (2014.02.24-21.06.11) ...

env LANG=C LC_ALL=C /sw/bin/tar  --no-same-owner --no-same-permissions -xf 
/sw/src/netcdf-1.0.1.tar.gz
/tmp/fink.gxN8F
#!/bin/sh -ev

# Source directory, either %type_raw[forge] or %type_raw[forge]-%v
pkgsrc=netcdf

##### Invariant stuff begins here #####
/sw/share/fink-octave-scripts/octave-forge-patch.sh netcdf 1.0.1 3.6.4 
/sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf 
/sw/src/fink.build/root-netcdf-oct364-1.0.1-1/sw $pkgsrc
#!/bin/sh -ev
if [ $UID -ne 0 ]
then 
        echo "$1 cannot be built with --build-as-nobody"
        exit 1
fi
octvers=$3
subst1="s,@PKG@,$1,g"
subst2="s,@PKGVERS@,$2,g"
subst3="s,@OCTVERS@,$octvers,g"
subst4="s,@BUILDDIR@,$4,g"
subst5="s,@INSTDIR@,$5,g"
subst6="s,@PKGSRC@,$6,g"
for scriptfile in octave-forge-install.sh octave-forge-inst \
                                  octave-forge-postinst.sh 
octave-forge-postinst \
                                  octave-forge-prerm.sh octave-forge-prerm; do 
        sed -e $subst1 -e $subst2 -e $subst3 -e $subst4 -e $subst5 
/sw/share/fink-octave-scripts/$scriptfile.in > $scriptfile
        chmod a+x $scriptfile
done
if [[ "$octvers" > "3.4.0" ]] ; then
        
oc_shell_script="/sw/share/fink-octave-scripts/octave-forge-compile-3.4.3.sh.in"
        oc_oct_script="/sw/share/fink-octave-scripts/octave-forge-comp-3.4.3.in"
else
        
oc_shell_script="/sw/share/fink-octave-scripts/octave-forge-compile-3.0.5.sh.in"
        oc_oct_script="/sw/share/fink-octave-scripts/octave-forge-comp-3.0.5.in"
fi
sed -e $subst1 -e $subst3 -e $subst4 -e $subst6 $oc_shell_script > 
octave-forge-compile.sh
sed -e $subst1 -e $subst3 -e $subst6 $oc_oct_script > octave-forge-comp
sed -e $subst3 -e $subst4 /sw/share/fink-octave-scripts/genmkoctfile.sh.in > 
genmkoctfile.sh
chmod a+x octave-forge-comp*
chmod a+x genmkoctfile.sh
./octave-forge-compile.sh
#!/bin/sh -ev
# repack tarball, since octave-3.4.0+ appears not to want to install
# from directories
cd ..
tar -cf netcdf.tar netcdf
mkdir -p bld/share/octave/3.6.4/packages bld/lib/octave/3.6.4/packages
`which xvfb-run` 
/sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/octave-forge-comp
which xvfb-run
GNU Octave, version 3.6.4
Copyright (C) 2013 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-apple-darwin".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

executing commands from /sw/share/octave/site/m/startup/octaverc ... done.
executing commands from /sw/share/octave/3.6.4/m/startup/octaverc ... done.

ans = /sw/src/fink.build/netcdf-oct364-1.0.1-1/bld/share/octave/3.6.4/packages
mkdir (/var/tmp/oct-Gopuv4)
untar (./netcdf.tar, /var/tmp/oct-Gopuv4)
checking for gcc... oct-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether oct-cc accepts -g... yes
checking for oct-cc option to accept ISO C89... none needed
checking for mkoctfile... /sw/bin/mkoctfile-3.6.4
checking for F77_FUNC... yes
checking for octave... /sw/bin/octave-3.6.4
checking for OCTAVE_VERSION in Octave... 3.6.4
checking for octave_config_info('canonical_host_type') in Octave... 
x86_64-apple-darwin
checking for octave_config_info('SHLEXT') in Octave... dylib
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for strip... strip
checking for nc-config... nc-config
configure: creating ./config.status
config.status: creating Makeconf
 
  "$prefix" is 
/sw/src/fink.build/netcdf-oct364-1.0.1-1/bld/share/octave/3.6.4/packages/netcdf-1.0.1
  "$exec_prefix" is ${prefix}

octave commands will install into the following directories:
   m-files:   /sw/share/octave/3.6.4/site/m/octave-forge
   oct-files: /sw/lib/octave/3.6.4/site/oct/x86_64-apple-darwin/octave-forge
   binaries:  /sw/lib/octave/3.6.4/site/exec/x86_64-apple-darwin
alternatives:
   m-files:   /sw/share/octave/3.6.4/site/octave-forge-alternatives/m
   oct-files: 
/sw/lib/octave/3.6.4/site/octave-forge-alternatives/oct/x86_64-apple-darwin

shell commands will install into the following directories:
   binaries:  ${exec_prefix}/bin
   man pages: ${datarootdir}/man
   libraries: ${exec_prefix}/lib
   headers:   ${prefix}/include

octave-forge is configured with
   octave:      /sw/bin/octave-3.6.4 (version 3.6.4)
   mkoctfile:   /sw/bin/mkoctfile-3.6.4 for Octave 4
   netCDF compiler flags:  -I/sw/include -I/sw/include
   netCDF libraries:  -L/sw/lib -lnetcdf

In file included from __netcdf__.cc:32:
./netcdf_constants.h:154:53: error: use of undeclared identifier 
'NC_INDEPENDENT'
  netcdf_constants["NC_INDEPENDENT"] = octave_value(NC_INDEPENDENT);
                                                    ^
./netcdf_constants.h:155:52: error: use of undeclared identifier 'NC_COLLECTIVE'
  netcdf_constants["NC_COLLECTIVE"] = octave_value(NC_COLLECTIVE);
                                                   ^
2 errors generated.
make: *** [__netcdf__.oct] Error 1
'make' returned the following error: mkoctfile __netcdf__.cc -L/sw/lib -lnetcdf
error: called from 'pkg>configure_make' in file 
/sw/share/octave/3.6.4/m/pkg/pkg.m near line 1385, column 9
error: called from:
error:   /sw/share/octave/3.6.4/m/pkg/pkg.m at line 827, column 5
error:   /sw/share/octave/3.6.4/m/pkg/pkg.m at line 383, column 9
error:   /sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/octave-forge-comp at 
line 4, column 1
### execution of /tmp/fink.gxN8F failed, exit code 1
Removing runtime build-lock...
Removing build-lock package...
/sw/bin/dpkg-lockwait -r fink-buildlock-netcdf-oct364-1.0.1-1
(Reading database ... 79599 files and directories currently installed.)
Removing fink-buildlock-netcdf-oct364-1.0.1-1 ...
Failed: phase compiling: netcdf-oct364-1.0.1-1 failed

Before reporting any errors, please run "fink selfupdate" and try again.

If you continue to have issues, please check to see if the FAQ on Fink's 
website solves the problem.  If not, ask on one (not both, please) of
these mailing lists:

        The Fink Users List <fink-us...@lists.sourceforge.net>
        The Fink Beginners List <fink-beginners@lists.sourceforge.net>,

with a carbon copy to the maintainer:

        Alexander Hansen <alexkhan...@users.sourceforge.net>

Note that this is preferable to emailing just the maintainer directly,
since most fink package maintainers do not have access to all possible
hardware and software configurations.

Please try to include the complete error message in your report.  This
generally consists of a compiler line starting with e.g. "gcc" or "g++"
followed by the actual error output from the compiler.

Also include the following system information:
Package manager version: 0.36.3.1
Distribution version: selfupdate-rsync Sat Feb 22 10:18:50 2014, 10.7, x86_64
Trees: local/main stable/main
Xcode.app: 4.6.3
Xcode command-line tools: 4.6.0.0.1.1358221012
netcdf-oct364-1.0.1-1 is set to build with only one job.
##      Which netCDF is installed?
$ nc-config --version
netCDF 4.3.1.1

##      Where does it point for header files?
$ nc-config --includedir
/sw/include

##      Is there any other place that netcef.h could come from?  (No)
$ sudo find / -name netcdf.h -print
Password:
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/sw/include/netcdf.h
$

##      Does this file contain the offending  NC_INDEPENDENT?  (No)
$ grep NC_INDEPENDENT /sw/include/netcdf.h
$
##      What about NC_COLLECTIVE?  (Also no)
$ grep NC_COLLECTIVE /sw/include/netcdf.h
$

##      Look at how netcdf_constants.h is (supposed to be?) created when 
installing 
$ cd /sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/src
$ ls
Makeconf.in             PKG_ADD.sh              autogen.sh              
configure.base          netcdf_constants.h
Makefile                __netcdf__.cc           configure               
netcdf_constants.awk
$ cat Makefile
LIBS=$(shell nc-config --libs)
AWK=awk
MKOCTFILE=mkoctfile
OCTAVE=octave
NCHEADER=$(shell nc-config --includedir)/netcdf.h
#SRC=netcdf_package.cc
SRC=__netcdf__.cc

all: __netcdf__.oct

constants:
        $(AWK) -f netcdf_constants.awk $(NCHEADER)  > netcdf_constants.h

clean:
        rm __netcdf__.oct 

real-clean: clean
        rm ../PKG_ADD ../inst/import_netcdf.m 

__netcdf__.oct: $(SRC) netcdf_constants.h
        $(MKOCTFILE) $(SRC) $(LIBS)

../PKG_ADD: $(SRC)
        sh PKG_ADD.sh

check: ../PKG_ADD __netcdf__.oct        
        ($(OCTAVE) -f --eval "pkg unload octcdf; addpath $$PWD; addpath 
$$PWD/../inst; test_netcdf")

##      Check what Makefile passes to awk
$ NCHEADER=$(sh nc-config --includedir)/netcdf.h
$ echo $NCHEADER
/sw/include/netcdf.h

##      Does running awk produce the same netcdf/src/netcdf_constants.h ?  (No)
$ wc netcdf_constants.h
     160     485   10446 netcdf_constants.h
$ awk -f netcdf_constants.awk $NCHEADER | wc
     180     545   11780

##      A peculiar comment about tarballs appears in another build file:
$ cat /sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/octave-forge-compile.sh 
#!/bin/sh -ev
# repack tarball, since octave-3.4.0+ appears not to want to install
# from directories
cd ..
tar -cf netcdf.tar netcdf
mkdir -p bld/share/octave/3.6.4/packages bld/lib/octave/3.6.4/packages
`which xvfb-run` 
/sw/src/fink.build/netcdf-oct364-1.0.1-1/netcdf/octave-forge-comp

##      So is the defective netcdf_constants.h present in that tarball?  (AHA!)
$ cd /sw/src/fink.build/netcdf-oct364-1.0.1-1
$ tar --list --file=netcdf.tar netcdf/src/netcdf_constants.h
netcdf/src/netcdf_constants.h
$ tar --extract --file=netcdf.tar netcdf/src/netcdf_constants.h --to-stdout 
>~/Documents/Octave/tarballVersion.txt
$ diff ~/Documents/Octave/tarballVersion.txt netcdf/src/netcdf_constants.h
$
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Fink-beginners mailing list
Fink-beginners@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.beginners
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-beginners

Reply via email to