Bug 196853

Summary: graphics/exrtools fails to build when default GCC is 4.9 -- due to OpenEXR using GCC 4.9
Product: Ports & Packages Reporter: Gerald Pfeifer <gerald>
Component: Individual Port(s)Assignee: Emanuel Haupt <ehaupt>
Status: Closed Overcome By Events    
Severity: Affects Some People    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 196712    
Attachments:
Description Flags
patch used during the exp-run none

Description Gerald Pfeifer freebsd_committer freebsd_triage 2015-01-18 22:59:34 UTC
This is due to graphics/OpenEXR/Makefile which updates to USE_GCC=yes
instead of using the system compiler (when that is GCC), so now these
two ports are inconsistent.

Best just mimick what OpenEXR is doing to bring the two back in sync.

http://package18.nyi.freebsd.org/data/93i386-default-PR196712/2015-01-18_16h49m19s/logs/errors/exrtools-0.4_12.log

/bin/sh ../libtool --mode=link c++ -pthread -I/usr/local/include/OpenEXR   -O2 -pipe -fno-strict-aliasing  -L/usr/local/lib -o exrblur  exrinput.o exroutput.o gaussian.o exrblur.o -lIlmImf -L/usr/local/lib -lImath-2_2 -lIexMath-2_2 -lHalf -lIex-2_2 -lIlmThread-2_2 -pthread   
mkdir .libs
c++ -pthread -I/usr/local/include/OpenEXR -O2 -pipe -fno-strict-aliasing -o exrblur exrinput.o exroutput.o gaussian.o exrblur.o -pthread  -L/usr/local/lib -lIlmImf -lImath-2_2 -lIexMath-2_2 -lHalf -lIex-2_2 -lIlmThread-2_2
/usr/local/lib/libIlmImf.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
Makefile:374: recipe for target 'exrblur' failed
gmake[2]: *** [exrblur] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/graphics/exrtools/work/exrtools-0.4/src'
Makefile:247: recipe for target 'all-recursive' failed
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/exrtools/work/exrtools-0.4'
Makefile:193: recipe for target 'all' failed
gmake: *** [all] Error 2
*** [do-build] Error code 1
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2015-01-18 22:59:34 UTC
Auto-assigned to maintainer ehaupt@FreeBSD.org
Comment 2 Emanuel Haupt freebsd_committer freebsd_triage 2015-01-20 07:19:18 UTC
Does this only happen on CURRENT? I couldn't reproduce this on {8.4,9.3,10.1}{amd64,i386}.
Comment 3 Antoine Brodin freebsd_committer freebsd_triage 2015-01-20 18:01:21 UTC
It happens with gcc 4.9 on freebsd <  10
Comment 4 Antoine Brodin freebsd_committer freebsd_triage 2015-01-20 18:09:24 UTC
You can use the patch from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196712 to reproduce
Comment 5 Emanuel Haupt freebsd_committer freebsd_triage 2015-02-09 09:52:02 UTC
Is that still an issue? I fail to reproduce the error. When adding "USE_GCC=any" and running 'poudriere testport' in a 9.3 amd64 jail everything builds just fine.
Comment 6 Gerald Pfeifer freebsd_committer freebsd_triage 2015-02-16 06:01:21 UTC
(In reply to Emanuel Haupt from comment #5)
> Is that still an issue?

Did you also force the use of GCC 4.9, for example with the patch
referenced in comment #4 ?  And with graphics/OpenEXR built similarly?

If so, yes, I'd say it's fine if you go ahead and close this.
Thank you!
Comment 7 Emanuel Haupt freebsd_committer freebsd_triage 2015-02-16 07:13:22 UTC
I did try to force the use of GCC 4.9 as well in graphics/exrtools as in graphics/OpenEXR. I also applied the Mk/ patches but I couldn't reproduce the error.
Comment 8 Antoine Brodin freebsd_committer freebsd_triage 2015-02-16 07:18:56 UTC
Re-open:  graphics/exrtools doesn't force the use of any compiler currently
It will be broken once graphics/OpenEXR uses gcc 4.9
Comment 9 Emanuel Haupt freebsd_committer freebsd_triage 2015-02-16 07:35:52 UTC
I don't know what you're trying to achieve here. I stated several times that I'm not able to reproduce the compile time error you're getting so unless you can give me a PRECISE step by step instruction on how to reproduce it there is not much I can do about it.
Comment 10 Antoine Brodin freebsd_committer freebsd_triage 2015-02-16 09:27:31 UTC
Re-open :  it still fails on freebsd < 10

Failure log:

http://pb2.nyi.freebsd.org/data/93i386-default-196712/2015-02-16_08h34m13s/logs/errors/exrtools-0.4_12.log

I will attach the patch soon
Comment 11 Antoine Brodin freebsd_committer freebsd_triage 2015-02-16 09:33:01 UTC
Created attachment 153028 [details]
patch used during the exp-run
Comment 12 Antoine Brodin freebsd_committer freebsd_triage 2015-02-16 09:34:05 UTC
I can still reproduce the failure,  see log and the patch used during the exp-run
Comment 13 Emanuel Haupt freebsd_committer freebsd_triage 2015-02-16 10:24:38 UTC
If I apply your recent patch lang/gcc fails during patch:

root@portjail:/usr/ports/lang/gcc # make patch
Making GCC 4.9.2 for x86_64-portbld-freebsd10.1 [c,c++,objc,fortran,java]
===>  License GPLv3 GPLv3RLE accepted by the user
===>  Found saved configuration for gcc-4.9.2
===>   gcc-4.9.2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by gcc-4.9.2 for building
===>  Extracting for gcc-4.9.2
=> SHA256 Checksum OK for gcc-4.9.2.tar.bz2.
===>  Patching for gcc-4.9.2
===>  Applying extra patch /usr/ports/lang/gcc/files/java-patch-hier
===>  Applying FreeBSD patches for gcc-4.9.2
  I can't seem to find a patch in there anywhere.
=> Patch patch-arm-libcpp failed to apply cleanly.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/gcc
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/gcc
Comment 14 Antoine Brodin freebsd_committer freebsd_triage 2015-02-16 15:09:49 UTC
lang/gcc/files/patch-arm-libcpp is removed by the patch,  you can delete it
Comment 15 Gerald Pfeifer freebsd_committer freebsd_triage 2015-04-09 19:01:20 UTC
OpenEXR no longer employes USE_GCC=yes, so this issue should be
resolved without changes to graphics/exrtools.