[GRASS-dev] [GRASS GIS] #993: gem fails to compile on ubuntu 9.1

#993: gem fails to compile on ubuntu 9.1
-------------------------+--------------------------------------------------
Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: default | Version: unspecified
Keywords: gem compile | Platform: Linux
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
gem fails to compile (ubuntu 9.1):
[[BR]]
{{{

user@comp:/svn/grass/trunk/gem$ make
gcc -g -O2 -I/svn/grass/trunk/dist.i686-pc-linux-gnu/include
-I/svn/grass/trunk/dist.i686-pc-linux-gnu/include -D_FILE_OFFSET_BITS=64
-DPACKAGE=\"\" -I/svn/grass/trunk/dist.i686-pc-linux-gnu/include
-I/svn/grass/trunk/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-
gnu/actions.o -c actions.c
actions.c: In function ‘check_extension’:
actions.c:51: warning: ignoring return value of ‘fscanf’, declared with
attribute warn_unused_result
actions.c:79: warning: ignoring return value of ‘chdir’, declared with
attribute warn_unused_result
actions.c: In function ‘unpack_extension’:
actions.c:99: warning: ignoring return value of ‘mkstemp’, declared with
attribute warn_unused_result
actions.c: In function ‘query_extension’:
actions.c:233: warning: ignoring return value of ‘system’, declared with
attribute warn_unused_result
actions.c: In function ‘source_clean’:
actions.c:943: warning: ignoring return value of ‘system’, declared with
attribute warn_unused_result
actions.c: In function ‘run_post’:
actions.c:1095: warning: ignoring return value of ‘getcwd’, declared with
attribute warn_unused_result
In file included from /usr/include/fcntl.h:217,
                  from actions.c:26:
In function ‘open’,
     inlined from ‘unpack_extension’ at actions.c:100:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs
3 arguments
make: *** [OBJ.i686-pc-linux-gnu/actions.o] Fehler 1

}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
-----------------------+----------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords: gem compile
  Platform: Linux | Cpu: Unspecified
-----------------------+----------------------------------------------------
Changes (by mlechner):

  * version: unspecified => svn-trunk

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
-----------------------+----------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.0
Component: default | Version: svn-trunk
Resolution: | Keywords: gem compile
  Platform: Linux | Cpu: Unspecified
-----------------------+----------------------------------------------------
Comment (by martinl):

BTW, couldn't be gem replaced by improved {{{g.extension}}} in trunk?
Martin

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 7.0.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Changes (by martinl):

  * keywords: gem compile => gem
  * component: default => Compiling

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Changes (by neteler):

  * milestone: 7.0.0 => 6.4.0

Comment:

Replying to [comment:2 martinl]:
> BTW, couldn't be gem replaced by improved {{{g.extension}}} in trunk?
Martin

Yes, please (also) substitute {{{g.extension}}} shell script in 6.4 with
{{{g.extension}}} Python
script from trunk. The shell script approach isn't really working, so it
is
essentially a bugfix. A semi-broken {{{g.extension}}} in 6.4 does not help
anyone.

Additionally, it is way easier to use than GEM.

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Comment (by mlennert):

Replying to [comment:4 neteler]:
> Replying to [comment:2 martinl]:
> > BTW, couldn't be gem replaced by improved {{{g.extension}}} in trunk?
Martin
>
> Yes, please (also) substitute {{{g.extension}}} shell script in 6.4 with
{{{g.extension}}} Python
> script from trunk. The shell script approach isn't really working, so it
is
> essentially a bugfix. A semi-broken {{{g.extension}}} in 6.4 does not
help anyone.
>
> Additionally, it is way easier to use than GEM.

In principle I agree, except for #620. This still needs to be solved.

Moritz

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Comment (by glynn):

Replying to [ticket:993 mlechner]:
> gem fails to compile (ubuntu 9.1):
{{{
In file included from /usr/include/fcntl.h:217,
                  from actions.c:26:
In function ‘open’,
     inlined from ‘unpack_extension’ at actions.c:100:
/usr/include/bits/fcntl2.h:51: error: call to ‘__open_missing_mode’
declared with attribute error: open with O_CREAT in second argument needs
3 arguments
}}}
Fixed in trunk with r41376.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Comment (by neteler):

How about:
{{{
--- actions.c (revision 41284)
+++ actions.c (working copy)
@@ -97,7 +97,7 @@
      /* TODO: Do not hardcode temp paths */
      strcpy(TMPDIR, "/tmp/grass.extension.XXXXXX"); /* tmpdir is a
global variable */
      mkstemp(TMPDIR);
- fd = open(TMPDIR, O_CREAT);
+ fd = open(TMPDIR, O_CREAT, 0777);
      if (fd == -1) {
         print_error(ERR_UNPACK_EXT,
                     "could not create temp directory name: %s",
}}}

?

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:7&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Comment (by mlechner):

I still get the same error after svn up - revision 41377
> Fixed in trunk with r41376.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/993#comment:8&gt;
GRASS GIS <http://grass.osgeo.org>

#993: gem fails to compile on ubuntu 9.1
------------------------+---------------------------------------------------
  Reporter: mlechner | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: normal | Milestone: 6.4.0
Component: Compiling | Version: svn-trunk
Resolution: fixed | Keywords: gem
  Platform: Linux | Cpu: Unspecified
------------------------+---------------------------------------------------
Changes (by hamish):

  * status: new => closed
  * resolution: => fixed

Comment:

please reopen if this still stops GRASS from building cleanly.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/993#comment:9&gt;
GRASS GIS <http://grass.osgeo.org>