Building/installing Octave as a non-administrator on a sudo system

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Building/installing Octave as a non-administrator on a sudo system

Daniel Sebald
I'm curious how many developers have attempted building and install
Octave as a non-administrator on a system with sudo.  A
non-administrator is someone who does not have privilege to run "sudo".
  I might guess it is few, as most people on this list are the admin
type who automatically opt for sys-admin status given the chance.

Given trends, I've now had the experience of working on a sudo-linux
system.  I created my account to be non-administrator, thinking there
was always the default "user" account as a fallback.  It wasn't
enjoyable building and installing Octave this way.

Things seemed to build fine.  And I could run.  Installing packages
didn't go well, however.  The complaint from "pkg" command was that
there is no "mkoctfile".  Eventually I figured out that one simply had
to make and install octave as an administrator, then "mkoctfile" was
available.  But of course, being a non-administrator meant I couldn't
run sudo.  Nor could I log in to the "user" account and run sudo.  I had
to exit the Desktop and log in to the "user" account.  Going back to my
non-admin account and now running under a non-local Octave, mkoctfile
was visible, but the package files existing as *.oct object files
weren't visible until I added to the search path the directories where
the .oct files existed.

I suppose that the pool of un-experienced, non-admin users who will
attempt an Octave build is small, but before the next release we should
probably put some thought into how Octave now works for the non-admin
sort, e.g., do packages install without problems when an account is
non-admin.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

John W. Eaton
Administrator
On 10/05/2013 01:05 PM, Daniel J Sebald wrote:
> I'm curious how many developers have attempted building and install
> Octave as a non-administrator on a system with sudo.

I regularly build and install Octave as a non-privileged user in
non-system directories on my system.  Installing Octave Forge packages
using one of these installations seems to work fine for me.

jwe

Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Daniel Sebald
On 10/05/2013 01:17 PM, John W. Eaton wrote:
> On 10/05/2013 01:05 PM, Daniel J Sebald wrote:
>> I'm curious how many developers have attempted building and install
>> Octave as a non-administrator on a system with sudo.
>
> I regularly build and install Octave as a non-privileged user in
> non-system directories on my system. Installing Octave Forge packages
> using one of these installations seems to work fine for me.

Starting without "mkoctfile" already present in a system bin directory?

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Richard Crozier
In reply to this post by Daniel Sebald
On 05/10/2013 18:05, Daniel J Sebald wrote:
> I'm curious how many developers have attempted building and install
> Octave as a non-administrator on a system with sudo.
>
> Dan
>

I've done this, it works fine, and I haven't had any problems with
packages this way, although I don't use many, mostly odepkg. The main
problem building this way was getting all the appropriate build
dependencies as I had to also build and install locally several of these.

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

John W. Eaton
Administrator
In reply to this post by Daniel Sebald
On 10/05/2013 01:05 PM, Daniel J Sebald wrote:

 > Given trends, I've now had the experience of working on a sudo-linux
 > system.

I don't know what "trends" you are talking about or what you mean by
"sudo-linux system".

 > Things seemed to build fine. And I could run. Installing packages didn't
 > go well, however. The complaint from "pkg" command was that there is no
 > "mkoctfile".

Did you install Octave, or were you trying to build packages when
running Octave in the build directory with the ./run-octave script?

If you installed Octave, then the mkoctfile script corresponding to the
version of Octave that you built and installed should have also been
installed in the same directory as the octave binary.  And then the pkg
command should have found that mkoctfile script.

If you tried to build a package with mkoctfile when running Octave from
the build tree with the ./run-octave script, then that is not currently
expected to work.

jwe
Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Richard Crozier
On 05/10/2013 21:13, John W. Eaton wrote:
> On 10/05/2013 01:05 PM, Daniel J Sebald wrote:
>
>
> If you tried to build a package with mkoctfile when running Octave from
> the build tree with the ./run-octave script, then that is not currently
> expected to work.
>
> jwe
>

Is there a way to do this? I would quite like to test packages without
installing after building from the dev sources sometimes.

Richard



--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.

Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Daniel Sebald
In reply to this post by John W. Eaton
On 10/05/2013 03:13 PM, John W. Eaton wrote:

> On 10/05/2013 01:05 PM, Daniel J Sebald wrote:
>
>>  Given trends, I've now had the experience of working on a sudo-linux
>>  system.
>
> I don't know what "trends" you are talking about or what you mean by
> "sudo-linux system".
>
>>  Things seemed to build fine. And I could run. Installing packages didn't
>>  go well, however. The complaint from "pkg" command was that there is no
>>  "mkoctfile".
>
> Did you install Octave, or were you trying to build packages when
> running Octave in the build directory with the ./run-octave script?

I attempted package installation from ./run-octave.


> If you installed Octave, then the mkoctfile script corresponding to the
> version of Octave that you built and installed should have also been
> installed in the same directory as the octave binary. And then the pkg
> command should have found that mkoctfile script.
>
> If you tried to build a package with mkoctfile when running Octave from
> the build tree with the ./run-octave script, then that is not currently
> expected to work.

Right.  I suppose rather than just "make install", one needs to
configure the build with:

./configure --prefix='/home/<account>/bin'

I will try that when I get a chance.

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Mike Miller
In reply to this post by Daniel Sebald
On Sat, Oct 5, 2013 at 12:05:09 -0500, Daniel J Sebald wrote:
> I'm curious how many developers have attempted building and install Octave
> as a non-administrator on a system with sudo.  A non-administrator is
> someone who does not have privilege to run "sudo".  I might guess it is few,
> as most people on this list are the admin type who automatically opt for
> sys-admin status given the chance.

I do this regularly. If I have no admin privileges whatsoever, I
install into my home directory. Even on my home machines where I do
have admin privileges, I simply make a directory /opt/gnu/octave as
root, chown it to be owned by my user account, and then install into
there.

Specifically, all I have to do is

  ../configure --prefix=/opt/gnu/octave
  make
  make install

and set up my PATH to include /opt/gnu/octave/bin. Or set prefix to $HOME

  ../configure --prefix=$HOME

and add $HOME/bin to the PATH, which I think may already be done for
you by default for some distros.

--
mike
Reply | Threaded
Open this post in threaded view
|

Re: Building/installing Octave as a non-administrator on a sudo system

Daniel Sebald
On 10/05/2013 07:32 PM, Mike Miller wrote:

> On Sat, Oct 5, 2013 at 12:05:09 -0500, Daniel J Sebald wrote:
>> I'm curious how many developers have attempted building and install Octave
>> as a non-administrator on a system with sudo.  A non-administrator is
>> someone who does not have privilege to run "sudo".  I might guess it is few,
>> as most people on this list are the admin type who automatically opt for
>> sys-admin status given the chance.
>
> I do this regularly. If I have no admin privileges whatsoever, I
> install into my home directory. Even on my home machines where I do
> have admin privileges, I simply make a directory /opt/gnu/octave as
> root, chown it to be owned by my user account, and then install into
> there.

Yes, that would keep the binary outside of the user account.  Although,
for a user with, say, limited account disk space, maybe it would make
sense to build in the /tmp directory and use

>    ../configure --prefix=$HOME
>
> and add $HOME/bin to the PATH,

That way the executable would be in the account, but the object files in
/tmp and eventually discarded.

Dan