<div dir="ltr">Hi Paul,<br><br>So, I think I know what is causing the problems with r.terraflow and r.viewshed, and I solved it with r.terraflow. r.terraflow needed the change in line you outlined earlier (changing
IOSTREAMDEP = $(ARCH_LIBDIR)/$(LIB_PREFIX)$(IOSTREAM_LIBNAME)$(LIB_SUFFIX) to IOSTREAMDEP = (ARCH_LIBDIR)/$(LIB_PREFIX)$(IOSTREAM_LIBNAME)$(STLIB_SUFFIX) in <a href="http://Grass.make.in">Grass.make.in</a>) in both <a href="http://Grass.make.in">Grass.make.in</a> and Grass.make. So, r.terraflow is all set (at least for me).<br>
<br>r.viewshed is a completely different issue. It seems like it isn't able to see iostream at all - if I remove the include line for iostream, I get the exact same errors. I think this is probably because of the unusual makefile r.viewshed has. We weren't able to get a makefile like r.terraflow to work with r.viewshed, so we more or less rewrote everything. I'll try to mess around with it, and make it use more standard grass makefiles rather than rewriting them, but I'm not very familiar with how GRASS makes things, so I may not have much luck. If you or anyone else could take a look at the makefile, and try to make it more standard, I would appreciate it.<br>
<br>I'll keep you posted on any updates,<br>-Will<br><br><div class="gmail_quote">On Mon, Aug 4, 2008 at 8:26 PM, Glynn Clements <span dir="ltr"><<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><br>
Paul Kelly wrote:<br>
<br>
> > So I got the trunk version of GRASS, and compiled it, but iostream and<br>
> > r.terraflow gave me errors. As the instructions say, I tackled the iostream<br>
> > error first, and I can't figure out what's wrong with it. Here is what I<br>
> > get if I call make in grass_trunk/lib/iostream<br>
> ><br>
> > cc -dynamiclib -compatibility_version 7.0 -current_version 7.0 -install_name<br>
> ^^<br>
> GRASS is trying to use the C compiler to create the shared library - this<br>
> worked on Linux so I didn't notice it but obviously that must have been<br>
> just luck and it seems not to work on OS X. This clearly is something I<br>
> need to look at and try to fix - none of the other libraries contain C++<br>
> code so this hasn't come up before.<br>
<br>
</div>Another issue with making IOStream a dynamic library is that<br>
Shlib.make only adds $(SHLIB_CFLAGS) to CFLAGS, not to CXXFLAGS.<br>
<br>
On Linux, this causes the code to be compiled without -fPIC, resulting<br>
in:<br>
<br>
warning: creating a DT_TEXTREL in object.<br>
<br>
Normally, this is just an efficiency issue (the library won't actually<br>
be shared; each process will have a separate copy), but it won't work<br>
on systems running SELinux (to perform relocation, the code segment<br>
has to be modified, and SELinux won't let it regain execute permission<br>
after it has been modified).<br>
<br>
Also, the effect will vary between platforms. The Darwin case in<br>
SC_CONFIG_FLAGS has:<br>
<br>
SHLIB_CFLAGS="-fno-common"<br>
<br>
ISTR that this may be a necessity for building dynamic libraries on<br>
that platform.<br>
<br>
I'll commit a fix for this as soon as I have tested it.<br>
<font color="#888888"><br>
--<br>
Glynn Clements <<a href="mailto:glynn@gclements.plus.com">glynn@gclements.plus.com</a>><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>-Will<br>
</div>