Porting Grass7

pieside

Member

Reaction score: 2
Messages: 46

It's been while now Grass7 (https://grass.osgeo.org) is released and I would like to port it on the ports tree. Actually, only the version 6 is available: databases/grass. This port is unmaintained.

I never ported a software before and I'm not really sure how to proceed. I think the best way is to create a new port: databases/grass7. This way, the two versions can cohabit. Do you think it's the best way to work?

Moreover, and in order to avoid duplicated work, I would like to know if someone is already working on this update and if so, how can I contribute.
 

NewGuy

Well-Known Member

Reaction score: 75
Messages: 301

I agree with regards to creating a new port for grass7. It is nice to have two copies, one that is known to work and a new one for new/experimental features. The grass6 port will probably be a good place to start looking to learn how to put together a port.
 

bart

Member

Reaction score: 32
Messages: 67

As GIS user, I tried also to port Grass7 without success... I also agree to have both port grass6 and grass7.
What is your progress with it?
 
OP
P

pieside

Member

Reaction score: 2
Messages: 46

I'm always struggling with the issue detailed here: Thread 56766. To summarize, I understand that we need to correctly set
Code:
CONFIGURE_TARGET
but I'm not able to figure it out. It's really great that you are also trying to port Grass. Why are you not able to do it?
 
OP
P

pieside

Member

Reaction score: 2
Messages: 46

I'm able to compile Grass7 but, when called, Grass doesn't find wxpython. On the previous version, this file lives in /usr/local/grass-6.4.3/gui. With Grass7, it seems it lives in /usr/local/grass7.2.0RC1. I tried to change the folder name to remove the RC1 part (i.e. grass7.2.0) but it doesn't work and I presume it's not the recommended way to solve this issue.
 

acheron

Aspiring Daemon
Developer

Reaction score: 312
Messages: 755

There is a problem somewhere (tm), try to patch this file /usr/local/bin/grass72 with:
Code:
--- /usr/local/bin/grass72      2016-11-05 14:16:05.000000000 +0100 
+++ /usr/local/bin/grass72      2016-11-07 16:24:33.426890000 +0100 
@@ -102,7 +102,7 @@ if 'GISBASE' in os.environ: 
    # possibly same for GRASS_PROJSHARE and others but maybe not 
    gisbase = os.environ['GISBASE'] 
else: 
-    gisbase = "//grass-7.2.0RC1" 
+    gisbase = "/usr/local/grass-7.2.0RC1" 
cmd_name = "grass72" 
grass_version = "7.2.0RC1" 
ld_library_path_var = 'LD_LIBRARY_PATH'
 

acheron

Aspiring Daemon
Developer

Reaction score: 312
Messages: 755

I've updated my port, it should work now.
If you have an error about Numpy put this env variable in your shell GRASS_WXVERSION 3.0.2.0
 

bart

Member

Reaction score: 32
Messages: 67

Tested and it works! Thank you!

Except that I still have an error about Numpy even if I did something like
export GRASS_WXVERSION=3.0.2.0
or
export GRASS_WXVERSION=3.0.2
or
export GRASS_WXVERSION=`wxgtk2u-3.0-config --version`

Also, some modules aren't built/installed (v.buffer for example).

I can't investigate it this week.

Regards.
 
OP
P

pieside

Member

Reaction score: 2
Messages: 46

The Numpy error seems to happen during the compilation. The module is not imported. It looks like it's linked with GCC:
Code:
File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc49/libgfortran.so.3 not found
 

acheron

Aspiring Daemon
Developer

Reaction score: 312
Messages: 755

The Numpy error seems to happen during the compilation. The module is not imported. It looks like it's linked with GCC:
Code:
File "/usr/local/lib/python2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
    from . import multiarray
ImportError: /lib/libgcc_s.so.1: version GCC_4.6.0 required by /usr/local/lib/gcc49/libgfortran.so.3 not found
It's just the nonsense we have with base libgcc vs ports libgcc... You can workaround it by putting the correct mapping for libgcc in /etc/libmap.conf
 

bart

Member

Reaction score: 32
Messages: 67

Any news?
I've tried to build the acheron's port on poudriere for 11amd64 (I've launched built for 10,11,12 amd64/i386 this night, so wait.) without success :(
You can see log here

Regards!
 

bart

Member

Reaction score: 32
Messages: 67

With your help, I think I'm very close to achieving this goal.
Still a problem with gcc/fortran and other minor problems. How do you configure libmap for this?
 

acheron

Aspiring Daemon
Developer

Reaction score: 312
Messages: 755

You need something like this:
Code:
libgcc_s.so.1   gcc49/libgcc_s.so.1
libgomp.so.1    gcc49/libgomp.so.1
libssp.so.0     gcc49/libssp.so.0
libstdc++.so.6  gcc49/libstdc++.so.6
 

bart

Member

Reaction score: 32
Messages: 67

It works!
Just some missing modules.
upload_2017-7-23_15-41-12.png
 

acheron

Aspiring Daemon
Developer

Reaction score: 312
Messages: 755

env: python: No such file or directory. That is your problem, this is why I put (as a workaround) a dependency to lang/python
 

bart

Member

Reaction score: 32
Messages: 67

The package is now available!
Thanks for your help acheron!
 
Top