[GRASS-dev] Compiling grass7_trunk in Funtoo

Hi devs!

Hope that some advanced Gentoo user is tuned-in. I am trying to compile
grass7_trunk in Funtoo. I managed to get a clean configuration of almost
everything required (except for LAPACK, BLAS and FFMPEG, all of which, if
I am no miss-taking, are not required).

The compilation ends-up like:

--%<---
Started compilation: Sun Jul 7 10:24:41 EEST 2013
--
Errors in:
/osgeo/src/grass7_trunk/lib/python/ctypes
/osgeo/src/grass7_trunk/db/drivers/ogr
/osgeo/src/grass7_trunk/db/drivers/dbf
/osgeo/src/grass7_trunk/db/drivers/postgres
/osgeo/src/grass7_trunk/db/drivers/sqlite
/osgeo/src/grass7_trunk/db/drivers/odbc
/osgeo/src/grass7_trunk/db/drivers/mysql
/osgeo/src/grass7_trunk/gui/wxpython/vdigit
/osgeo/src/grass7_trunk/gui/wxpython/mapswipe
/osgeo/src/grass7_trunk/gui/wxpython/rlisetup
/osgeo/src/grass7_trunk/gui/wxpython/animation
/osgeo/src/grass7_trunk/gui/wxpython/dbmgr
/osgeo/src/grass7_trunk/gui/wxpython/psmap
/osgeo/src/grass7_trunk/gui/wxpython/iclass
/osgeo/src/grass7_trunk/gui/wxpython/gmodeler
/osgeo/src/grass7_trunk/man
--
In case of errors please change into the directory with error and run
'make'.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.
--
Finished compilation: Sun Jul 7 10:25:27 EEST 2013
make: *** [default] Error 1
--->%--

Running make inside some of the above mentioned directories, tells that
some script was denied permissions to execute. I think it is a
Gentoo/Funtoo thing and has nothing to do with GRASS or missing
dependencies.

For example,

--%<---
/osgeo/src/grass7_trunk/db/drivers/ogr $ make

VERSION_NUMBER=7.0.svn /osgeo/src/grass7_trunk/dist.x86_64-unknown-
linux-gnu/tools/g.html2man.py /osgeo/src/grass7_trunk/dist.x86_64-
unknown-linux-gnu/docs/html/grass-ogr.html
/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/docs/man/man1/grass-ogr.1
/bin/sh: /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/tools/g.html2man.py: Permission denied
make: *** [/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/docs/man/man1/grass-ogr.1] Error 126
--->%--

or

--%<---
nik@localhost /osgeo/src/grass7_trunk/gui/wxpython/vdigit $ make

[..]
/bin/sh: /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/scripts/g.gui.vdigit: Permission denied
make[1]: *** [g.gui.vdigit.tmp.html] Error 1
rm g.gui.vdigit.tmp.html
make[1]: Leaving directory `/osgeo/src/grass7_trunk/gui/wxpython/vdigit'
make: *** [guiscript] Error 2
--->%--

What should I watch out for?
Thank you, Nikos

On Sun, Jul 7, 2013 at 10:25 AM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:

Hi devs!

Hope that some advanced Gentoo user is tuned-in. I am trying to compile
grass7_trunk in Funtoo. I managed to get a clean configuration of almost
everything required (except for LAPACK, BLAS and FFMPEG, all of which, if
I am no miss-taking, are not required).

You can check for optional functionality with ./configure --help.
AFAIK, BLAS and LAPACK are not used.

The compilation ends-up like:

--%<---
Started compilation: Sun Jul 7 10:24:41 EEST 2013
--
Errors in:
/osgeo/src/grass7_trunk/lib/python/ctypes
/osgeo/src/grass7_trunk/db/drivers/ogr
/osgeo/src/grass7_trunk/db/drivers/dbf
/osgeo/src/grass7_trunk/db/drivers/postgres
/osgeo/src/grass7_trunk/db/drivers/sqlite
/osgeo/src/grass7_trunk/db/drivers/odbc
/osgeo/src/grass7_trunk/db/drivers/mysql
/osgeo/src/grass7_trunk/gui/wxpython/vdigit
/osgeo/src/grass7_trunk/gui/wxpython/mapswipe
/osgeo/src/grass7_trunk/gui/wxpython/rlisetup
/osgeo/src/grass7_trunk/gui/wxpython/animation
/osgeo/src/grass7_trunk/gui/wxpython/dbmgr
/osgeo/src/grass7_trunk/gui/wxpython/psmap
/osgeo/src/grass7_trunk/gui/wxpython/iclass
/osgeo/src/grass7_trunk/gui/wxpython/gmodeler
/osgeo/src/grass7_trunk/man
--
In case of errors please change into the directory with error and run
'make'.

Please note that...

If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

--
Finished compilation: Sun Jul 7 10:25:27 EEST 2013
make: *** [default] Error 1
--->%--

Running make inside some of the above mentioned directories,

You should really start with the first error

tells that
some script was denied permissions to execute. I think it is a
Gentoo/Funtoo thing and has nothing to do with GRASS or missing
dependencies.

For example,

--%<---
/osgeo/src/grass7_trunk/db/drivers/ogr $ make

VERSION_NUMBER=7.0.svn /osgeo/src/grass7_trunk/dist.x86_64-unknown-
linux-gnu/tools/g.html2man.py /osgeo/src/grass7_trunk/dist.x86_64-
unknown-linux-gnu/docs/html/grass-ogr.html
/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/docs/man/man1/grass-ogr.1
/bin/sh: /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/tools/g.html2man.py: Permission denied

Check the permissions of
/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-gnu/tools/g.html2man.py

or

--%<---
nik@localhost /osgeo/src/grass7_trunk/gui/wxpython/vdigit $ make

[..]
/bin/sh: /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/scripts/g.gui.vdigit: Permission denied

Check the permissions of
/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-gnu/scripts/g.gui.vdigit

Compilation should be done as normal user, not root. That means that
the source should be obtained and copied to its current location as
normal user. Maybe that helps.

Markus M

Nikos Alexandris:

> Hope that some advanced Gentoo user is tuned-in. I am trying to compile
> grass7_trunk in Funtoo. I managed to get a clean configuration of almost
> everything required (except for LAPACK, BLAS and FFMPEG, all of which, if
> I am no miss-taking, are not required).

Markus Metz wrote:

You can check for optional functionality with ./configure --help.
AFAIK, BLAS and LAPACK are not used.

> The compilation ends-up like:
>
> --%<---
> Started compilation: Sun Jul 7 10:24:41 EEST 2013
> --
> Errors in:
> /osgeo/src/grass7_trunk/lib/python/ctypes
> /osgeo/src/grass7_trunk/db/drivers/ogr
> /osgeo/src/grass7_trunk/db/drivers/dbf
> /osgeo/src/grass7_trunk/db/drivers/postgres
> /osgeo/src/grass7_trunk/db/drivers/sqlite
> /osgeo/src/grass7_trunk/db/drivers/odbc
> /osgeo/src/grass7_trunk/db/drivers/mysql
> /osgeo/src/grass7_trunk/gui/wxpython/vdigit
> /osgeo/src/grass7_trunk/gui/wxpython/mapswipe
> /osgeo/src/grass7_trunk/gui/wxpython/rlisetup
> /osgeo/src/grass7_trunk/gui/wxpython/animation
> /osgeo/src/grass7_trunk/gui/wxpython/dbmgr
> /osgeo/src/grass7_trunk/gui/wxpython/psmap
> /osgeo/src/grass7_trunk/gui/wxpython/iclass
> /osgeo/src/grass7_trunk/gui/wxpython/gmodeler
> /osgeo/src/grass7_trunk/man
> --
> In case of errors please change into the directory with error and run
> 'make'.

Please note that...

> If you get multiple errors, you need to deal with them in the order they
> appear in the error log. If you get an error building a library, you will
> also get errors from anything which uses the library.
>
> --
> Finished compilation: Sun Jul 7 10:25:27 EEST 2013
> make: *** [default] Error 1
> --->%--
>
>
> Running make inside some of the above mentioned directories,

You should really start with the first error

So did I. Sorry, I skipped it in my post. The first error is:

--%<---
[..]
/bin/sh: ./ctypesgen.py: Permission denied
make[1]: *** [OBJ.x86_64-unknown-linux-gnu/date.py] Error 126
make[1]: Leaving directory `/osgeo/src/grass7_trunk/lib/python/ctypes'
make: *** [default] Error 2
--->%--

> tells that
> some script was denied permissions to execute. I think it is a
> Gentoo/Funtoo thing and has nothing to do with GRASS or missing
> dependencies.

More upon this -- The partition I am running all this is mounted as

/dev/sda5 /osgeo ext4 auto,rw,exec,user 0 2

Trying in fist place to execute "./confiure" or "./configure --help"
wouldn't/wont do a thing. i.e.

--%<---
./configure --help

bash: ./configure: Permission denied
--->%---

Instructing, as I read somewhere (don't remember where!), "sh ./configure --
help" works fine! So, I think it is the same issue here too. For example,

--%<---
./osgeo/src/grass7_trunk/lib/python/ctypes $ ./ctypesgen.py

bash: ./ctypesgen.py: Permission denied
--->%--

So, in a similar way, instructing

--%<---
python ./ctypesgen.py

Error: No header files specified
--->%--

seems to work just fine.

My guess is that it's the same for all "Permission denied" errors. I need to
find a "global" solution and not going into handcrafting the scripts myself --
that wouldn't be the "right" way to do it.

> For example,
>
> --%<---
> /osgeo/src/grass7_trunk/db/drivers/ogr $ make
>
> VERSION_NUMBER=7.0.svn /osgeo/src/grass7_trunk/dist.x86_64-unknown-
> linux-gnu/tools/g.html2man.py /osgeo/src/grass7_trunk/dist.x86_64-
> unknown-linux-gnu/docs/html/grass-ogr.html
> /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
> gnu/docs/man/man1/grass-ogr.1
> /bin/sh: /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
> gnu/tools/g.html2man.py: Permission denied

Check the permissions of
/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-gnu/tools/g.html2man.py

--%<---
ls -lah g.html2man.py

-rwxr-xr-x 1 nik users 1.1K Jul 7 10:24 g.html2man.py
--->%--

and "I" am in users,

--%<---
groups nik

wheel audio cdrom video users
--->%--

Hence, if I do

--%<---
python /osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/tools/g.html2man.py

Traceback (most recent call last):
  File "/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/tools/g.html2man.py", line 48, in <module>
    main()
  File "/osgeo/src/grass7_trunk/dist.x86_64-unknown-linux-
gnu/tools/g.html2man.py", line 15, in main
    infile = sys.argv[1]
IndexError: list index out of range
--->%--

it looks like it's going.

[stuff remove]

Compilation should be done as normal user, not root. That means that
the source should be obtained and copied to its current location as
normal user. Maybe that helps.

Yes, I don't repeat this (anymore, since long ago). Trying to learn
Gentoo/Funtoo :slight_smile:

Danke Markus,
Nikos

Markus Metz:

AFAIK, BLAS and LAPACK are not used.

have a look at lib/gmath/

Hamish

On Sun, Jul 7, 2013 at 12:07 PM, Hamish <hamish_b@yahoo.com> wrote:

Markus Metz:

AFAIK, BLAS and LAPACK are not used.

have a look at lib/gmath/

They need to be compiled into GMATH when compiling the
i.spec.unmix (and i.spec.sam) Addons.

markusN

Nikos Alexandris wrote:

The first error is:
--%<---
[..]
/bin/sh: ./ctypesgen.py: Permission denied
make[1]: *** [OBJ.x86_64-unknown-linux-gnu/date.py] Error 126
make[1]: Leaving directory `/osgeo/src/grass7_trunk/lib/python/ctypes'
make: *** [default] Error 2
--->%--

> > tells that some script was denied permissions to execute. I think it is
> > a Gentoo/Funtoo thing and has nothing to do with GRASS or missing
> > dependencies.

More upon this -- The partition I am running all this is mounted as

/dev/sda5 /osgeo ext4 auto,rw,exec,user 0 2

I used

--%<---
cat /etc/fstab | grep osgeo

/dev/sda5 /osgeo ext4 auto,rw,exec,user 0 2
--->%--

But it goes like
--%<---
mount | grep sda5

/dev/sda5 on /osgeo type ext4
(rw,noexec,nosuid,nodev,commit=0)
--->%--

Heh? Is the "user" option wrong?

Nikos

Nikos Alexandris wrote:

>The first error is:
> --%<---
> [..]
> /bin/sh: ./ctypesgen.py: Permission denied
> make[1]: *** [OBJ.x86_64-unknown-linux-gnu/date.py] Error 126
> make[1]: Leaving directory `/osgeo/src/grass7_trunk/lib/python/ctypes'
> make: *** [default] Error 2
> --->%--

> > > tells that some script was denied permissions to execute. I think it
> > > is a Gentoo/Funtoo thing and has nothing to do with GRASS or missing
> > > dependencies.

> More upon this -- The partition I am running all this is mounted as
> /dev/sda5 /osgeo ext4 auto,rw,exec,user 0 2

I used
--%<---
cat /etc/fstab | grep osgeo

/dev/sda5 /osgeo ext4 auto,rw,exec,user 0
2 --->%--

But it goes like
--%<---
mount | grep sda5

/dev/sda5 on /osgeo type ext4
(rw,noexec,nosuid,nodev,commit=0)
--->%--

Heh? Is the "user" option wrong?

cat /etc/fstab | grep osgeo
/dev/sda5 /osgeo ext4 defaults,rw,exec
0 2
nik@localhost /osgeo/src/grass7_trunk $ mount | grep sda5
/dev/sda5 on /osgeo type ext4 (rw,commit=0)

That fixed all errors :slight_smile:

I guess I need to read what the consequences of auto and/or user options are
in fstab...

Nikos