[GRASS-user] can't compile swig python on grass 7: shared no found

Hi list,
I still can't solve my compilation problem for swig python libraries
for grass 7, on kubuntu 9.04.

I receive the following error:

About the swig build I receive:

make[1]: shared: comando non trovato (command not found)
make[1]: [_utils.so] Error 127 (ignorato)
/usr/bin/install: impossibile eseguire (can't execute) stat di (of)
"_utils.so": Nessun
file o directory (No file or directory)
make[1]: *** [/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/etc/python/grass/lib/_utils.so]
Errore 1
make: *** [default] Error 2

*Shared command not found*?! Shoudln't it be a build flag?

In the lines, before the error happens, a line appears starting with
the *shared* word, and the rest of the line contains the various LD
flags, and so on.

Is there something wrong in my build tools? I'm using the ones inside
the build-essential package [1]
Thanks,
Giovanni

[1] http://packages.ubuntu.com/jaunty/build-essential

Hi,

2009/6/20 G. Allegri <giohappy@gmail.com>:

make[1]: shared: comando non trovato (command not found)
make[1]: [_utils.so] Error 127 (ignorato)
/usr/bin/install: impossibile eseguire (can't execute) stat di (of)
"_utils.so": Nessun
file o directory (No file or directory)
make[1]: *** [/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/etc/python/grass/lib/_utils.so]
Errore 1
make: *** [default] Error 2

*Shared command not found*?! Shoudln't it be a build flag?

In the lines, before the error happens, a line appears starting with
the *shared* word, and the rest of the line contains the various LD
flags, and so on.

Is there something wrong in my build tools? I'm using the ones inside
the build-essential package [1]

Probably, the variable for C compiler is empty, see include/Make/Compile.make

-> compiler_c

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Probably, the variable for C compiler is empty, see include/Make/Compile.make

-> compiler_c

Mmm, shoudn't it affect the rest of compilation too?
Anyway in Compile.make I have: http://pastebin.com/m6eca8ad7

Hi,

2009/6/20 G. Allegri <giohappy@gmail.com>:

Probably, the variable for C compiler is empty, see include/Make/Compile.make

-> compiler_c

Mmm, shoudn't it affect the rest of compilation too?

That's what I wonder about.

Anyway in Compile.make I have: http://pastebin.com/m6eca8ad7

Well, Compile.make is not generated by building system. So it's same as in SVN.

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa

Anyway in Compile.make I have: http://pastebin.com/m6eca8ad7

Well, Compile.make is not generated by building system. So it's same as in SVN.

Yes, that's why I was wondering why you were asking to check it :slight_smile:
Would sending the lines before the error help?

Martin Landa wrote:

> make[1]: shared: comando non trovato (command not found)
> make[1]: [_utils.so] Error 127 (ignorato)
> /usr/bin/install: impossibile eseguire (can't execute) stat di (of)
> "_utils.so": Nessun
> file o directory (No file or directory)
> make[1]: *** [/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/etc/python/grass/lib/_utils.so]
> Errore 1
> make: *** [default] Error 2
>
> *Shared command not found*?! Shoudln't it be a build flag?
>
> In the lines, before the error happens, a line appears starting with
> the *shared* word, and the rest of the line contains the various LD
> flags, and so on.
>
> Is there something wrong in my build tools? I'm using the ones inside
> the build-essential package [1]

Probably, the variable for C compiler is empty, see include/Make/Compile.make

-> compiler_c

Python modules are linked using $(CXX); I'm guessing this is empty,
probably due to --with-cxx not being used.

AFAICT, it doesn't make sense to use --with-python without --with-cxx,
but configure doesn't check for this. The vdigit and nviz Makefiles
check, but swig/Makefile doesn't; I'll fix that.

--
Glynn Clements <glynn@gclements.plus.com>

Python modules are linked using $(CXX); I'm guessing this is empty,
probably due to --with-cxx not being used.

Ok, I've added --with-cxx.
Now I get the following:

In file included from proj_wrap.c:2694:
/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass/gprojects.h:23:29:
error: ogr_srs_api.h: Nessun file o directory
In file included from proj_wrap.c:2694:
/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass/gprojects.h:84:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘GPJ_grass_to_osr’
/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass/gprojects.h:88:
error: expected declaration specifiers or ‘...’ before
‘OGRSpatialReferenceH’
make[1]: *** [OBJ.i686-pc-linux-gnu/proj_wrap.o] Errore 1
make: *** [default] Errore 2

I wasn't considering the need of the gdal/ogr includes. What version
of it has swig iface been crated for? I have the precompiled version
from Cepicky repos, gdal 1.6.1
I'll try with this version source code...

G. Allegri wrote:

> Python modules are linked using $(CXX); I'm guessing this is empty,
> probably due to --with-cxx not being used.

Ok, I've added --with-cxx.
Now I get the following:

In file included from proj_wrap.c:2694:
/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass/gprojects.h:23:29:
error: ogr_srs_api.h: Nessun file o directory

Are you using the most recent version of the GRASS source code? I
believe this has been fixed within the last couple of days.

Also, you should use e.g.

  LC_ALL=C make

if you intend to post error messages to the list.

--
Glynn Clements <glynn@gclements.plus.com>

Ok, the update solved every error.

thx,
giovanni

2009/6/22 Glynn Clements <glynn@gclements.plus.com>:

G. Allegri wrote:

> Python modules are linked using $(CXX); I'm guessing this is empty,
> probably due to --with-cxx not being used.

Ok, I've added --with-cxx.
Now I get the following:

In file included from proj_wrap.c:2694:
/home/giova/grass/grass_trunk/dist.i686-pc-linux-gnu/include/grass/gprojects.h:23:29:
error: ogr_srs_api.h: Nessun file o directory

Are you using the most recent version of the GRASS source code? I
believe this has been fixed within the last couple of days.

Also, you should use e.g.

   LC\_ALL=C make

if you intend to post error messages to the list.

--
Glynn Clements <glynn@gclements.plus.com>