Bug 228605

Summary: databases/grass7: pkg-static: Unable to access file ... *** Error code 74
Product: Ports & Packages Reporter: O. Hartmann <ohartmann>
Component: Individual Port(s)Assignee: Kurt Jaeger <pi>
Status: Closed FIXED    
Severity: Affects Many People CC: lbartoletti, ohartmann, pi, rhurlin
Priority: --- Flags: pi: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
grass 7.4.0_3
diff -urN of 'make -DMAKE_JOBS_DISABLE=yes' with and without QGIS
patch-v2 pi: maintainer-approval?

Description O. Hartmann 2018-05-30 13:33:07 UTC
databases/grass7 still fails on all installations of ours with the error shown below.

===>   Registering installation for grass7-7.4.0_2 as automatic
pkg-static: Unable to access file /usr/ports/databases/grass7/work/stage/usr/local/grass-7.4.0/docs/html/d.rast.edit.html:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/grass7/work/stage/usr/local/grass-7.4.0/docs/html/topic_editing.html:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/grass7/work/stage/usr/local/grass-7.4.0/docs/man/man1/d.rast.edit.1.gz:No such file or directory
pkg-static: Unable to access file /usr/ports/databases/grass7/work/stage/usr/local/grass-7.4.0/docs/man/man1/topic_editing.1.gz:No such file or directory
*** Error code 74

make[1]: stopped in /usr/ports/databases/grass7
*** Error code 1
Comment 1 O. Hartmann 2018-05-30 13:34:19 UTC
I forgot to mention: building system is CURRENT:
FreeBSD 12.0-CURRENT #5 r334373: Wed May 30 08:05:27 CEST 2018 amd64
with most recent ports tree as of today (r471133).
Comment 2 Loïc Bartoletti freebsd_committer 2018-05-30 16:23:42 UTC

Thank you. I also noticed that.
I'm working on it. I have some errors which are listed by pkg-static but not by poudriere.
Comment 3 Loïc Bartoletti freebsd_committer 2018-06-02 15:02:30 UTC
Created attachment 193927 [details]
grass 7.4.0_3

Can you try this please?
Comment 4 Loïc Bartoletti freebsd_committer 2018-06-02 15:37:40 UTC
If you want test the wxpython gui you also to declare GRASS_PYTHON
"export GRASS_PYTHON=python2.7"

and maybe map gcc for numpy:
Loic@FreeBSD:~|⇒  cat /usr/local/etc/libmap.d/gcc.conf 
libgcc_s.so.1   gcc6/libgcc_s.so.1
libgomp.so.1    gcc6/libgomp.so.1
libssp.so.0     gcc6/libssp.so.0
libstdc++.so.6  gcc6/libstdc++.so.6

I will prepare a message for it
Comment 5 O. Hartmann 2018-06-02 20:08:43 UTC
With the patch of yours, the port databases/grass7 builds and installs as expected. Thank yo very much for the labor and effort! Much appreciated.

Kind regards,

Comment 6 Kurt Jaeger freebsd_committer 2018-09-01 14:50:06 UTC
I prepared this pkg-message:

To run the wxpython based GUI:

export GRASS_PYTHON=python2.7
grass -gui 

To map gcc for numpy, add:

libgcc_s.so.1   gcc6/libgcc_s.so.1
libgomp.so.1    gcc6/libgomp.so.1
libssp.so.0     gcc6/libssp.so.0
libstdc++.so.6  gcc6/libstdc++.so.6

to /usr/local/etc/libmap.d/gcc.conf

This is required for some modules using fortran.

and will commit it with the change from PR#228975
Comment 7 Loïc Bartoletti freebsd_committer 2018-09-01 16:30:15 UTC
Thank you Kurt,

A suggestion, pkg-message should be generated to match with python2 version and gcc version. For example, on my laptop gcc is now gcc7. 

What about using REINPLACE_CMD for this?
Comment 8 Kurt Jaeger freebsd_committer 2018-09-01 18:09:59 UTC
(In reply to lbartoletti from comment #7)
I'm short on time to develop such a dynamic pkg-message. If you can provide one,
I can work it in ?
Comment 9 Kurt Jaeger freebsd_committer 2018-09-02 03:31:20 UTC
With the update to 7.4.1, testbuilds work, *but*:

If I build graphics/qgis with GRASS option enabled, grass7 fails to build.


for the failing build and

for the sucessful build.

Anyone with an idea on how to fix this ?
Comment 10 Loïc Bartoletti freebsd_committer 2018-09-02 08:21:42 UTC
I think I've seen this problem before, I thought it was solved. QGIS must depend on a library that is not explicit for grass, but if it is present it uses it. I'll watch it in the week.
Comment 11 Rainer Hurling freebsd_committer 2018-11-25 16:02:32 UTC
Created attachment 199544 [details]
diff -urN of 'make -DMAKE_JOBS_DISABLE=yes' with and without QGIS

Hi Loïc,

Today I found some time to compare the builds of databases/grass7 with and without the presence of QGIS:

  # no QGIS installed
  make -DMAKE_JOBS_DISABLE=yes > make_without-QGIS.log
  # install graphics/qgis
  make -DMAKE_JOBS_DISABLE=yes > make_with-QGIS.log

Attached you will find a zipped diff of both log files, created via 'diff -urN' and named make.diff.

Most of the differences in make.diff seem to be the chronological order, how files were built. But there are some more differences, mostly from mid to end of the diff. Unfortunately, I had no time to analyse.

Perhaps you will find out more.

HTH and best wishes,
Comment 12 O. Hartmann 2018-11-29 07:42:14 UTC
GRASS 7.4.3 has just been released. Is it possible to fix this issue in due time?
Comment 13 Rainer Hurling freebsd_committer 2018-11-29 08:28:55 UTC
(In reply to O. Hartmann from comment #12)

In bug #228975, there is a working patch for 7.4.1. It should be not too hard to update this to 7.4.3?
Comment 14 Kurt Jaeger freebsd_committer 2018-11-29 08:36:30 UTC
(In reply to Rainer Hurling from comment #11)
Is it possible to provide a diff -u ?
Comment 15 Loïc Bartoletti freebsd_committer 2018-11-29 08:40:50 UTC
I planned to update ports to 7.4.3 this week-end or next week.

But I still suspect a problem between GRASS/QGIS and GDAL (which needs most option). So there is a difference between pkg-plist built with default option (poudriere / pkg) and necessary (make ports)...
Comment 16 Kurt Jaeger freebsd_committer 2018-11-29 14:30:58 UTC
Created attachment 199670 [details]

7.4.3, builds on 11.2 but fails to package. Same problem as before.

See http://people.freebsd.org/~pi/logs/grass7-7.4.3.log

On 12 it fails because qt4-network fails with openssl111.
Comment 17 Loïc Bartoletti freebsd_committer 2018-11-29 16:14:10 UTC
As a workaround, can we add a pre-install with something like:

for i in i_atcorr_B02_atcorr.png i_ortho_photo_step1.png i_ortho_photo_step5.png...
    touch ${STAGEDIR}${LOCALBASE}$i


Since in poudriere you only have the libraries requested by GRASS and its dependencies. How did you do this pkg-plist? Do you have libraries that are present on your system and not in poudriere (I still suspect this library problem as well as that will explain this difference)

Comment 18 Kurt Jaeger freebsd_committer 2018-11-29 20:05:21 UTC
Created attachment 199675 [details]

This version has the 'touch the missing files' fix as suggested and builds/packages in poudriere.
Comment 19 Kurt Jaeger freebsd_committer 2018-11-29 20:11:22 UTC
Testbuild on 11.2 was fine, testbuild for depending port qgis was fine
as well after the little fix for it to find grass-7.4.3.

So, are we ready to get this into the tree ? please approve 8-}
Comment 20 Rainer Hurling freebsd_committer 2018-11-29 21:15:20 UTC
(In reply to Kurt Jaeger from comment #19)

Hi Kurt,

Thanks for the updated patch towards 4.1.3.

Since my Poudriere is very busy ATM, I built your patch on a real world box, 13.0-CURRENT amd64 with QGIS installed. It builts fine and seems to run as aspected.

Hope I find some time tomorrow to do the builds on Poudriere for 12.x and HEAD, both amd64 and i386 ...
Comment 21 Kurt Jaeger freebsd_committer 2018-11-30 05:36:51 UTC
As far as I know, qgis still fails on cur because of qt4-network dependencies.


Comment 22 Rainer Hurling freebsd_committer 2018-11-30 06:01:09 UTC
(In reply to Kurt Jaeger from comment #21)

Yes, this is correct. For my own boxes, I work with qt4-network-4.8.7_8 (r485927) instead of the newest one (r485968). QGIS seems to be fine with it.
Comment 23 Kurt Jaeger freebsd_committer 2018-11-30 06:18:21 UTC
qgis is at 3.4.2 @ upstream, so we need to update the port to migrate to qt5. Is there a reason why this did not happen ?
Comment 24 Rainer Hurling freebsd_committer 2018-11-30 06:54:12 UTC
(In reply to Kurt Jaeger from comment #23)

I am in the phase of preparing a new port for QGIS3. There was a real showstopper[1][2][3] for a long time, before T.C. Berner investigated in it.

I have a port, which builds and installs QGIS3, but there are huge problems with Python plugins, when I run the port. So there is some more work to do ...

Loïc Bartoletti and I discussed about what should happen to the QGIS2 port, once version 3 is functional. We think, QGIS2 should stay in the ports tree for some time as a legacy version.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219641
[2] https://reviews.freebsd.org/D8714
[3] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211414#c8
Comment 25 Loïc Bartoletti freebsd_committer 2018-11-30 07:49:25 UTC
(In reply to Kurt Jaeger from comment #23)
There were several reasons. There are two versions of QGIS: version 2 and 3. The 2 was LTR until recently. It will be EOL in February 2019. In addition, until recently there was a conflict between pyqt4 and pyqt5 on some tools that were needed between QGIS 3 and other ports.

We were thinking of trying to put qgis 3 next to QGIS 2, but in the end we would have to go directly to QGIS 3 and delete QGIS 2. I have a first prepatch patch (Rainer must also have elements). I'm planning this this weekend.
Comment 26 Loïc Bartoletti freebsd_committer 2018-12-05 06:10:07 UTC
(In reply to Kurt Jaeger from comment #19)

GO, go go! :)

For me it's  OK.

Comment 27 Loïc Bartoletti freebsd_committer 2018-12-08 09:39:54 UTC
kurt@, Do you think you can push your patch before the expiration date? Please, please, thanks :)
Comment 28 commit-hook freebsd_committer 2018-12-08 10:12:12 UTC
A commit references this bug:

Author: pi
Date: Sat Dec  8 10:12:08 UTC 2018
New revision: 486934
URL: https://svnweb.freebsd.org/changeset/ports/486934

  databases/grass7: update 7.4.1 -> 7.4.3, unbreak build

  PR:		228605
  Reported by:	ohartmann@walstatt.org
  Reviewed by:	Rainer Hurling <rhurlin@gwdg.de>
  Approved by:	lbartoletti@tuxfamily.org (maintainer)
  Relnotes:	https://grass.osgeo.org/news/78/15/GRASS-GIS-7-4-2-released/

Comment 29 Kurt Jaeger freebsd_committer 2018-12-08 10:12:42 UTC
Committed, thanks!