Opened 7 years ago

Closed 3 years ago

#1568 closed defect (worksforme)

'make install' results in an installation dependent upon temporary build directories

Reported by: helsene Owned by: grass-dev@…
Priority: normal Milestone: 7.0.5
Component: Installation Version: svn-trunk
Keywords: make install Cc:
CPU: x86-64 Platform: Linux

Description

I did a compilation of GRASS from the SVN repo on 2.7.12 using Debian Squeeze and the instructions given at http://grass.osgeo.org/wiki/Compile_and_Install#GRASS_7_on_Debian_Squeeze.

After using 'sudo make install' and having the installation placed in /usr/local/grass7.0.svn, the resulting installation still seems to require libs in /<checkoutdir>/dist.x86_64-unknown-linux-gnu/lib/. Specifically, launching the program causes it to look for libgrass_raster.7.0.svn.so in the build directory and subsequently throw a 'permission denied' error when using GRASS with a user other than the one who did the build.

This causes issues loading libraries for other users, who get 'permission denied' errors when attempting to access the /<checkoutdir>/dist.x86_64-unknown-linux-gnu/lib/ directory.

The workaround is to make the build dirs globally readable, but I'm pretty sure this isn't intended behavior. I imagine building and deploying a deb package would fail as the checkout directory wouldn't be present on a system where the build did not occur.

Change History (6)

comment:1 in reply to:  description Changed 7 years ago by hamish

Replying to helsene:

I did a compilation of GRASS from the SVN repo on 2.7.12 using Debian Squeeze and the instructions given at http://grass.osgeo.org/wiki/Compile_and_Install#GRASS_7_on_Debian_Squeeze.

...

I imagine building and deploying a deb package would fail as the checkout directory wouldn't be present on a system where the build did not occur.

please try the DebianGIS build instructions at https://trac.osgeo.org/grass/browser/grass/trunk/debian/README.debian

perhaps no one has tried running 'make install' for grass7 before? (I imagine most devs just run it out of the dist.x86*/ dir directly)

Hamish

comment:2 Changed 7 years ago by helsene

I've tried the README.debian instructions, they require some extra tinkering to get them going. Installing per the instructions requires 'tcl' >=8.5, the dependency check fails even when 'tcl8.5-dev' is installed as the 'tcl' package either refers to 8.4 or is not installed. 'tcl' needs to be pulled from wheezy for the README.debian instructions to proceed; but that's a separate issue.

The 'debuild -i -uc -us -b' step in README.debian fails when it tries to run 'mkdir -p /usr/lib/bin' of all things.

/usr/bin/make real-install
make[2]: Entering directory `/home/helsene/src/g7_trunk'
mkdir -p -m 755 /home/helsene/src/g7_trunk/debian/tmp/usr/lib/grass70
mkdir -p -m 755 /usr/lib/bin
mkdir: cannot create directory `/usr/lib/bin': Permission denied
make[2]: *** [/usr/lib/bin] Error 1
make[2]: Leaving directory `/home/helsene/src/g7_trunk'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/helsene/src/g7_trunk'
make: *** [install] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1325:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

So far, two methods of compiling 7.0 for a multi-user Debian Squeeze install are not working with the given instructions. This 'debuild' error should probably be split into its own ticket depending on where the error lies ('make real-install' or the debian packaging git repo's configs). I don't know enough about the install scripts to judge that.

comment:3 in reply to:  2 ; Changed 7 years ago by hamish

Keywords: make install added

Replying to helsene:

I've tried the README.debian instructions, they require some extra tinkering to get them going.

(hmm, works for me..)

Installing per the instructions requires 'tcl' >=8.5, the dependency check fails even when 'tcl8.5-dev' is installed as the 'tcl' package either refers to 8.4 or is not installed. 'tcl' needs to be pulled from wheezy for the README.debian instructions to proceed; but that's a separate issue.

? both tcl8.4-dev and tcl8.5-dev are in all debians from lenny to sid. no need to pull anything in from another version.

http://packages.debian.org/tcl8.4-dev http://packages.debian.org/tcl8.5-dev

GRASS will work with either version, if you have one installed already you can edit the debian/control file to match it.

anyway, tcl/tk can be switched off in grass7 without too many ill effects. (the main one is you lose access to classic nviz)

The 'debuild -i -uc -us -b' step in README.debian fails when it tries to run 'mkdir -p /usr/lib/bin' of all things.

> /usr/bin/make real-install
> make[2]: Entering directory `/home/helsene/src/g7_trunk'
> mkdir -p -m 755 /home/helsene/src/g7_trunk/debian/tmp/usr/lib/grass70
> mkdir -p -m 755 /usr/lib/bin
> mkdir: cannot create directory `/usr/lib/bin': Permission denied
> make[2]: *** [/usr/lib/bin] Error 1
> make[2]: Leaving directory `/home/helsene/src/g7_trunk'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/home/helsene/src/g7_trunk'
> make: *** [install] Error 2
> dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
> debuild: fatal error at line 1325:
> dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

That is new to me and I don't understand the reason for it at all.

So far, two methods of compiling 7.0 for a multi-user Debian Squeeze install are not working with the given instructions.

I build trunk all the time on a pretty vanilla squeeze, with no problems. here's the build script I use:

(works on both grass 6.x and 7; change -march= to match your cpu model, see the gcc man page for options; ./configure ignores any switch which isn't relevant)

renice +17 -p $$

# AMD 64:  -march=amdfam10

CFLAGS="-ggdb -march=amdfam10 -Wall -Werror-implicit-function-declaration" \
  ./configure \
    --with-tcltk-includes=/usr/include/tcl8.5 --with-cairo \
    --with-motif --with-python=/usr/bin/python2.6-config \
    --with-readline --with-cxx --with-odbc --with-sqlite \
    --with-freetype --with-freetype-includes=/usr/include/freetype2 \
    --without-postgres --with-proj-share=/usr/share/proj \
    --enable-64bit --with-pthread -with-openmp \
    --with-wxwidgets=/usr/lib/wx/config/gtk2-unicode-release-2.8 \
    --with-geos \
    2>&1 | tee config_log.txt

time make -j 8

This 'debuild' error should probably be split into its own ticket depending on where the error lies ('make real-install' or the debian packaging git repo's configs). I don't know enough about the install scripts to judge that.

I do a package build of 6.4.svn on sid fairly regularly (any time I/we change the DebianGIS package files, and pre-release testing) and haven't seen that. I've never tried to package grass/trunk though, so maybe there's some patch it doesn't like.

can you run grass70 from the src/bin.x86_64-.../grass7 python script? if so, try symlinking that into ~/bin/grass70

  • you need to edit that python script to set LD_LIBRARY_PATH to the right place. make install should do that for you (in the /usr/local/grass7.0.svn installed copy). wrt your original problem, perhaps that replacement is faulty?

for the real-install make target's sed substitution, see

trunk/include/Make/Install.make

Hamish

comment:4 in reply to:  3 Changed 7 years ago by hamish

Replying to hamish:

you need to edit that python script to set LD_LIBRARY_PATH to the right place.

correction: edit /usr/local/grass7.0.svn/.../grass70 (or is that in /usr/local/bin/?) and change gisbase to /usr/local/grass7.0.svn

Hamish

comment:5 Changed 3 years ago by martinl

Milestone: 7.0.07.0.5

comment:6 Changed 3 years ago by martinl

Resolution: worksforme
Status: newclosed

No activity last 5 years, closing, feel free to reopen if needed.

Note: See TracTickets for help on using tickets.