You are not logged in.

#1 2008-03-29 16:30:58

Shagbag
Member
Registered: 2006-10-25
Posts: 259

Problem compiling Octave3

I'm trying to compile Octave3 from the AUR.
I'm getting an error buy I don't know why.
I'm pretty sure I've got all of the dependencies, but I'm getting this:

...
making c-file-ptr-stream.d from c-file-ptr-stream.cc
making bitfcns.d from bitfcns.cc
making Cell.d from Cell.cc
make[2]: Leaving directory `/home/n00b/abs/local/octave3/src/octave-3.0.0/src'
make[2]: Entering directory `/home/n00b/abs/local/octave3/src/octave-3.0.0/src'
making defaults.h from defaults.h.in
defaults.h is unchanged
making oct-conf.h from oct-conf.h.in
oct-conf.h is unchanged
mkdir pic
touch stmp-pic
g++ -c  -fPIC -I. -I.. -I../liboctave -I../src -I../libcruft/misc  -DHAVE_CONFIG_H -mieee-fp -Wall -W -Wshadow -Wold-style-cast -march=i686 -mtune=generic -O2 -pipe Cell.cc -o pic/Cell.o
In file included from ov.h:41,
                 from oct-obj.h:33,
                 from Cell.h:32,
                 from Cell.cc:29:
mxarray.h: In static member function 'static char* mxArray::strsave(const char*)':
mxarray.h:305: error: 'strlen' was not declared in this scope
mxarray.h:307: error: 'strcpy' was not declared in this scope
make[2]: *** [pic/Cell.o] Error 1
make[2]: Leaving directory `/home/n00b/abs/local/octave3/src/octave-3.0.0/src'
make[1]: *** [src] Error 2
make[1]: Leaving directory `/home/n00b/abs/local/octave3/src/octave-3.0.0'
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...
n00b ~/abs/local/octave3  $

Last edited by Shagbag (2008-03-29 16:32:45)

Offline

#2 2008-03-29 17:13:04

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Problem compiling Octave3

see AUR comments ..


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2008-03-29 18:42:33

Shagbag
Member
Registered: 2006-10-25
Posts: 259

Re: Problem compiling Octave3

Thanks.  I'm not a programmer so I'm struggling to understand the problem.  Is it that mxarray.h needs to be patched?  If so, where do I find the patch?  Or do I simply need to insert '#include <cstring>' in the header of mxarray.h?

Last edited by Shagbag (2008-03-29 18:54:01)

Offline

#4 2008-03-29 19:50:33

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Problem compiling Octave3

Shagbag wrote:

Thanks.  I'm not a programmer so I'm struggling to understand the problem.  Is it that mxarray.h needs to be patched?  If so, where do I find the patch?  Or do I simply need to insert '#include <cstring>' in the header of mxarray.h?

You need to just do that, but it's better doing it with a patch.
A tarball of PKGBUILD with the patch, and the package itself are available there :
http://shining.toofishes.net/pkg/

If you don't trust me, you should just use the PKGBUILD to be able to check things carefully smile
If you do, you can use the package directly to save the compile time.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#5 2008-03-29 23:39:37

Shagbag
Member
Registered: 2006-10-25
Posts: 259

Re: Problem compiling Octave3

Thx v much for the package. big_smile

Offline

#6 2008-04-11 20:36:40

Shagbag
Member
Registered: 2006-10-25
Posts: 259

Re: Problem compiling Octave3

I've noticed that if I invoke /usr/bin/octave-3.0.0 as root then everything works fine, but if I invoke it as an unprivileged user I get an error "warning: addpath: /usr/lib/octave-devel/octave/3.0.0/oct/i686-pc-linux-gnu: No such file or directory" AND the 'time()' function won't work or any of the time-related functions eg. "error: `time' undefined near line 1 column 1".

I'm going to try compiling the source code again, but I would be interested to know if it's a bug in the package or something wrong with my Arch install.

Offline

#7 2008-04-11 21:52:03

Ramses de Norre
Member
From: Leuven - Belgium
Registered: 2007-03-27
Posts: 1,289

Re: Problem compiling Octave3

Shagbag wrote:

I've noticed that if I invoke /usr/bin/octave-3.0.0 as root then everything works fine, but if I invoke it as an unprivileged user I get an error "warning: addpath: /usr/lib/octave-devel/octave/3.0.0/oct/i686-pc-linux-gnu: No such file or directory" AND the 'time()' function won't work or any of the time-related functions eg. "error: `time' undefined near line 1 column 1".

I'm going to try compiling the source code again, but I would be interested to know if it's a bug in the package or something wrong with my Arch install.

It works here... I compiled it with a PKGBUILD based on the comments on AUR.

Offline

#8 2008-04-12 05:26:27

Shagbag
Member
Registered: 2006-10-25
Posts: 259

Re: Problem compiling Octave3

Yeah, I've just compile the source code and I'm getting the same errors.  It seems that when I'm root, octave looks for

/usr/lib/octave3/octave/3.0.0/oct/i686-pc-linux-gnu

but when I'm a non-privileged user it's looking for

/usr/lib/octave-devel/octave/3.0.0/oct/i686-pc-linux-gnu

I removed octave-devel before installing octave3 but, obviously, I didn't do it correctly.  Can anyone tell me how to fix this above problem?

Offline

Board footer

Powered by FluxBB