[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mkoctfile: Problems sometimes during linking of text file
From: |
Joao Cardoso |
Subject: |
Re: mkoctfile: Problems sometimes during linking of text file |
Date: |
Thu, 20 Apr 2000 03:06:18 +0100 |
"John W. Eaton" wrote:
>
> On 19-Apr-2000, Stephen Eglen <address@hidden> wrote:
>
> | Hi,
> |
> | Sometimes when using mkoctfile, I get the followng error during the
> | final link stage (I've put the \ continuation lines in myself):
> |
> | c++ -c -I/home/data6/stephen/include -I/home/data6/stephen/include \
> | -I/home/data6/stephen/include/octave-2.0.16 -mieee-with-inexact \
> | -fno-rtti -fno-exceptions -fno-implicit-templates -g -O2 -Wall \
> | sjevor_wrap.cc -o sjevor_wrap.o
> | c++ -shared -Xlinker -expect_unresolved -Xlinker '*' \
> | -o sjevor_wrap.oct sjevor.o sjevor_wrap.o
> | /usr/ucb/ld:
> | Can't create output file (Text file busy)
> | collect2: ld returned 1 exit status
> |
> | It looks to me that it may be a ld problem rather than anything to do
> | with Octave. This happens about one time in four of running the
Look at the Octave help bellow.
> | compilation; normally when I get it, if I recompile then it all works
> | okay. I was just wondering if anyone else got this, and if I can do
> | anything about it.
> |
> | By the way, I don't call mkoctfile directly, but use the matwrap perl
> | script to do the hard work. This is on DEC OSF/1.
>
> I believe `text file busy' can happen on some systems when you try to
> write to an executable file that is running at the time,
Yes, you are right. And I don't know how it can be the other way... but
looks that under linux it can be done.
A related problem is how to `unload' a .oct file from a running Octave,
in order to recompile it without leaving Octave. Because of the above
problem, the following runs in some Octave versions and not in others. I
can't specify :(
> Just as for M-files, Octave will automatically reload dynamically
> linked functions when the files that define them are more recent than
> the last time that the function was loaded. Two variables are
> available to control how Octave behaves when dynamically linked
> functions are cleared or reloaded.
>
> - Built-in Variable: auto_unload_dot_oct_files
> If the value of `auto_unload_dot_oct_files' is nonzero, Octave will
> automatically unload any `.oct' files when there are no longer any
> functions in the symbol table that reference them.
This mean after a `clear' is issued?
Joao
> so I don't
> think this is really a problem with mkoctfile, but maybe it can be
> avoided. Does the following change to mkoctfile.in help (for 2.1.x,
> but should also work for the 2.0.x sources)? If not, I'm not sure
> what else can be done.
>
> jwe
>
> Index: mkoctfile.in
> ===================================================================
> RCS file: /usr/local/cvsroot/octave/mkoctfile.in,v
> retrieving revision 1.18
> diff -c -r1.18 mkoctfile.in
> *** mkoctfile.in 2000/02/08 19:19:18 1.18
> --- mkoctfile.in 2000/04/19 15:37:49
> ***************
> *** 187,192 ****
> --- 187,195 ----
> done
> fi
>
> + $dbg "rm -f $octfile"
> + rm -f $octfile
> +
> # Link all the object files.
>
> $dbg $SH_LD $SH_LDFLAGS -o $octfile $objfiles $ldflags
>
> -----------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
> How to fund new projects: http://www.che.wisc.edu/octave/funding.html
> Subscription information: http://www.che.wisc.edu/octave/archive.html
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- mkoctfile: Problems sometimes during linking of text file, Stephen Eglen, 2000/04/19
- Re: mkoctfile: Problems sometimes during linking of text file, John W. Eaton, 2000/04/20
- Re: mkoctfile: Problems sometimes during linking of text file, Teemu Ikonen, 2000/04/20
- Re: mkoctfile: Problems sometimes during linking of text file, Kai Habel, 2000/04/20
- Re: mkoctfile: Problems sometimes during linking of text file, Stef Pillaert, 2000/04/20
- Re: mkoctfile: Problems sometimes during linking of text file, John W. Eaton, 2000/04/25
- Re: mkoctfile: Problems sometimes during linking of text file, Joao Cardoso, 2000/04/26