[GRASS5] grass5 on darwin - problem w/init - SOLVED

andy agena andya at mac.com
Tue Sep 10 13:40:45 EDT 2002


Hi Glynn:

adding the 'g' below did the trick and GRASS is functioning again!   
thanks for your help.

however, I still need to add 'TCLTKGRASSBASE: /sw/grass5/tcltkgrass' to  
my ~/.grassrc5 (which is no big deal, of course).

as for details on Darwin's linking, I couldn't find any good  
documentation Apple's site, but the Darwin developers' list might be a  
place to start <http://search.lists.apple.com/darwin-development>.

as I'm poking around GRASS, 'g.select.pg' isn't in the bin directory,  
and I'm assuming this is another error in my make.log file.  Can you  
see any reason why this module failed to build?


Thanks again.

Take care,
Andy



On Tuesday, Sep 10, 2002, at 10:26 US/Central, Glynn Clements wrote:

>
> andy agena wrote:
>
>>> 1. Do you have a libedit.a in the directory:
>>>
>>> /Users/andya/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/libes/
>>> LIB.powerpc-apple-darwin6.0?
>>
>> this file does exist.
>
> [And this is confirmed by your make.log]
>
> OK, so that isn't the problem.
>
>>> If not, there should have been an error for src/libes/edit. OTOH, if
>>> that file exists, then ...
>>>
>>> 2. Do you have a libedit.a, libedit.dylib, or libedit.<anything> (or,
>>> for that matter, anything else which looks like a library and is
>>> called something-edit-something) in /sw/lib, or in any "system"
>>> library directory?
>>
>> my libedit.dylib was in /usr/local, so i:  ln -s  
>> /usr/lib/libedit.dylib
>> /sw/lib/libedit.dylib
>
> This appears to be the problem; there is another "libedit", and that
> is being used instead of the GRASS library of the same name.
>
> The first instance of the problem is in src/general/init, when
> compiling etc/set_data:
>
> gcc
> -L/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/libes/ 
> LIB.powerpc-apple-darwin6.0
> -L/sw/lib -o
> /Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/dist.powerpc- 
> apple-darwin6.0/etc/set_data
> OBJ.powerpc-apple-darwin6.0/set_data.o
> OBJ.powerpc-apple-darwin6.0/mke_mapset.o
> OBJ.powerpc-apple-darwin6.0/mke_loc.o
> OBJ.powerpc-apple-darwin6.0/chk_dbase.o
> OBJ.powerpc-apple-darwin6.0/other.o -ledit -lgis -lvask -lncurses
> -ltermcap -lz
>
> This is presumably picking up libedit.dylib instead of GRASS'
> libedit.a.
>
> I had thought that the fact that the switch:
>
> -L/Users/andyagena/Desktop/grass-5_0_0_src_0/grass-5.0.0/src/libes/ 
> LIB.powerpc-apple-darwin6.0
>
> came first would ensure that any libraries found there would take
> precedence, but obviously not.
>
> It may be that the linker prefers *.dylib to *.a, regardless of
> location. In which case, the only solution would be to change the
> name. Try changing the corresponding lines in src/CMD/generic/make.mid
> from:
>
> 	DEPEDITLIB     = $(LIBDIR)/libedit.a
> 	EDITLIB        = -ledit
> to:
> 	DEPEDITLIB     = $(LIBDIR)/libgedit.a
> 	EDITLIB        = -lgedit
>
> Then re-compile (you might need to run "make clean" first).
>
> If this fixes the problem, then I really need to find out more about
> the details of how linking works on MacOS X. Simply hoping that name
> clashes don't occur isn't really a solution.
>
> -- 
> Glynn Clements <glynn.clements at virgin.net>




More information about the grass-dev mailing list