From kargl@troutmask.apl.washington.edu  Tue Feb 11 17:54:08 2014
Return-Path: <kargl@troutmask.apl.washington.edu>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTPS id AACD1F3C
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Feb 2014 17:54:08 +0000 (UTC)
Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 8E0381C84
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Feb 2014 17:54:08 +0000 (UTC)
Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1])
	by troutmask.apl.washington.edu (8.14.8/8.14.8) with ESMTP id s1BHg3GR025861
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 11 Feb 2014 09:42:18 -0800 (PST)
	(envelope-from kargl@troutmask.apl.washington.edu)
Received: (from kargl@localhost)
	by troutmask.apl.washington.edu (8.14.8/8.14.8/Submit) id s1BHfmpF025854;
	Tue, 11 Feb 2014 09:41:48 -0800 (PST)
	(envelope-from kargl)
Message-Id: <201402111741.s1BHfmpF025854@troutmask.apl.washington.edu>
Date: Tue, 11 Feb 2014 09:41:48 -0800 (PST)
From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
Reply-To: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: C++ API clash in octave and octave-forge ports
X-Send-Pr-Version: 3.114
X-GNATS-Notify:

>Number:         186657
>Category:       ports
>Synopsis:       C++ API clash in octave and octave-forge ports
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    tijl
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 11 18:00:00 UTC 2014
>Closed-Date:    Sun Feb 16 23:09:29 CET 2014
>Last-Modified:  Sun Feb 16 23:09:29 CET 2014
>Originator:     Steven G. Kargl
>Release:        FreeBSD 11.0-CURRENT amd64
>Organization:
pl-uw
>Environment:
System: FreeBSD troutmask.apl.washington.edu 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r261721M: Mon Feb 10 13:05:20 PST 2014 kargl@troutmask.apl.washington.edu:/usr/obj/usr/src/sys/SPEW amd64


	
>Description:

On an up-tp-date FreeBSD-current,

% uname -a
FreeBSD troutmask.apl.washington.edu 11.0-CURRENT FreeBSD 11.0-CURRENT #0
r261721M: Mon Feb 10 13:05:20 PST 2014
kargl@troutmask.apl.washington.edu:/usr/obj

where all remnants of base gcc have been removed via 'make delete-old delete-old-libs'

Installation of octave and octave-forge-netcdf and octave-forge-octcdf leads to a 
clash of libc++ API.

% octave
octave:1> pkg load netcdf
octave:2> test_netcdf
error: import_netcdf: /usr/local/lib/octave/packages/netcdf-1.0.1/amd64-portbld-freebsd11.0-api-v49+/__netcdf__.oct: failed to load: /usr/local/lib/octave/packages/netcdf-1.0.1/amd64-portbld-freebsd11.0-api-v49+/__netcdf__.oct: Undefined symbol "_ZNK5ArrayISsE17resize_fill_valueEv"
error: called from:
error:   /usr/local/share/octave/packages/netcdf-1.0.1/import_netcdf.m at line 2, column 20
error:   /usr/local/share/octave/packages/netcdf-1.0.1/test_netcdf.m at line 6, column 1

Clearly, _ZNK5ArrayISsE17resize_fill_valueEv is a name-mangled entity.  So, lets look at ldd output.

% ldd ./netcdf.oct
./netcdf.oct:
        liboctinterp.so.2 => not found (0)
        liboctave.so.2 => not found (0)
        libstdc++.so.6 => /usr/local/lib/gcc46/libstdc++.so.6 (0x201631000)
        libm.so.5 => /lib/libm.so.5 (0x201930000)
        libgcc_s.so.1 => /usr/local/lib/gcc46/libgcc_s.so.1 (0x201b58000)
        libthr.so.3 => /lib/libthr.so.3 (0x201d6d000)
        libc.so.7 => /lib/libc.so.7 (0x20081d000)
troutmask:fvwm:kargl[251] ldd /usr/local./
/usr/local./ not found

% ldd /usr/local/bin/octave
/usr/local/bin/octave:
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x20081f000)
        libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x200b52000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x200d70000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x200f72000)
        libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x201177000)
        librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x201378000)
        libm.so.5 => /lib/libm.so.5 (0x201581000)
        libc++.so.1 => /usr/lib/libc++.so.1 (0x2017a9000)
        libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x201a68000)
        libgcc_s.so.1 => /usr/local/lib/gcc46/libgcc_s.so.1 (0x201c82000)
        libthr.so.3 => /lib/libthr.so.3 (0x201e97000)
        libc.so.7 => /lib/libc.so.7 (0x2020bc000)

Whoops.  octave-forge-netcdf was built with /usr/local/bin/g++46.

>How-To-Repeat:

Install freebsd-current
Install octave
Install octave-forge-netcdf

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->tijl 
Responsible-Changed-By: tijl 
Responsible-Changed-When: Tue Feb 11 19:34:46 CET 2014 
Responsible-Changed-Why:  
I'll be committing a massive patch to all Fortran ports in a few days 
which should fix this. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186657 

From: Tijl Coosemans <tijl@FreeBSD.org>
To: bug-followup@FreeBSD.org, kargl@troutmask.apl.washington.edu
Cc:  
Subject: Re: ports/186657: C   API clash in octave and octave-forge ports
Date: Sun, 16 Feb 2014 18:32:03 +0100

 Hi,
 
 Can you check if this fixed after r344614?

From: "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To: Tijl Coosemans <tijl@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/186657: C API clash in octave and octave-forge
 ports
Date: Sun, 16 Feb 2014 12:23:14 -0800 (PST)

 Tijl Coosemans wrote:
 > Hi,
 > 
 > Can you check if this fixed after r344614?
 
 Yes, r344614 seems to have fixed the problem.
 After 'portmaster -r octave-3.8.0_1', I have
 
 octave:1> pkg load netcdf
 octave:2> test_netcdf
 Using NetCDF library version "4.1.3 of Feb 16 2014 10:01:44 $"
 run test_netcdf_constant..............   OK  
 run test_netcdf_create................   OK  
 run test_netcdf_low_level_interface...   OK  
 run test_netcdf_datatypes.............   OK  
 run test_netcdf_scalar_variable.......   OK  
 run test_netcdf_attributes............   OK  
 run test_netcdf_high_level_interface.. warning: isequalwithequalnans is obsolete and will be removed from a future version of Octave, please use isequaln instead
   OK  
 run test_netcdf_ncwriteschema.........   OK  
 run test_netcdf_ncwriteschema_unlim...   OK  
 run test_netcdf_ncwriteschema_chunking   OK  
 run test_netcdf_ncwriteschema_group...   OK  
 
 Thanks!
 
 -- 
 Steve
 http://troutmask.apl.washington.edu/~kargl/
State-Changed-From-To: open->closed 
State-Changed-By: tijl 
State-Changed-When: Sun Feb 16 23:08:52 CET 2014 
State-Changed-Why:  
Fixed in r344614. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=186657 
>Unformatted:
