Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Feb 2014 09:41:48 -0800 (PST)
From:      "Steven G. Kargl" <kargl@troutmask.apl.washington.edu>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/186657: C++ API clash in octave and octave-forge ports
Message-ID:  <201402111741.s1BHfmpF025854@troutmask.apl.washington.edu>
Resent-Message-ID: <201402111800.s1BI00IL090419@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         186657
>Category:       ports
>Synopsis:       C++ API clash in octave and octave-forge ports
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 11 18:00:00 UTC 2014
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402111741.s1BHfmpF025854>