Bug 150549 - math/lapack fails to build
Summary: math/lapack fails to build
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Maho Nakata
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-14 07:00 UTC by JImmie James
Modified: 2010-09-27 06:50 UTC (History)
0 users

See Also:


Attachments
lapack_3221.diff.txt (2.71 KB, text/plain)
2010-09-20 14:58 UTC, b. f.
no flags Details
lapack_3221.diff.txt (2.28 KB, text/plain; charset=US-ASCII)
2010-09-21 00:55 UTC, b. f.
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description JImmie James 2010-09-14 07:00:05 UTC
make -C SRC -j`/sbin/sysctl -n kern.smp.cpus`
Building shared lapack library
make -C /usr/ports/math/lapack/work/lapack-3.2.2_shared  ARCH=i386 OPSYS=FreeBSD OSREL=7.3 OSVERSION=703100 SYSTEMVERSION= ARCH=i386 OPSYS=FreeBSD OSREL=7.3 OSVERSION=703100 SYSTEMVERSION= -j`/sbin/sysctl -n kern.smp.cpus` ARCH="/usr/local/bin/ar"
( cd INSTALL; make; ./testlsame; ./testslamch;  ./testdlamch; ./testsecond; ./testdsecnd; ./testversion )
make -C TESTING/MATGEN -j`/sbin/sysctl -n kern.smp.cpus`
  ASCII character set
  Tests completed
  Epsilon                      =   5.96046448E-08
  Safe minimum                 =   1.17549435E-38
  Base                         =    2.0000000    
  Precision                    =   1.19209290E-07
  Number of digits in mantissa =    24.000000    
  Rounding mode                =    1.0000000    
  Minimum exponent             =   -125.00000    
  Underflow threshold          =   1.17549435E-38
  Largest exponent             =    128.00000    
  Overflow threshold           =   3.40282347E+38
  Reciprocal of safe minimum   =   8.50705917E+37
  Epsilon                      =   1.11022302462515654E-016
  Safe minimum                 =   2.22507385850720138E-308
  Base                         =    2.0000000000000000     
  Precision                    =   2.22044604925031308E-016
  Number of digits in mantissa =    53.000000000000000     
  Rounding mode                =    1.0000000000000000     
  Minimum exponent             =   -1021.0000000000000     
  Underflow threshold          =   2.22507385850720138E-308
  Largest exponent             =    1024.0000000000000     
  Overflow threshold           =   1.79769313486231571E+308
  Reciprocal of safe minimum   =   4.49423283715578977E+307
 Time for 10,000,000 SAXPY ops  =   0.00     seconds
 *** Warning:  Time for operations was less or equal than zero => timing in TESTING might be dubious
 Including SECOND, time         =  0.495E-02 seconds
 Average time for SECOND        =  0.990E-03 milliseconds
 Time for 1,000,000 DAXPY ops  =   0.00     seconds
 *** Error:  Time for operations was zero
 Including DSECND, time        =  0.855E-02 seconds
 Average time for DSECND       =  0.171E-02 milliseconds
 LAPACK            3 .           2 .           2
make -C SRC -j`/sbin/sysctl -n kern.smp.cpus`
Building profile lapack library
make -C /usr/ports/math/lapack/work/lapack-3.2.2_profile  ARCH=i386 OPSYS=FreeBSD OSREL=7.3 OSVERSION=703100 SYSTEMVERSION= ARCH=i386 OPSYS=FreeBSD OSREL=7.3 OSVERSION=703100 SYSTEMVERSION= -j`/sbin/sysctl -n kern.smp.cpus` ARCH="/usr/local/bin/ar"
( cd INSTALL; make; ./testlsame; ./testslamch;  ./testdlamch; ./testsecond; ./testdsecnd; ./testversion )
make -C TESTING/MATGEN -j`/sbin/sysctl -n kern.smp.cpus`
gfortran44 -Wl,-rpath=/usr/local/lib/gcc44 -pg -o testlsame lsame.o lsametst.o
gfortran44 -Wl,-rpath=/usr/local/lib/gcc44 -pg -o testslamch slamch.o lsame.o slamchtst.o
/usr/local/bin/ld: cannot find -lc_p
collect2: ld returned 1 exit status
*** Error code 1
/usr/local/bin/ld: cannot find -lc_p
collect2: ld returned 1 exit status
*** Error code 1
2 errors
*** Error code 2
1 error
*** Error code 2

Stop in /usr/ports/math/lapack.
*** Error code 1

Stop in /usr/ports/math/lapack.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20100914-41603-x4ugqq-0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=lapack-3.2.1_1 UPGRADE_PORT_VER=3.2.1_1 make reinstall
--->  Restoring the old version
** Fix the installation problem and try again.
[Updating the pkgdb <format:bdb_hash> in /var/db/pkg ... - 1207 packages found (-0 +1) . done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
	! math/lapack (lapack-3.2.1_1)	(install error)
[1:47:11]  jimmie@jimmiejaz <104> [1] /home/jimmie#

Fix: 

unsure
How-To-Repeat: portupgrade math/lapack
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2010-09-14 07:00:23 UTC
Responsible Changed
From-To: freebsd-ports-bugs->maho

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 b. f. 2010-09-14 09:29:19 UTC
>/usr/local/bin/ld: cannot find -lc_p
>collect2: ld returned 1 exit status
>*** Error code 1
>/usr/local/bin/ld: cannot find -lc_p
>collect2: ld returned 1 exit status
>*** Error code 1
>2 errors
>*** Error code 2
>1 error
>*** Error code 2
>
>Stop in /usr/ports/math/lapack.

You are building the math/lapack profiling libraries, but do not have
the necessary base system profiling libraries installed.  (These
libraries are installed by default when FreeBSD is built from source,
but apparently not when a binary distribution is installed with
sysinstall(8).)  The problem is known, and solutions have been
proposed to the maintainer.  You can avoid this problem by either:

(1) installing the base system profiling libraries (there should be an
option in the sysinstall(8) menu, or you can do it manually, or via
the installation script in the directory containing the libraries on
the FreeBSD release media or at a remote server); or

(2) defining WITHOUT_PROFILE in your build environment, on the
command-line, or in an included Makefile like /etc/make.conf.


b.
Comment 3 JImmie James 2010-09-14 14:01:06 UTC
On 09/14/10 04:29, b. f. wrote:
>> /usr/local/bin/ld: cannot find -lc_p
>> collect2: ld returned 1 exit status
>> *** Error code 1
>> /usr/local/bin/ld: cannot find -lc_p
>> collect2: ld returned 1 exit status
>> *** Error code 1
>> 2 errors
>> *** Error code 2
>> 1 error
>> *** Error code 2
>>
>> Stop in /usr/ports/math/lapack.
>
> You are building the math/lapack profiling libraries, but do not have
> the necessary base system profiling libraries installed.  (These
> libraries are installed by default when FreeBSD is built from source,
> but apparently not when a binary distribution is installed with
> sysinstall(8).)  The problem is known, and solutions have been
> proposed to the maintainer.  You can avoid this problem by either:
>
> (1) installing the base system profiling libraries (there should be an
> option in the sysinstall(8) menu, or you can do it manually, or via
> the installation script in the directory containing the libraries on
> the FreeBSD release media or at a remote server); or
>
> (2) defining WITHOUT_PROFILE in your build environment, on the
> command-line, or in an included Makefile like /etc/make.conf.
>
>
> b.
>

You're correct, NO_PROFILE is defined in /etc/src.conf.
portupgrade -m WITHOUT_PROFILE=1 math/lapack solved it, built and 
installed now.

Is there a list of ports that need this, or is it trial and error as we go?


Also, please close this PR, as it's in a SOLVED or WORK AROUND state.


Thanks


-- 
Give a man a fish and he will eat for a day. Teach him how to fish, and 
he will sit in a boat and drink beer all day
I am currently away on leave, traveling through time and will be 
returning last week.
Comment 4 b. f. 2010-09-14 19:11:03 UTC
> Is there a list of ports that need this, or is it trial and error as we go?


As far as I know, only math/blas, math/lapack, and math/levmar can
cause such problems (patches have been proposed for all of them), but
I haven't made any exhaustive search.

b.
Comment 5 Maho Nakata freebsd_committer freebsd_triage 2010-09-19 22:49:53 UTC
State Changed
From-To: open->closed

Closing per submitter's request and maho@ approved. 

Thanks for your report.
Comment 6 NAKATA Maho 2010-09-19 23:25:06 UTC
From: "b. f." <bf1783@googlemail.com>
Subject: Re: ports/150549: math/lapack fails to build
Date: Tue, 14 Sep 2010 18:11:03 +0000

>> Is there a list of ports that need this, or is it trial and error as we go?
> 
> 
> As far as I know, only math/blas, math/lapack, and math/levmar can
> cause such problems (patches have been proposed for all of them), but
ok.

> I haven't made any exhaustive search.

In that case you may want to ask exp-runs for ports developers.
Please ask your mentor about it.

thanks
-- Nakata Maho http://accc.riken.jp/maho/ , JA OOO http://ja.openoffice.org/
http://blog.goo.ne.jp/nakatamaho/ ,GPG: http://accc.riken.jp/maho/maho.pgp.txt
Comment 7 b. f. 2010-09-20 14:58:51 UTC
On 9/19/10, Maho NAKATA <chat95@mac.com> wrote:
> From: "b. f." <bf1783@googlemail.com>
> Subject: Re: ports/150549: math/lapack fails to build
> Date: Tue, 14 Sep 2010 18:11:03 +0000
>
>>> Is there a list of ports that need this, or is it trial and error as we
>>> go?
>>
>>
>> As far as I know, only math/blas, math/lapack, and math/levmar can
>> cause such problems (patches have been proposed for all of them), but
> ok.
>
>> I haven't made any exhaustive search.
>
> In that case you may want to ask exp-runs for ports developers.
> Please ask your mentor about it.

Hmm.  Looking at this again, briefly, I see that a there may be more
ports (about 97) that are susceptible, if the user takes certain
non-default actions, because they use bsd.lib.mk.  There may be
others, too, that are susceptible and don't use bsd.lib.mk, but
probably not very many.

This problem is exacerbated by the fact that, at least since r156866
on 19 March 2006 (

http://svn.freebsd.org/viewvc/base?view=revision&revision=156866

), the default for FreeBSD built and installed from source is to add
the base system profiling libraries, but sysinstall(8) installs the
base system profiling libraries from binary distributions only if the
"Developer" or certain Custom distribution sets are selected.

I'm not sure what an exp-run would reveal, since I'm not sure what
distribution sets are used by various tinderboxes.

At some point, at least before the widespread adoption of compilers
from lang/gcc* as compilers for Ports, we should go back and look into
this.

But to be clear, other ports that may have this problem are unrelated
to math/lapack.

This problem still needs to be fixed for math/lapack, because the
lapack profiling libraries are still being built by default.  Earlier,
I proposed the attached patch to do so, and I think that it is still
relevant.  It would disable the lapack profiling libraries by default,
and provide an easier means of choosing when they are to be built, in
a manner that is consistent with the latest revision of math/blas.

Also, I think that the last change to math/lapack, in which DT_NEEDED
tags for math/blas in the math/lapack shared libraries were removed,
is worthy of a PORTREVISION bump.

b.
Comment 8 b. f. 2010-09-21 00:55:32 UTC
On 9/20/10, b. f. <bf1783@googlemail.com> wrote:
> On 9/19/10, Maho NAKATA <chat95@mac.com> wrote:
>> From: "b. f." <bf1783@googlemail.com>
>> Subject: Re: ports/150549: math/lapack fails to build
>> Date: Tue, 14 Sep 2010 18:11:03 +0000

> This problem still needs to be fixed for math/lapack, because the
> lapack profiling libraries are still being built by default.  Earlier,
> I proposed the attached patch to do so, and I think that it is still
> relevant.  It would disable the lapack profiling libraries by default,
> and provide an easier means of choosing when they are to be built, in
> a manner that is consistent with the latest revision of math/blas.


Oops, I sent a version with embedded color codes for highlighting
changes.  Attached is the plain diff.

b.
Comment 9 NAKATA Maho 2010-09-21 01:29:19 UTC
Hi bf and all
Hmmm, profiling part is too problematic and perhaps
we seldom use profiling libs. So we can clean up this part.
what do you think?
Thanks
 Nakata Maho

From: "b. f." <bf1783@googlemail.com>
Subject: Re: ports/150549: math/lapack fails to build
Date: Mon, 20 Sep 2010 23:55:32 +0000

> On 9/20/10, b. f. <bf1783@googlemail.com> wrote:
>> On 9/19/10, Maho NAKATA <chat95@mac.com> wrote:
>>> From: "b. f." <bf1783@googlemail.com>
>>> Subject: Re: ports/150549: math/lapack fails to build
>>> Date: Tue, 14 Sep 2010 18:11:03 +0000
> 
>> This problem still needs to be fixed for math/lapack, because the
>> lapack profiling libraries are still being built by default.  Earlier,
>> I proposed the attached patch to do so, and I think that it is still
>> relevant.  It would disable the lapack profiling libraries by default,
>> and provide an easier means of choosing when they are to be built, in
>> a manner that is consistent with the latest revision of math/blas.
> 
> 
> Oops, I sent a version with embedded color codes for highlighting
> changes.  Attached is the plain diff.
> 
> b.
Comment 10 b. f. 2010-09-21 03:49:11 UTC
On 9/21/10, Maho NAKATA <chat95@mac.com> wrote:
> Hi bf and all
> Hmmm, profiling part is too problematic and perhaps
> we seldom use profiling libs. So we can clean up this part.
> what do you think?

It seems reasonable to at least turn them off by default.  But they
are useful for finding bottlenecks and improving the performance of
linked applications, so, speaking for myself, I would prefer to have
the option to build them, and have a few extra lines in the port
Makefile, rather than to have to go to the trouble of constructing
them myself when they are needed.

b.
Comment 11 dfilter service freebsd_committer freebsd_triage 2010-09-27 06:47:08 UTC
maho        2010-09-27 05:47:02 UTC

  FreeBSD ports repository

  Modified files:
    math/lapack          Makefile 
  Log:
  Do not build proflib by default.
  
  PR:             150549
  Submitted by:   bf@
  
  Revision  Changes    Path
  1.52      +13 -4     ports/math/lapack/Makefile
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"