Bug 218345 - graphics/vigra fix shebang
Summary: graphics/vigra fix shebang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Greg Lehey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 07:02 UTC by Walter Schwarzenfeld
Modified: 2017-05-20 21:30 UTC (History)
4 users (show)

See Also:


Attachments
svn.diff_graphics_vigra (1.64 KB, patch)
2017-04-04 07:02 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff_graphics_vigra (2.02 KB, patch)
2017-04-04 07:10 UTC, Walter Schwarzenfeld
no flags Details | Diff
patch-CMakeFiles.txt (334 bytes, patch)
2017-04-06 01:44 UTC, Walter Schwarzenfeld
no flags Details | Diff
port-build.log (129.74 KB, text/plain)
2017-04-06 02:13 UTC, Walter Schwarzenfeld
no flags Details
svn-diff-graphics_vigra-Makefile (711 bytes, patch)
2017-04-24 16:47 UTC, Walter Schwarzenfeld
no flags Details | Diff
svn-diff_vigra_Makefile_2 (953 bytes, patch)
2017-04-24 17:20 UTC, Walter Schwarzenfeld
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld 2017-04-04 07:02:09 UTC
Created attachment 181448 [details]
svn.diff_graphics_vigra

A pkg-plist error in graphics/vigra, attached patch.
Comment 1 Walter Schwarzenfeld 2017-04-04 07:10:19 UTC
Created attachment 181449 [details]
svn-diff_graphics_vigra

Corrected patch cause of portlint.
Comment 2 Walter Schwarzenfeld 2017-04-04 10:51:22 UTC
Poudriere testbuilds with 10.3-amd64/i386 ok.
Comment 3 rkoberman 2017-04-04 17:57:39 UTC
This does not seem like a packing list issue. The files not found are those needed by NUMPY option and that option is being ignored due to errors during configuration. Here is the relevant exerpt from 'make configure':
-- Found PythonInterp: /usr/local/bin/python2.7 (found version "2.7.13") 
-- Checking VIGRANUMPY_DEPENDENCIES
-- Found Python libraries: /usr/local/lib/libpython2.7.so
-- Found Python includes:  /usr/local/include/python2.7
-- Searching for Boost (at least version 1.40.0)
--    in prefix /usr/local
-- Boost version: 1.63.0
-- Found the following Boost libraries:
--   python
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/usr/local/lib/python2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/local/lib/python2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  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/gcc5/libgfortran.so.3 not found
-- Could NOT find Python numpy ('import numpy.distutils.misc_util' failed)
-- Searching for Python nosetests: ok
-- Searching for sphinx documentation generator: ok
-- Could NOT find VIGRANUMPY_DEPENDENCIES (missing:  PYTHON_NUMPY_INCLUDE_DIR) 

I suspect that the issue is that the base system libgcc_s.so.1 does not meet the needs of gfortran5.
Comment 4 rkoberman 2017-04-04 23:51:27 UTC
gfortran5 is linked to /usr/local/lib/gcc5/libgcc_s.so.1, but the configuration script is finding /lib/libgcc_s.so.1, which shows the old 4.46 version, which is too old. If I move /lib/libgcc5_s.so.1 aside, it now works fine.  I'm not sure if the issue is lang/gcc, math/numpy or graphicsvigra, but something is pulling in the wrong library.d

ldd gfortran5 shows gfortran5 linked to the correct library:
ibgcc_s.so.1 => /usr/local/lib/gcc5/libgcc_s.so.1

I hate trying to straighten out these "picking the wrong shareable" issues.

In hte meantime, you can get vigra to build with NUMPY selected by moving /lib/libgcc_s.so.1 aside. If you have a newer vrsion of gcc installed, there should be no need for it.

Oh, and it will take a LOT longer to build.
Comment 5 Walter Schwarzenfeld 2017-04-05 11:15:11 UTC
Seems the same or similar problem link in Bug 218390. So I guess it is py-numpy.
Comment 6 Walter Schwarzenfeld 2017-04-05 11:42:25 UTC
I tried for test science/py-scipy same problem.
Comment 7 rkoberman 2017-04-05 15:53:26 UTC
It really looks like either a numpy or even /ang/gcc (gcc5) issue. The following command triggers the error:
python2.7 -c "import multiarray"
It looks like this pulls in /lib/libgcc_s.so.1 which no longer plays nice with gfortran5 (lang/gcc).

BTW, moving /lib/libgcc_s.so.1 will allow building vigra w/NUMPY, but will break lots of other things that compile with gcc5, such as pkgconf, so you need to move it back after building vigra.
Comment 8 Walter Schwarzenfeld 2017-04-05 16:02:51 UTC
Seems all other ports wirh this problem could be "handled" with
/etc/libmap.conf
libgcc_s.so.1   gcc5/libgcc_s.so.1

but not graphics/vigra.
Comment 9 Walter Schwarzenfeld 2017-04-05 16:11:35 UTC
Maybe this points to CMake.
Comment 10 Walter Schwarzenfeld 2017-04-06 01:44:21 UTC
Created attachment 181525 [details]
patch-CMakeFiles.txt
Comment 11 Walter Schwarzenfeld 2017-04-06 01:45:19 UTC
Vigra compiles with the above entry in /etc/libmap.conf and the attached patch with numpy on.
Comment 12 Walter Schwarzenfeld 2017-04-06 02:13:28 UTC
Created attachment 181529 [details]
port-build.log
Comment 13 Walter Schwarzenfeld 2017-04-06 02:16:16 UTC
Attached build.log from port (with poudriere it compiles before without problems. This was the
reason I don't see the error messages from Traceback).
The linker warnings could be silenced by adding USES+=compiler:c++11-lib to the Makefile.
Comment 14 Walter Schwarzenfeld 2017-04-07 17:04:01 UTC
After recompile of 
math/blas
math/cblas
math/lapack
math/suitesparse
math/numpy
math/fftw3

no need for /etc/libmap.conf
(see also  Bug 218390).
Comment 15 w.schwarzenfeld 2017-04-24 05:57:51 UTC
Only for clear:
The patch is needed to make it compile with numpy on.
Comment 16 rkoberman 2017-04-24 06:57:49 UTC
The port has a few other issues. It needs a shebangfix and libdepends for libImath-2_2.so.12, libHalf.so.12, libIex-2_2.so.12, and libIlmThread-2_2.so.1 all from graphics/ilmbase. 

I can build with numpy on amd64 without the patch, though.
Comment 17 Walter Schwarzenfeld 2017-04-24 14:02:38 UTC
You are right may be, some things changed in the meantime.
Comment 18 Walter Schwarzenfeld 2017-04-24 14:14:54 UTC
But I have problems with the REINPLACE_CMD. I can change it from the
commandline but not with the Makefile (same command). )n this case "shebangfix" don't
work. The fiile (bin/vigra-config) exists not after patch, so a REINPLACE_CMD
is needed.
Comment 19 Walter Schwarzenfeld 2017-04-24 16:47:03 UTC
Created attachment 182048 [details]
svn-diff-graphics_vigra-Makefile
Comment 20 Walter Schwarzenfeld 2017-04-24 16:48:02 UTC
Got it. It was a missing "@" before the REINPLACE_CMD.
Comment 21 Walter Schwarzenfeld 2017-04-24 17:20:58 UTC
Created attachment 182050 [details]
svn-diff_vigra_Makefile_2
Comment 22 Walter Schwarzenfeld 2017-04-24 17:21:50 UTC
Corrected svn-diff (forgot again portlint).
Comment 23 Walter Schwarzenfeld 2017-04-24 19:34:57 UTC
Testbuilds with poudriere 10.3-amd64/i386 ok.
Comment 24 Tobias C. Berner freebsd_committer freebsd_triage 2017-05-20 19:54:41 UTC
Sorry, I totally missed this pr, and commited by diff in r441331.
Comment 25 Walter Schwarzenfeld 2017-05-20 21:30:17 UTC
Ok, thanks it is fixed. So I close the PR.