bugGNUstep - Bugs: bug #26437, Base should allow the usual...

 
 

bug #26437: Base should allow the usual "make && sudo make install"

Submitted by:  Markus Hitter <hitterm>
Submitted on:  Sun 03 May 2009 05:21:38 PM UTC  
 
Category:  Makefiles Severity:  3 - Normal
Item Group:  Change Request Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sat 03 Oct 2009 09:25:57 PM UTC, comment #7: 

> I suppose we could prompt the ubuntu package manager for
> gnustep-make to submit a new filesystem layout file defining
> where gnustep-config should be put to be in the PATH.


I actually think they should either use the FHS layout, so that gnustep-config is in /usr/bin, or, if they use the GNUstep layout, they should add /usr/GNUstep/System/Tools and /usr/GNUstep/Local/Tools to the PATH.

Having just gnustep-config in the PATH is pretty useless ... I mean when users install Gorm, how are they going to run it if the Gorm executable is not in the PATH ?

It's obvious that the location of GNUstep executables should be in the PATH for any working installation.  That includes gnustep-config, but more importantly includes all the GNUstep tools and applications that users are likely to install and use.

I personally don't see much point in having gnustep-config in the PATH but not having other GNUstep tools/applications in the PATH.

So, they really need to fix how they install and setup GNUstep so that GNUstep tools/apps are in the PATH and users can use them :-)

Thanks

Nicola Pero <nico>
Project Member
Sat 03 Oct 2009 03:44:08 PM UTC, comment #6: 

I suppose we could prompt the ubuntu package manager for gnustep-make to submit a new filesystem layout file defining where gnustep-config should be put to be in the PATH.  I think the main point of the --with-layout= configure option was to allow packagers to specify where they want things put, and it probably makes sense for them to submit their layouts to be part of the official gnustep-make package rather than keeping them to themselves.

Richard Frith-Macdonald <CaS>
Project Member
Sat 03 Oct 2009 10:53:24 AM UTC, comment #5: 

Yes, this is not a gnustep-base problem.

In fact, it's not even a GNUstep problem :-).  You'll have the same problem with any other software that is installed into a custom, non-native location.  Eg, if you install some package into /opt/package, you then obviously have to add /opt/package/bin (or whatever it is) to your PATH before you can use it properly.  And if you're using 'sudo' to do stuff (an almost identical example is Python's "sudo setup.py install" if you have your own custom Python installation), then you need to make sure /opt/package/bin is in root's PATH as well ;-)

I can see two solutions:

  • install gnustep-make "properly" so that root can use it (either by installing it using a native filesystem so that gnustep-config automatically ends up in the PATH, or if it's installed in a non-native setup, by adding the gnustep paths to the PATH and LD_LIBRARY_PATH in /etc/profile or similar)
  • use 'sudo -E make install' so that root will inherit the 'temporary' environment from your current user.

I agree with Richard that the best thing we can do is to improve the documentation.  The error message printed by gnustep-base when gnustep-make can't be found is a good place to put any helpful explanation as that is most likely where users would stumble upon this problem. :-)

I agree with closing the bug as I am not sure what more we could do. ;-)

Thanks

Nicola Pero <nico>
Project Member
Fri 02 Oct 2009 07:16:44 PM UTC, comment #4: 

I guess this ought to be closed ... it's really very clear that base DOES allow the usual "make && sudo make install", and the problem here is simply that gnustep-make has not been installed for general use.

gnustep-base (and all other gnustep libraries and applications) depend on gnustep-make being installed, and in this respect are no different from any other software package ... if something the package depends on is not installed, the package won't build.

Also like most other packages, if the dependency is installed but in the wrong place so it can't be found, we have a mechanism (setting the environment variable) to tell it where the thing is.

I note the phrase 'Ubuntu comes with a gnustep-make package'

This presumably means that the gnustep-make supplied with ubuntu does not install itsself properly (or perhaps is a really old version) so that gnustep-config is not found in the standard PATH.  Perhaps a note to the maintainers of the package would be effective in getting that fixed?

Richard Frith-Macdonald <CaS>
Project Member
Mon 04 May 2009 10:39:09 AM UTC, comment #3: 

> 2. Removing the ability to use the GNUSTEP_MAKEFILES
> environment variable by hard-coding its value into a
> makefile would not be acceptable to most people.


So can I assume something like

ifeq ($(GNUSTEP_MAKEFILES),)
  GNUSTEP_MAKEFILES=/hardcoded/path/to/Makefiles
endif

would be better? Currently, if GNUSTEP_MAKEFILES isn't set it's as well unlikely gnustep-config is found.

> it's not completely clear that this really is a gnustep
> issue at all. Perhaps it's an Ubuntu package issue? Did
> gnustep-make come with Ubuntu?


Ubuntu comes with a gnustep-make package, but here both, gnustep-make and gnustep-base, were installed from svn. The standard procedure for installations from source is still to use sudo without -E. See http://ubuntuguide.org/wiki/Ubuntu:Jaunty#Installing_a_package_from_source

Markus Hitter <hitterm>
Mon 04 May 2009 08:41:07 AM UTC, comment #2: 

It looks like a sudo related issue to me...

On recent Ubuntu versions (and other systems too), sudo make install won't work because sudo doesn't pass the current environment variables to the subshell anymore, sudo -E make install does the trick. It alters sudo behavior so that it keeps your environment variables.

Quentin Mathé <qmathe>
Project Member
Mon 04 May 2009 07:45:50 AM UTC, comment #1: 

I'm afraid this patch/request isn't really usable.

1. This is not a base/foundation issue as it would apply to any/all gnustep packages.

2. Removing the ability to use the GNUSTEP_MAKEFILES environment variable by hard-coding its value into a makefile would not be acceptable to most people.

3. The underlying problem is not addressed.  Generally gnustep installations work fine with sudo.  In this case it would seem that gnustep-make has not been properly installed, as gnustep-config would have supplied the fallback location of the makefiles package if it had been.

I have changed gnustep-base's makefiles to print more informative messages telling you that gnustep-config was unusable, displaying the PATH searched and suggesting that gnustep-make may not be properly installed.

That doesn't solve the problem, but it should help direct investigations in future.

I also reclassified this as a makefiles issue, though it's not completely clear that this really is a gnustep issue at all.  Perhaps it's an Ubuntu package issue?  Did gnustep-make come with Ubuntu?  Is it the fault of the Ubuntu system that (presumably) gnustep-config is not found in root's PATH, or is it an issue with gnustep-make's own installation process?

Richard Frith-Macdonald <CaS>
Project Member
Sun 03 May 2009 05:21:38 PM UTC, original submission:  

As having direct access to the root account becomes more an more out of fashion in favour of using "sudo", installation of GNUstep Base should allow this as well. On how it doesn't work, see https://savannah.gnu.org/bugs/index.php?26428 .

The attached patch is huge, because is removes a lot of then obsolete stuff. In essence it is only one line in configure.ac and one line in config.mak.in. Together, they are adding a line

GNUSTEP_MAKEFILES=/path/to/GNUstep/Makefiles/

to config.mak, which is in turn included by (almost) all GNUmakefiles already. As the existence of the variable is now secured, there remains no need to check this fact, thus the huge removal.

Checked on Ubuntu 9.04 x86_64 with the following sequence:

svn update
make distclean
autoconf  # 2.63
./configure
make
sudo make install

Markus Hitter <hitterm>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by nico (Posted a comment)
  • -email is unavailable- added by qmathe (Posted a comment)
  • -email is unavailable- added by CaS (Posted a comment)
  • -email is unavailable- added by hitterm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-02 CaS StatusNone => Invalid
        Open/ClosedOpen => Closed
    2009-05-04 CaS CategoryBase/Foundation => Makefiles
    2009-05-03 hitterm Attached File- => Added GNUSTEP_MAKEFILES-patch.txt, #18080

    Back to the top


    Powered by Savane 3.6