[GRASS-dev] swig python compilation error in utils_wrap.c
Markus Neteler
neteler at osgeo.org
Sat Feb 27 03:11:18 EST 2010
On Fri, Feb 26, 2010 at 10:59 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Fri, Feb 26, 2010 at 9:58 PM, Glynn Clements
> <glynn at gclements.plus.com> wrote:
>>
>> Markus Neteler wrote:
>>
>>> OBJ.x86_64-mandriva-linux-gnu/utils_wrap.o: In function `SWIG_Python_ErrorType':
>>> /root/rpmbuild/BUILD/grass-6.4.0RC6pre/swig/python/utils_wrap.c:919: undefined reference to `PyExc_RuntimeError'
>>> /root/rpmbuild/BUILD/grass-6.4.0RC6pre/swig/python/utils_wrap.c:892: undefined reference to `PyExc_RuntimeError'
>>> /root/rpmbuild/BUILD/grass-6.4.0RC6pre/swig/python/utils_wrap.c:889: undefined reference to `PyExc_IOError'
>>> ...
>>>
>>> Any ideas? Is a change in swig/include/python/utils.i needed?
>>
>> Those variables don't appear in the .i files; they only appear in the
>> code generated by SWIG. However, they do end up in all of the *_wrap.c
>> files.
>>
>> As you're getting an error at link time, rather than compile time, I'd
>> suspect a library mismatch.
>
> It is a newly installed machine (if that matters).
>
>> I note that the only -L switches are those
>> which refer to dist.<arch>.
>>
>> I also note that there is no utils_LIBS variable in
>> swig/python/Makefile (as it doesn't depend upon any GRASS libraries).
>> As everything except utils and date[1] has $(GISLIB) as a dependency
>> (directly or indirectly), I suspect that it may be fixed by defining
>> utils_LIBS as either some subset of $(XDRLIB) $(SOCKLIB) $(INTLLIB) or
>> as $(GISLIB).
>
> I have tried this to no avail.
>
>> [1] However, if the date module compiles, that undermines this theory.
>>
>> Beyond that, I can only suggest comparing the successful linking
>> commands for the other modules against the failed command for the
>> utils module.
>
> Since I am a bit lost here, I have posted the full swig compile sequence
> excerpt here:
> http://osgeo.pastebin.com/JxVbCwMz
>
> utils_wrap.c is compiled as well as the others. Perhaps you could take
> another look?
(above was the compilation as RPM, using a renamed snapshot:
rpmbuild -ba grass.spec [1]
)
When I compile locally/"manually", then it compiles fine (excerpt):
http://osgeo.pastebin.com/6QJveQV3
Apparently, there is a compiler flag in the RPM process which
disturbs the compilation of swig/python/.
Markus
[1] http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/grass/current/SPECS/grass.spec?view=markup
More information about the grass-dev
mailing list