octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lt-octave and libtool run at first Octave invocation (was Re: Strang


From: Daniel J Sebald
Subject: Re: lt-octave and libtool run at first Octave invocation (was Re: Strange Permission denied error, JIT related?)
Date: Sun, 26 Aug 2012 13:19:30 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 08/26/2012 10:38 AM, Mike Miller wrote:
On Sun, Aug 26, 2012 at 5:18 AM, Daniel J Sebald wrote:
On 08/26/2012 03:39 AM, Max Brister wrote:

On Sun, Aug 26, 2012 at 2:01 AM, Daniel J Sebald<address@hidden>
wrote:

Max,

I just started seeing a strange error from the most recent code.  I
compiled
as root, then run octave from a user account and get a permission denied
error.  I ran twice and got this:

[sebald ~]$ /usr/local/src/octave/octave/build-nogui/run-octave
/usr/bin/ld: cannot open output file
/usr/local/src/octave/octave/build-nogui/src/.libs/19012-lt-octave:
Permission denied
collect2: ld returned 1 exit statusn[sebald ~]$
/usr/local/src/octave/octave/build-nogui/run-octave
/usr/bin/ld: cannot open output file
/usr/local/src/octave/octave/build-nogui/src/.libs/19205-lt-octave:
Permission denied
collect2: ld returned 1 exit statusn[sebald ~]$

Notice that the error message looks to be missing a backslash.  It says
"statusn" and then the command line begins.  I think that is supposed to
be
"status\n".

Notice that the library that Octave is looking for changed between
attempts.
In one case it is 19012-lt-octave, in the other it is 19205-lt-octave.
Neither of these files are present in src/.libs.  All I see in that
directory is "octave" and "octave-cli".  The two different file names
make
me think JIT.

Now here's the strange part.  I launch ./run-octave from the build
directory
as root and Octave runs as normal (not surprising, I suppose).  But then
I
try again as a user and now Octave runs as normal (surprising?).

Dan


Dan,

I think something odd happened when you were linking. I do not see how
JIT could be directly related to this issue as JIT does not generate
any temporary files, and nothing is kept across multiple invocations
of Octave.

When I look in my src/.libs folder I see
lt-octave  octave  octave-cli


OK, sorry.  I must have never run from "user" without having run from "root"
first.  Running octave from root (i.e., the first invocation) creates the
"lt-octave" file.

Yes, "lt" is short for libtool, which is supposed to manage the
complexity of shared libraries on differing systems with no set
standard. More on that further down.

This begs the question that I think was posed in a prior thread, why
are you building or running as root?

For the simple reason of keeping large amounts of object files out of a user account. In the linux directory tree is /usr/src and /usr/local/src. When I first started on linux it was suggested (by some Fedora 3.0 computer book back in the day online repositories weren't so common or the admin software add/remove was too flaky) to do builds there, then install. Also, the way university computer accounts used to be, one couldn't build something like Octave in a user account because there wasn't enough space in the account for all the object files. It's just old habits I guess, but I still like doing that because if one does backup of user accounts, there aren't all these object files being backed up. I do like to keep different builds of Octave around at least for a while for new feature debugging/testing (i.e., development) purposes because it takes an hour to rebuild on top of having to maybe reconstruct some source tree according to date/changeset. So, it gets to be a lot of object files. For mods I make within /usr/local/src, then I'll keep a diff file in the user account... I wrote "old habits" above because now days it seems the trend is to get rid of the root command line and replace it with sudo, which is one of the reasons I continue to use Fedora as opposed to, say, Ubuntu.


I'm not sure what the intended behavior is.  Can someone please clear up the
sequence of events.

Here's my attempt. This is all related to libtool, and all intended to
be "under the hood", no need to dig into these details normally.

When you run in the build directory, libtool is intervening to make
sure the shared libraries that the executable needs are found in the
build hierarchy, because they haven't been installed yet.

In the build directory, look at src/octave. It is a shell script
created by libtool just for the purpose of running in the build
directory. This is the script that creates lt-octave the first time
you run it.

Now if you look in src/.libs, those are the real executables, octave
is the one that is installed by "make install", lt-octave is only used
for running in the build tree.

When you make "install", the libraries and executables are copied to
the paths you specified in your invocation of configure (or defaults).
This means the libraries will be found as intended and none of this
libtool shell script indirection is needed anymore. As long as basic
file permissions are correct on the install destination, anyone can
run the installed binaries.

Hope that clears things up a bit.

Yes, I see now, thanks.

The small size of src/.libs/octave is misleading but internally it is a binary definition of where the machine code files reside.

And src/octave defines

  program=lt-'octave'

which explains why grepping for "lt-octave" came up empty.

Dan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]