William Kyngesburye <wokl...@kyngchaos.com> writes:

> It's probably the new SIP security protection, which makes executables
> ignore DYLD_LIBRARY_PATH.  Part of GRASS compilation is to run the
> modules to generate help files.  Since they're not in their install
> location yet, DYLD_LIBRARY_PATH is needed for them to find the GRASS
> libraries, but DYLD_LIBRARY_PATH is now ignored, and it fails.
>
> One option is to disable SIP before compilation and reenble it after
> installation.  I haven't upgraded to El Capitan yet so I don't know
> the exact way to do this.  Probably in System Prefs-Security.

OK - I don't want to go this road as it is going to deep in the OS.

But I am one step further: The problem is *not* the compilation of the
binaries which works. I followed theses steps and got quite a bit
further:

1) Checkout grass
#+begin_src sh 
cd ~
mkdir ownCompiled/grass/
cd ownCompiled/grass/
svn checkout https://svn.osgeo.org/grass/grass/trunk grass7_trunk
cd grass7_trunk
#+end_src

and do the following change to ./include/Make/Install.make to *not*
create symlinls in protected directories:

--8<---------------cut here---------------start------------->8---
Index: Install.make
===================================================================
--- Install.make        (revision 67509)
+++ Install.make        (working copy)
@@ -118,7 +118,7 @@
 
 ifneq ($(findstring darwin,$(ARCH)),)
        @# enable OSX Help Viewer
-       @/bin/ln -sfh "$(INST_DIR)/docs/html" 
/Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
+       @# /bin/ln -sfh "$(INST_DIR)/docs/html" 
/Library/Documentation/Help/GRASS-$(GRASS_VERSION_MAJOR).$(GRASS_VERSION_MINOR)
 endif
 
 $(INST_DIR) $(UNIX_BIN):
--8<---------------cut here---------------end--------------->8---


2) Configure GRASS 7
#+begin_src sh 
export LDFLAGS='-L/usr/local/lib -L/usr/local/opt/sqlite/lib'
export CPPFLAGS='-I/usr/local/include -I/usr/local/opt/sqlite/include'
./configure --with-opengl=aqua --with-freetype=no --with-cxx --with-sqlite 
--prefix=~/ownCompiled/grass
#+end_src

3) Make the first time. I use all eight cores for compilation (-j 8) 
#+begin_src sh 
make -j 8
#+end_src

Here I get many errors. I ignore these for now.

4) Install grass
#+begin_src sh 
make install  
#+end_src
Which ends without errors due to the patch above.

5) Now I run make again
#+begin_src sh 
make -j 8  
#+end_src

This now ends with several errors in t.* modules which I guess are
likely caused by the first one in v.what.stdrs:

,----
| 1:27:42 ~/ownCompiled/grass/grass7_trunk/scripts/v.what.strds$ make
| if [ 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts/v.what.strds"
 != "" ] ; then 
GISRC=/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/demolocation/.grassrc71
 
GISBASE=/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0
 
PATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts:$PATH"
 
PYTHONPATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/gui/wxpython:$PYTHONPATH"
 
DYLD_LIBRARY_PATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/lib:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/lib:"
 LC_ALL=C 
/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts/v.what.strds
 --html-description < /dev/null | grep -v '</body>\|</html>' > 
v.what.strds.tmp.html ; fi
| Traceback (most recent call last):
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts/v.what.strds",
 line 53, in <module>
|     import grass.temporal as tgis
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python/grass/temporal/__init__.py",
 line 1, in <module>
|     from core import *
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python/grass/temporal/core.py",
 line 39, in <module>
|     from c_libraries_interface import *
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python/grass/temporal/c_libraries_interface.py",
 line 22, in <module>
|     import grass.lib.gis as libgis
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python/grass/lib/gis.py",
 line 23, in <module>
|     _libs["grass_gis.7.1.svn"] = load_library("grass_gis.7.1.svn")
|   File 
"/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python/grass/lib/ctypes_loader.py",
 line 57, in load_library
|     raise ImportError,"%s not found." % libname
| ImportError: grass_gis.7.1.svn not found.
| make: *** [v.what.strds.tmp.html] Error 1
| rm v.what.strds.tmp.html
`----

This seems to me like a python thing and I don't know much about
python (actually nearly nothing). I will ignore these and leave them
as I don't use the t.* commands.

6) Just to be sure, I run install again
#+begin_src sh 
make install  
#+end_src

7) If I now copy the original grass71 to the new bin directory
#+begin_src sh 
cp ./bin.x86_64-apple-darwin15.2.0/grass71 ./../bin/
#+end_src
I can run grass71 by running 

#+begin_src sh 
./ownCompiled/grass/bin/grass71
#+end_src

and everything works, including the GUI. But it is still needs both
directories (the one where it was compiled in and the on where it is
installed to) to run. But I think as it is running, it should be
possible by adjusting some paths?

If somebody could give me some hints I can look further into this.

Hope this helps,

Rainer

>
>> On Jan 6, 2016, at 11:06 AM, Rainer M Krug <rai...@krugs.de> wrote:
>> 
>> Hi
>> 
>> I am trying to compile GRASS 7 from svn on OS X El Capitan. I have
> ...
>> ,----
>> | 5:37:13 ~/ownCompiled/grass/grass7_trunk/scripts/d.correlate$ make
>> | if [
>> | 
>> "/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts/d.correlate"
>> | != "" ] ; then
>> | 
>> GISRC=/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/demolocation/.grassrc71
>> | 
>> GISBASE=/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0
>> | 
>> PATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts:$PATH"
>> | 
>> PYTHONPATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/etc/python:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/gui/wxpython:$PYTHONPATH"
>> | 
>> DYLD_LIBRARY_PATH="/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/lib:/Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/lib:"
>> | LC_ALL=C
>> | 
>> /Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/scripts/d.correlate
>> | --html-description < /dev/null | grep -v '</body>\|</html>' >
>> | d.correlate.tmp.html ; fi
>> | dyld: Library not loaded: 
>> /Applications/GRASS-7.1.app/Contents/MacOS/lib/libgrass_gis.7.1.svn.dylib
>> |   Referenced from:
>> | 
>> /Users/rainerkrug/ownCompiled/grass/grass7_trunk/dist.x86_64-apple-darwin15.2.0/bin/g.parser
>> |   Reason: image not found
>> | make: *** [d.correlate.tmp.html] Error 1
>> | rm d.correlate.tmp.html
>> `----
>> 
>> What irritates me is the error message concerning not being able to
>> load - which is obvious, as I am still compiling GRASS and haven't
>> installed it yet.
>
> -----
> William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
> http://www.kyngchaos.com/
>
> "History is an illusion caused by the passage of time, and time is an
> illusion caused by the passage of history."
>
> - Hitchhiker's Guide to the Galaxy
>
>

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982

Attachment: signature.asc
Description: PGP signature

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Reply via email to