Bug#383149: [Pkg-octave-devel] Bug#383149: tried purging then reinstalling octave2.9 package

2006-08-17 Thread John Dalton

> There's something weird going on here. mkoctfile from the Debian package
> calls g++ with its full path. Additionally, we don't pass the "-m32"
> flag to the compiler. For comparision, the output in my chroot:
> 

The wierd thing is that g++ gets called with its full path
in the second invocation, but not in the first.  It's as
if something is wrong with the rule that generates .o
files from .cc files.

My system shouldn't be mixed, as far as I'm aware
To check, I did an: ls /var/cache/apt/archives/*386*
it returned no results, indicating that apt seems
to have stayed within the amd64 debian archive.

Check which mkoctfile I am picking up:

$ which mkoctfile
/usr/bin/mkoctfile
$

Here is a listing of /usr/bin/mkoctfile from my system.


--START CUT HERE---
#! /bin/sh
#
# mkoctfile -- create a .oct file suitable for dynamic linking by
# Octave.

# Exit immediately on any error.

set -e

OCTAVE_VERSION=""2.9.7""

# Default values for these variables are filled in when Octave is
# compiled.

: ${SED="/bin/sed"}

: ${CPPFLAGS=""}
: ${INCFLAGS="-I/usr/include/octave-2.9.7
-I/usr/include/octave-2.9.7/octave"}
: ${F2C=""}
: ${F2CFLAGS=""}
: ${F77="/usr/bin/gfortran"}
: ${FFLAGS="-O2"}
: ${FPICFLAG="-fPIC"}
: ${CC="/usr/bin/gcc"}
: ${CFLAGS="-O2"}
: ${CPICFLAG="-fPIC"}
: ${CXX="/usr/bin/g++"}
: ${CXXFLAGS="-O2"}
: ${CXXPICFLAG="-fPIC"}
: ${XTRA_CFLAGS=""}
: ${XTRA_CXXFLAGS=""}

: ${DEPEND_FLAGS="-M"}
: ${DEPEND_EXTRA_SED_PATTERN=""}

: ${DL_LD="/usr/bin/g++"}
: ${DL_LDFLAGS="-shared -Wl,-Bsymbolic"}

: ${RLD_FLAG="-Wl,-rpath -Wl,/usr/lib/octave-2.9.7"}
: ${RDYNAMIC_FLAG="-rdynamic"}
: ${LIBOCTAVE=-loctave}
: ${LIBOCTINTERP=-loctinterp}
: ${LIBREADLINE=-lreadline}
: ${LIBCRUFT=-lcruft}
: ${BLAS_LIBS="-llapack-3 -lblas-3"}
: ${FFTW_LIBS="-lfftw3"}
: ${LIBS="-lreadline  -lncurses -ldl -lhdf5 -lz -lm "}
: ${FLIBS="-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2
-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64 -lhdf5 -lz -lgfortranbegin -lgfortran -lm -lgcc_s"}
: ${LD_CXX="/usr/bin/g++"}
: ${LDFLAGS="-s"}
: ${LD_STATIC_FLAG=""}
: ${LFLAGS="-L/usr/lib/octave-2.9.7"}

: ${ALL_FFLAGS="$FFLAGS"}

: ${ALL_CFLAGS="$INCFLAGS $XTRA_CFLAGS $CFLAGS"}

: ${ALL_CXXFLAGS="$INCFLAGS $XTRA_CXXFLAGS $CXXFLAGS"}

: ${ALL_LDFLAGS="$LD_STATIC_FLAG $CPICFLAG $LDFLAGS"}

: ${OCTAVE_LIBS="$LIBOCTINTERP $LIBOCTAVE $SPECIAL_MATH_LIB $LIBCRUFT"}

# Local variables.

usage_msg="usage: mkoctfile [options] file ..."

version_msg="mkoctfile, version $OCTAVE_VERSION"

cfiles=
ccfiles=
f77files=
objfiles=
octfiles=
octfile=
outputfile=
incflags=
defs=
ldflags=
dbg=:
pass_on_options=
strip=false
no_oct_file_strip_on_this_platform=false
link=true
link_stand_alone=false
output_ext=".oct"
depend=false
compile=true

if [ $# -eq 0 ]; then
  echo $usage_msg 1>&2
  exit 1
fi

if [ $# -eq 1 ]; then
  case "$1" in
-v | --version)
  echo $version_msg 1>&2
  exit 0
;;
  esac
fi

while [ $# -gt 0 ]; do
  file=
  case "$1" in
*.c)
  file=$1
  cfiles="$cfiles $file"
;;
*.cc | *.C | *.cpp)
  file=$1
  ccfiles="$ccfiles $file"
;;
*.f | *.F)
  file=$1
  f77files="$f77files $file"
;;
*.o)
  file=$1
  objfiles="$objfiles $file"
;;
-d | --debug | -v | --verbose)
  dbg=echo
;;
-h | -\? | --help)
  echo $usage_msg 1>&2
  cat << EOF

Options:

  -h, -?, --help  Print this message.

  -IDIR   Add -IDIR to compile commands.

  -idirafter DIR  Add -idirafter DIR to compile commands.

  -DDEF   Add -DDEF to compile commands.

  -lLIB   Add library LIB to link command.

  -LDIR   Add -LDIR to link command.

  -M, --dependGenerate dependency files (.d) for C and C++
  source files.

  -RDIR   Add -RDIR to link command.

  -W  Pass flags though the compiler like
-Wl,-rpath=...

  -c, --compile   Compile, but do not link.

  -o FILE, --output FILE  Output file name.  Default extension is .oct
  (or .mex if --mex is specified) unless linking
  a stand-alone executable.

  -g  Enable debugging options for compilers.

  -p VAR, --print VAR Print configuration variable VAR.  Recognized
  variables are:

ALL_CFLAGSFFTW_LIBS
ALL_CXXFLAGS  FLIBS
ALL_FFLAGSFPICFLAG
ALL_LDFLAGS   INCFLAGS
BLAS_LIBS LDFLAGS
CCLD_CXX
CFLAGSLD_STATIC_FLAG
CPICFLAG  LFLAGS
CPPFLAGS  LIBCRUFT
  

Bug#383149: [Pkg-octave-devel] Bug#383149: tried purging then reinstalling octave2.9 package

2006-08-17 Thread Thomas Weber
Am Donnerstag, den 17.08.2006, 09:59 +1000 schrieb John Dalton:
> After this fresh reinstall, symptoms are still present as before:
> $ mkoctfile -v uitest.cc
> g++ -c -fPIC -I/usr/include/octave-2.9.7
> -I/usr/include/octave-2.9.7/octave -m32 uitest.cc -o uitest.o
> /usr/bin/g++ -shared -Wl,-Bsymbolic -o uitest.oct uitest.o
> -L/usr/lib/octave-2.9.7 -loctinterp -loctave -lcruft -m32 -llapack-3
> -lblas-3 -lfftw3 -lreadline -lncurses -ldl -lhdf5 -lz -lm
> -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2
> -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64
> -L/usr/lib/../lib64 -lhdf5 -lz -lgfortranbegin -lgfortran -lm -lgcc_s
> /usr/bin/ld: skipping incompatible /usr/lib/octave-2.9.7/liboctinterp.so
> when searching for -loctinterp
> /usr/bin/ld: cannot find -loctinterp
> collect2: ld returned 1 exit status

There's something weird going on here. mkoctfile from the Debian package
calls g++ with its full path. Additionally, we don't pass the "-m32"
flag to the compiler. For comparision, the output in my chroot:

# mkoctfile -v uitest.cc 
/usr/bin/g++ -c -fPIC -I/usr/include/octave-2.9.7
-I/usr/include/octave-2.9.7/octave -O2 uitest.cc -o uitest.o
/usr/bin/g++ -shared -Wl,-Bsymbolic -o uitest.oct uitest.o
-L/usr/lib/octave-2.9.7 -loctinterp -loctave -lcruft -s -llapack-3
-lblas-3 -lfftw3 -lreadline -lncurses -ldl -lhdf5 -lz -lm
-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2
-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64
-L/usr/lib/../lib64 -lhdf5 -lz -lgfortranbegin -lgfortran -lm -lgcc_s

Is it possible that you have a local installation of Octave coming in
the way (i.e., that mkoctfile is not /usr/bin/mkoctfile)? Or that you
have a mixed 32/64 bit environment?

Thomas



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#383149: [Pkg-octave-devel] Bug#383149: tried purging then reinstalling octave2.9 package

2006-08-17 Thread John W. Eaton
On 17-Aug-2006, John Dalton wrote:

| I sent an email yesterday pointing out that I had octave2.1
| installed before octave2.9.  It seems to have gone missing.
| 
| In case it is a problem with packaging, here is the
| sequence I followed in installing octave:
| 
| 24/10/2005
| # apt-get install octave octave-forge octave-plplot octave2.1-doc
| octave2.1-info
| # apt-get install octave2.1-headers
| 
| 15/8/2006
| Upgrade to octave 2.9:
| # apt-get install octave2.9 octave2.9-info octave2.9-doc
| octave2.9-htmldoc octave2.9-headers
| 
| Try it out, then remove octave 2.1:
| # apt-get remove --purge octave octave2.1 octave2.1-info
| octave2.1-htmldoc octave2.1-headers
| 
| Report bug #383149.
| 
| 17/8/2006
| Wonder if the problem is an interaction between octave 2.1 and 2.9
| packages.  Do a clean reinstall of octave2.9 (ie. with no octave2.1)
| 
| # apt-get remove --purge octave2.9 octave2.9-info octave2.9-doc
| octave2.9-htmldoc octave2.9-headers
| # apt-get install octave2.9 octave2.9-info octave2.9-doc
| octave2.9-htmldoc octave2.9-headers
| 
| After this fresh reinstall, symptoms are still present as before:
| $ mkoctfile -v uitest.cc
| g++ -c -fPIC -I/usr/include/octave-2.9.7
| -I/usr/include/octave-2.9.7/octave -m32 uitest.cc -o uitest.o
| /usr/bin/g++ -shared -Wl,-Bsymbolic -o uitest.oct uitest.o
| -L/usr/lib/octave-2.9.7 -loctinterp -loctave -lcruft -m32 -llapack-3
| -lblas-3 -lfftw3 -lreadline -lncurses -ldl -lhdf5 -lz -lm
| -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2
| -L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64
| -L/usr/lib/../lib64 -lhdf5 -lz -lgfortranbegin -lgfortran -lm -lgcc_s
| /usr/bin/ld: skipping incompatible /usr/lib/octave-2.9.7/liboctinterp.so
| when searching for -loctinterp
| /usr/bin/ld: cannot find -loctinterp
| collect2: ld returned 1 exit status
| $

I'm unable to duplicate this problem.  I have an up-to-date "testing"
system and I installed Octave 2.9.7 with

  apt-get update
  apt-get -t unstable octave2.9{,-{headers,info,doc}}

and then ran

  update-alternatives --config mkoctfile
  update-alternatives --config octave
  update-alternatives --config octave-bug
  update-alternatives --config octave-config
  update-alternatives --config octave-depends

BTW, why do I have to run all these commands?  I think it would be
more friendly if running "update-alternatives --config octave" would
take care of the rest automatically so they would all stay in sync.

In any case, here is what I see:

$ dpkg -l octave2.9
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name   VersionDescription
+++-==-==-
ii  octave2.9  2.9.7-2GNU Octave language for numerical computatio
$ pwd
/home/jwe/src/octave/examples
$ ls -l hello.cc
-rw-r--r-- 1 jwe users 3103 Apr 30  2003 hello.cc
$ mkoctfile -v hello.cc
/usr/bin/g++ -c -fPIC -I/usr/include/octave-2.9.7 
-I/usr/include/octave-2.9.7/octave -O2 hello.cc -o hello.o
/usr/bin/g++ -shared -Wl,-Bsymbolic -o hello.oct hello.o 
-L/usr/lib/octave-2.9.7 -loctinterp -loctave -lcruft -s -llapack-3 -lblas-3 
-lfftw3 -lreadline -lncurses -ldl -lhdf5 -lz -lm 
-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2 
-L/usr/lib/gcc/x86_64-linux-gnu/4.1.2/../../../../lib64 -L/lib/../lib64 
-L/usr/lib/../lib64 -lhdf5 -lz -lgfortranbegin -lgfortran -lm -lgcc_s
$ octave
GNU Octave, version 2.9.7 (x86_64-pc-linux-gnu).
Copyright (C) 2006 John W. Eaton.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

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/help-wanted.html

Report bugs to <[EMAIL PROTECTED]> (but first, please read
http://www.octave.org/bugs.html to learn how to write a helpful report).

octave:1> hello
Hello, world!
octave:2> type hello
hello is a dynamically-linked function
octave:3> which hello
hello is the dynamically-linked function from the file
/export/home/jwe/src/octave/examples/hello.oct

jwe


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]