NetBSD Problem Report #48099

From www@NetBSD.org  Tue Jul 30 14:24:39 2013
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id CFF32708FE
	for <gnats-bugs@gnats.NetBSD.org>; Tue, 30 Jul 2013 14:24:38 +0000 (UTC)
Message-Id: <20130730142435.B5F6A71311@mollari.NetBSD.org>
Date: Tue, 30 Jul 2013 14:24:35 +0000 (UTC)
From: davshao@gmail.com
Reply-To: davshao@gmail.com
To: gnats-bugs@NetBSD.org
Subject: math/octave can not link to static lib archive liboctinterp.la undefined reference to `std::cerr'
X-Send-Pr-Version: www-1.0

>Number:         48099
>Category:       pkg
>Synopsis:       math/octave can not link to static lib archive liboctinterp.la undefined reference to `std::cerr'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 30 14:25:00 +0000 2013
>Closed-Date:    Wed Aug 12 11:38:02 +0000 2015
>Last-Modified:  Wed Aug 12 11:38:02 +0000 2015
>Originator:     David Shao
>Release:        NetBSD 6.99.23 amd64 (GENERIC)
>Organization:
>Environment:
NetBSD 6.99.23 amd64 (GENERIC)
>Description:
Using current NetBSD 6.99.23 amd64 (GENERIC) src and current pkgsrc:

if in /etc/mk.conf
PKG_OPTIONS.octave = -glpk 

*** Warning: This system can not link to static lib archive liboctinterp.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create 
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
libtool-fortran: link: ar cru DLD-FUNCTIONS/.libs/urlwrite.a  DLD-FUNCTIONS/DLD_FUNCTIONS_urlwrite_la-urlwrite.o
libtool-fortran: link: ranlib DLD-FUNCTIONS/.libs/urlwrite.a
libtool-fortran: link: ( cd "DLD-FUNCTIONS/.libs" && rm -f "urlwrite.la" && ln -s "../urlwrite.la" "urlwrite.la" )
depbase=`echo main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
gcc -DHAVE_CONFIG_H -I. -I..  -I../libgnu -I../libgnu -I../libcruft/misc -I../liboctave -I../liboctave -I. -I. -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread -pthread -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread -MT main.o -MD -MP -MF $depbase.Tpo -c -o main.o main.c &&\
mv -f $depbase.Tpo $depbase.Po
/bin/sh ../libtool --tag=CC   --mode=link gcc -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread  -DHAVE_CONFIG_H  -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread -pthread -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread -no-undefined  -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -o octave main.o liboctinterp.la ../liboctave/liboctave.la ../libcruft/libcruft.la  -lm  
libtool-fortran: link: gcc -O2 -g -I/usr/pkgsrc/math/octave/work/.buildlink/include -I/usr/include/krb5 -I/usr/pkgsrc/math/octave/work/.x11-buildlink/include -pthread -DHAVE_CONFIG_H -Wall -W -Wshadow -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -pthread -pthread -O2 -g -pthread -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R7/lib -o octave main.o  -L/usr/pkgsrc/math/octave/work/octave-3.6.4/liboctave/.libs -L/usr/pkgsrc/math/octave/work/octave-3.6.4/libcruft/.libs -L/usr/pkgsrc/math/octave/work/.buildlink/lib -L/usr/pkgsrc/math/octave/work/.x11-buildlink/lib ./.libs/liboctinterp.a -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2/ -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2 -L/usr/pkgsrc/math/octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2/ -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2/// -L/usr/pkgsrc/math/
 octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2/// -L/usr/lib// /usr/pkgsrc/math/octave/work/octave-3.6.4/liboctave/.libs/liboctave.a -lhdf5 -lz -lX11 ../liboctave/.libs/liboctave.a /usr/pkgsrc/math/octave/work/octave-3.6.4/libcruft/.libs/libcruft.a -lfftw3 -lreadline -ltermcap -lcurses -lpcre ../libcruft/.libs/libcruft.a -llapack -lblas -lf95 -lm -pthread -Wl,-rpath,/usr/pkgsrc/math/octave/work/.buildlink/lib -Wl,-rpath,/usr/pkgsrc/math/octave/work/.buildlink/lib
/usr/pkgsrc/math/octave/work/octave-3.6.4/liboctave/.libs/liboctave.a(liboctave_la-file-ops.o): In function `octave_tempnam(std::string const&, std::string const&, std::string&)':
/usr/pkgsrc/math/octave/work/octave-3.6.4/liboctave/file-ops.cc:663: warning: warning: tempnam() possibly used unsafely, use mkstemp() or mkdtemp()
./.libs/liboctinterp.a(liboctinterp_la-octave.o): In function `operator<< <std::char_traits<char> >':
/usr/include/g++/ostream:513: undefined reference to `std::cerr'
/usr/include/g++/ostream:513: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
./.libs/liboctinterp.a(liboctinterp_la-octave.o): In function `operator<< <char, std::char_traits<char>, std::allocator<char> >':
/usr/include/g++/bits/basic_string.h:2605: undefined reference to `std::cerr'
/usr/include/g++/bits/basic_string.h:2605: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
./.libs/liboctinterp.a(liboctinterp_la-octave.o): In function `operator<< <std::char_traits<char> >':
/usr/include/g++/ostream:513: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
/usr/include/g++/ostream:513: undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long)'
./.libs/liboctinterp.a(liboctinterp_la-octave.o): In function `operator<< <char, std::char_traits<char>, std::allocator<char> >':
...

If in /etc/mk.conf
# PKG_OPTIONS.octave = -glpk 

*** Warning: This system can not link to static lib archive liboctinterp.la.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create 
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
libtool-fortran: link: ar cru DLD-FUNCTIONS/.libs/__fltk_uigetfile__.a  DLD-FUNCTIONS/DLD_FUNCTIONS___fltk_uigetfile___la-__fltk_uigetfile__.o
libtool-fortran: link: ranlib DLD-FUNCTIONS/.libs/__fltk_uigetfile__.a
libtool-fortran: link: ( cd "DLD-FUNCTIONS/.libs" && rm -f "__fltk_uigetfile__.la" && ln -s "../__fltk_uigetfile__.la" "__fltk_uigetfile__.la" )
/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..  -I../libgnu -I../libgnu -I../libcruft/misc -I../liboctave -I../liboctave -I. -I. -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include  -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include  -DHAVE_CONFIG_H -I/usr/pkg/include -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -MT DLD-FUNCTIONS/DLD_FUNCTIONS___glpk___la-__glpk__.lo -MD -MP -MF DLD-FUNCTIONS/.deps/DLD_FUNCTIONS___glpk___la-__glpk__.Tpo -c -o DLD-FUNCTIONS/DLD_FUNCTIONS___glpk___la-__glpk__.lo `test -f 'DLD-FUNCTIONS/__glpk__.cc' || echo './'`DLD-FUNCTIONS/__glpk__.cc
libtool-fortran: compile:  c++ -DHAVE_CONFIG_H -I. -I.. -I../libgnu -I../libcruft/misc -I../liboctave -I/usr/pkgsrc/math/octave/work/.buildlink/include -I/usr/include/krb5 -I/usr/pkgsrc/math/octave/work/.x11-buildlink/include -O2 -g -Wall -W -Wshadow -Wold-style-cast -Wformat -Wpointer-arith -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -pthread -O2 -g -MT DLD-FUNCTIONS/DLD_FUNCTIONS___glpk___la-__glpk__.lo -MD -MP -MF DLD-FUNCTIONS/.deps/DLD_FUNCTIONS___glpk___la-__glpk__.Tpo -c DLD-FUNCTIONS/__glpk__.cc  -fPIC -DPIC -o DLD-FUNCTIONS/.libs/DLD_FUNCTIONS___glpk___la-__glpk__.o
DLD-FUNCTIONS/__glpk__.cc:96:3: error: 'LPX_K_MSGLEV' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:97:3: error: 'LPX_K_SCALE' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:98:3: error: 'LPX_K_DUAL' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:99:3: error: 'LPX_K_PRICE' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:100:3: error: 'LPX_K_ROUND' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:101:3: error: 'LPX_K_ITLIM' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:102:3: error: 'LPX_K_ITCNT' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:103:3: error: 'LPX_K_OUTFRQ' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:104:3: error: 'LPX_K_MPSINFO' was not declared in this scope
DLD-FUNCTIONS/__glpk__.cc:105:3: error: 'LPX_K_MPSOBJ' was not declared in this scope
...
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 25 Nov 2013 01:04:43 +0000
State-Changed-Why:
This appears to have been fixed; try again?


From: David Shao <davshao@gmail.com>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48099: math/octave can not link to static lib archive
 liboctinterp.la undefined reference to `std::cerr'
Date: Sun, 1 Dec 2013 22:14:42 -0800

 Unfortunately while the original problem may have been fixed,
 math/octave still does not build for
 NetBSD 6.99.28 (GENERIC) amd64 X11_TYPE=native

 # cc --version
 cc (NetBSD nb1 20120916) 4.5.4

 pkgsrc cvs updated through

 Module Name:    pkgsrc
 Date:           Mon Dec  2 00:17:34 UTC 2013

 Modified Files:
         pkgsrc/doc: TODO

 Log Message:
 + gnumeric112-1.12.9, poppler-0.24.4, raptor2-2.0.11, x264-devel-20131130.

 now with an error message:

 /bin/sh ../libtool --tag=CC   --mode=link gcc -O2 -g
 -I/usr/pkg/include -I/usr/include -I/usr/include/krb5
 -I/usr/X11R7/include -pthread  -DHAVE_CONFIG_H  -Wall -W -Wshadow
 -Wformat -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes
 -Wwrite-strings -Wcast-align -Wcast-qual -O2 -g -I/usr/pkg/include
 -I/usr/include -I/usr/include/krb5 -I/usr/X11R7/include -pthread
 -pthread -O2 -g -I/usr/pkg/include -I/usr/include -I/usr/include/krb5
 -I/usr/X11R7/include -pthread -no-undefined  -L/usr/pkg/lib
 -Wl,-R/usr/pkg/lib -L/usr/lib -Wl,-R/usr/lib -L/usr/X11R7/lib
 -Wl,-R/usr/X11R7/lib -o octave main.o liboctinterp.la
 ../liboctave/liboctave.la ../libcruft/libcruft.la  -lm
 libtool-fortran: link: gcc -O2 -g
 -I/usr/pkgsrc/math/octave/work/.buildlink/include -I/usr/include/krb5
 -I/usr/pkgsrc/math/octave/work/.x11-buildlink/include -pthread
 -DHAVE_CONFIG_H -Wall -W -Wshadow -Wformat -Wpointer-arith
 -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings -Wcast-align
 -Wcast-qual -O2 -g -pthread -pthread -O2 -g -pthread
 -Wl,-R/usr/pkg/lib -Wl,-R/usr/X11R7/lib -o .libs/octave main.o
 -L/usr/pkgsrc/math/octave/work/octave-3.6.4/liboctave/.libs
 -L/usr/pkgsrc/math/octave/work/octave-3.6.4/libcruft/.libs
 -L/usr/pkgsrc/math/octave/work/.buildlink/lib
 -L/usr/pkgsrc/math/octave/work/.x11-buildlink/lib -L./.libs
 -loctinterp -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2/
 -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2
 -L/usr/pkgsrc/math/octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2/
 -L/usr/pkgsrc/math/octave/work/.buildlink/bin/../lib/gcc-lib/x86_64--netbsd/4.1.2///
 -L/usr/pkgsrc/math/octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2///
 -L/usr/lib// -lhdf5 -lz -lX11 -L../liboctave/.libs -loctave -lfftw3
 -lreadline -ltermcap -lcurses -lpcre -L../libcruft/.libs -lcruft
 -llapack -lblas
 -L/usr/pkgsrc/math/octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2
 -lf95 -lm -pthread -Wl,-rpath,/usr/pkg/lib/octave/3.6.4
 -Wl,-rpath,/usr/pkgsrc/math/octave/work/.buildlink/lib
 -Wl,-rpath,/usr/pkgsrc/math/octave/work/.buildlink/lib/gcc-lib/x86_64--netbsd/4.1.2
 /usr/lib/libstdc++.so.7: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
 Makefile:4885: recipe for target 'octave' failed
 gmake[3]: *** [octave] Error 1
 gmake[3]: Leaving directory '/usr/pkgsrc/math/octave/work/octave-3.6.4/src'
 Makefile:4129: recipe for target 'all' failed
 gmake[2]: *** [all] Error 2
 gmake[2]: Leaving directory '/usr/pkgsrc/math/octave/work/octave-3.6.4/src'
 Makefile:1807: recipe for target 'all-recursive' failed
 gmake[1]: *** [all-recursive] Error 1
 gmake[1]: Leaving directory '/usr/pkgsrc/math/octave/work/octave-3.6.4'
 Makefile:1695: recipe for target 'all' failed
 gmake: *** [all] Error 2
 *** Error code 2

State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 02 Dec 2013 08:08:51 +0000
State-Changed-Why:
one down, another to go


From: Patrick Welche <prlw1@cam.ac.uk>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/48099
Date: Wed, 12 Aug 2015 10:12:36 +0100

 This bug has transmuted itself into a duplicate of PR pkg/48272.

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 12 Aug 2015 11:38:02 +0000
State-Changed-Why:
The new error is already tracked in 48272,
but 48272 claims it is fixed. Please retest and give feedback there!
Thanks.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.