Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#23349 closed defect (fixed)

atlas build can't find libptcblas.a

Reported by: yaseppochi (Stephen J. Turnbull) Owned by: jameskyle@…
Priority: Normal Milestone:
Component: ports Version: 1.8.99
Keywords: Cc: francois.work@…, joseph.vanpelt@…, jt@…, vakuumfluktuation@…, LenoreHorner, matt.brook@…, aeevr@…, mklein-de (Michael Klein), eddieh (Eddie Hillenbrand)
Port: atlas

Description

This blocks building octave and makes building numpy annoying.

Build log attached.

Attachments (4)

main.log.bz2 (86.6 KB) - added by yaseppochi (Stephen J. Turnbull) 14 years ago.
LIBBUILD.LOG.bz2 (13.3 KB) - added by francois.work@… 14 years ago.
INSTALL_LOG.tar.bz2 (73.1 KB) - added by francois.work@… 14 years ago.
INSTALL_LOG complete
atlas-mp-23349.diff (5.1 KB) - added by mklein-de (Michael Klein) 14 years ago.
Portfile patch

Download all attachments as: .zip

Change History (40)

Changed 14 years ago by yaseppochi (Stephen J. Turnbull)

Attachment: main.log.bz2 added

comment:1 Changed 14 years ago by yaseppochi (Stephen J. Turnbull)

Oh, yeah, this is very likely to be the issue reported by Michael Klein in tickets 22670 and 22378, but 22670 was closed as a duplicate of 22378, while 22378 addresses this issue only with the claim that this might be due to an earlier error. Could be, but a search for "libptcblas" in the log finds only the eventual error message, no record of any attempt to create the library.

comment:2 Changed 14 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to jameskyle@…

comment:3 Changed 14 years ago by jameskyle@…

I don't have a Tiger machine for testing. All of my clients were moved to leopard quite some time ago.

As stephen has noted, this is particularly elusive as the logs I'm seeing don't seem to catch the actual error. Only the missing library during destroot when I create the dylib's.

Currently, I only focus on the two most recent os's (SL & L) and intel & G5 arches as I do not have the machines or installs for the rest.

However, I'll gladly apply patches for other combinations or if someone would like to provide root access to an arch/os of their choice I'd give that a whirl too.

comment:4 Changed 14 years ago by jameskyle@…

I just built atlas on my laptop.

Looks like this log is the one that would most likely contain the pertinent information for the failed libptcblas.a archive:

atlas-3.8.3/build/bin/INSTALL_LOG/LIBPTBUILD.LOG

comment:5 Changed 14 years ago by francois.work@…

Here is my atlas-3.8.3/build/bin/INSTALL_LOG/LIBPTBUILD.LOG from the SVN version of atlas. I don't see anything wrong. Port build no problem port install do not succeed.

Changed 14 years ago by francois.work@…

Attachment: LIBBUILD.LOG.bz2 added

comment:6 Changed 14 years ago by francois.work@…

Cc: francois.work@… added

Cc Me!

comment:7 Changed 14 years ago by joseph.vanpelt@…

Cc: joseph.vanpelt@… added

Cc Me!

comment:8 Changed 14 years ago by joseph.vanpelt@…

I just posted to #22378, but here is the same info;

I am running 10.5.8 on 32 bit PPC G4: I just issued;

  sudo port sync
  sudo port selfupdate
  sudo port upgrade outdated

Then as instructed above;

  sudo port -v build atlas

The tail end of that build was this (looks successful);

STAGE 4: POST-BUILD TUNING
make -f Makefile IPostTune 2>&1 | ./xatlas_tee INSTALL_LOG/POSTTUNE.LOG
   done.

ATLAS install complete.  Examine 
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
/usr/bin/make clean
rm -rf *.o x* config?.out *core*

Now when I try to install the dependant I still get;

--->  Computing dependencies for py25-gtk
--->  Staging atlas into destroot
Error: Target org.macports.destroot returned: shell command "cd /opt/local/var/macports
/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_atlas
/work/atlas-3.8.3/build/lib &&  ld -arch ppc -dynamic -dylib -single_module -dead_strip
 -x  -all_load -L. -L/opt/local/lib/gcc43 -ldylib1.o -dylib_install_name /opt/local
/lib/libptcblas.dylib libptcblas.a -o  libptcblas.dylib -latlas  -lSystem" returned error 1

Command output: ld: file not found: libptcblas.a

comment:9 Changed 14 years ago by jt@…

Cc: jt@… added

Cc Me!

comment:10 Changed 14 years ago by vakuumfluktuation@…

Cc: vakuumfluktuation@… added

Cc Me!

comment:11 Changed 14 years ago by joseph.vanpelt@…

I ran a search:

sudo find / -iname "libptcblas.a"

with no results

comment:12 Changed 14 years ago by jameskyle@…

This is the log I'd like to see:

./atlas-3.8.3/build/bin/INSTALL_LOG/LIBPTBUILD.LOG

comment:13 Changed 14 years ago by joseph.vanpelt@…

I'll get that log uploaded.

Also, here is the summary from:

sudo port clean atlas
sudo port -d install atlas

Summary:

ATLAS install complete.  Examine 
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
/usr/bin/make clean
rm -rf *.o x* config?.out *core*
--->  Staging atlas into destroot
. changed
	gid expected 0 found 80 modified
./usr missing (created)
. missing (directory not created: File exists)
./Applications missing (created)
./Developer missing (created)
./Library missing (created)
. changed
	gid expected 80 found 0 modified
./bin missing (created)
... (edited)
./var/macports/registry missing (created)
./www missing (created)
DEBUG: Executing proc-pre-org.macports.destroot-destroot-0
ld: file not found: libptcblas.a
Error: Target org.macports.destroot returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_atlas/work/atlas-3.8.3/build/lib &&  ld -arch ppc -dynamic -dylib -single_module -dead_strip -x  -all_load -L. -L/opt/local/lib/gcc43 -ldylib1.o -dylib_install_name /opt/local/lib/libptcblas.dylib libptcblas.a -o  libptcblas.dylib -latlas  -lSystem" returned error 1
DEBUG: Backtrace: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_atlas/work/atlas-3.8.3/build/lib &&  ld -arch ppc -dynamic -dylib -single_module -dead_strip -x  -all_load -L. -L/opt/local/lib/gcc43 -ldylib1.o -dylib_install_name /opt/local/lib/libptcblas.dylib libptcblas.a -o  libptcblas.dylib -latlas  -lSystem" returned error 1
    while executing
"$pre $targetname"
Warning: the following items did not execute (for atlas): org.macports.activate org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

comment:14 Changed 14 years ago by joseph.vanpelt@…

$/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_atlas/work/atlas-3.8.3/build/bin/INSTALL_LOG/
$
$ls
L1CacheSize		cbestTT_40x40x40	sNCNB
LIBBUILD.LOG		dL3TUNE.LOG		sPerfSumm.txt
POSTTUNE.LOG		dMMCACHEEDGE.LOG	sR1RES
SUMMARY.LOG		dMMCROSSOVER.LOG	sR1TUNE.LOG
Stage1.log		dMMRES			sXover.h
atlas_cacheedge.h	dMMSEARCH.LOG		sbestNN_80x80x80
atlas_csNKB.h		dMULADD			sbestNT_80x80x80
atlas_dtrsmXover.h	dMVRES			sbestTN_80x80x80
atlas_strsmXover.h	dMVTUNE.LOG		sbestTT_80x80x80
atlas_zdNKB.h		dNCNB			zL3TUNE.LOG
cL3TUNE.LOG		dPerfSumm.txt		zMMCACHEEDGE.LOG
cMMCACHEEDGE.LOG	dR1RES			zMMCROSSOVER.LOG
cMMCROSSOVER.LOG	dR1TUNE.LOG		zMMRES
cMMRES			dXover.h		zMMSEARCH.LOG
cMMSEARCH.LOG		dbestNN_52x52x52	zMVRES
cMVRES			dbestNT_52x52x52	zMVTUNE.LOG
cMVTUNE.LOG		dbestTN_52x52x52	zNCNB
cNCNB			dbestTT_52x52x52	zPerfSumm.txt
cPerfSumm.txt		sL3TUNE.LOG		zR1RES
cR1RES			sMMCROSSOVER.LOG	zR1TUNE.LOG
cR1TUNE.LOG		sMMRES			zXover.h
cXover.h		sMMSEARCH.LOG		zbestNN_24x24x24
cbestNN_40x40x40	sMULADD			zbestNT_24x24x24
cbestNT_40x40x40	sMVRES			zbestTN_24x24x24
cbestTN_40x40x40	sMVTUNE.LOG		zbestTT_24x24x24

Should I send LIBBUILD.LOG instead or am I looking in the wrong place?

comment:15 Changed 14 years ago by joseph.vanpelt@…

I noticed some similar looking files (libcblas instead of libptcblas);

$ $ cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_math_atlas/work/atlas-3.8.3/build/lib
$ ls
Make.inc	libatlas.a	libcblas.a	liblapack.a
Makefile	libatlas.dylib	libf77blas.a	libtstatlas.a

Changed 14 years ago by francois.work@…

Attachment: INSTALL_LOG.tar.bz2 added

INSTALL_LOG complete

comment:16 Changed 14 years ago by LenoreHorner

Cc: LenoreHorner@… added

Cc Me!

comment:17 Changed 14 years ago by matt.brook@…

Cc: matt.brook@… added

Cc Me!

comment:18 Changed 14 years ago by hanche

From one early comment it looks like this might be a problem only on Tiger. However, I have seen it on 10.5.8 (PPC). The problem does not appear on another 10.5.8 machine, this one intel. Of course there are differences other than CPU type, such as what other ports are installed, etc. Any one of them might be a deciding factor.

comment:19 Changed 14 years ago by lhorner@…

The following statement from http://math-atlas.sourceforge.net/errata.html#G4gcc makes me think that the problem is single cpu vs multiple cpu/core. Has anyone had a failure on a dual-G4 or G5?

"libptcblas.a The ANSI C interface to the threaded (SMP) BLAS. This library only appears if you have asked for SMP support." also "The full LAPACK library created by merging ATLAS and netlib LAPACK requires both C and Fortran77 interfaces, and thus that link line would be:

-L$(MY_HOME)/ATLAS/lib/$(MY_ARCH)/ -llapack -lf77blas -lcblas -latlas

If you wish to use threaded BLAS, you simply indicate those interface libs rather than the sequential. The above line for SMP would be:

-L$(MY_HOME)/ATLAS/lib/$(MY_ARCH)/ -llapack -lptf77blas -lptcblas -latlas"

It looks to me like atlas should be looking for libptcblas.a on my Powerbook G4.

comment:20 Changed 14 years ago by hanche

Ah. Indeed, I see the failure on a Powerbook G4 (single CPU PPC) but not on Macbook Pro (dual core intel).

comment:21 Changed 14 years ago by aeevr@…

Cc: aeevr@… added

Cc Me!

comment:22 Changed 14 years ago by mklein-de (Michael Klein)

The threaded libraries are not built on single-core machines. The Portfile should just use the non-threaded library instead on such machines.

A patch is below (this patch also obsoletes files/patch-build-Make.top.diff). I hope it doesn't break behaviour on SMP boxes (can't test here).

Changed 14 years ago by mklein-de (Michael Klein)

Attachment: atlas-mp-23349.diff added

Portfile patch

comment:23 Changed 14 years ago by mklein-de (Michael Klein)

Cc: michael.klein@… added

Cc Me!

comment:24 in reply to:  22 Changed 14 years ago by hanche

Replying to michael.klein@…:

The threaded libraries are not built on single-core machines. The Portfile should just use the non-threaded library instead on such machines.

A patch is below (this patch also obsoletes files/patch-build-Make.top.diff). I hope it doesn't break behaviour on SMP boxes (can't test here).

I have tested the patch on my dual core Macbook Pro running OS X 10.5.8, and it does not seem to have caused any breakage.

comment:25 Changed 14 years ago by hanche

I also tested the patch on Powerbook G4 (single CPU / PPC running OX X 10.5.8) and it works there too. As far as I am concerned, this patch is ready to be committed. (Not that I get to decide.)

comment:26 Changed 14 years ago by aeevr@…

I tried to apply this patch with no success on an iBook G4 running OSX 10.5.8. Perhaps I applied the patch incorrectly... I DL'd the file and did as suggested in the documentation:

cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/atlas patch -p0 < atlas-mp-23349.diff

port install atlas

comment:27 in reply to:  26 Changed 14 years ago by mklein-de (Michael Klein)

{{{cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/math/atlas patch -p0 < atlas-mp-23349.diff port install atlas}}}

That should be correct... Was there an error message after the patch command?

Try port -v install atlas again, maybe atlas timing tests failed during build.

comment:28 Changed 14 years ago by joseph.vanpelt@…

Confirmed here! I also tested the patch on a Powerbook G4 (single CPU / PPC running OS X 10.5.8) and it works.

comment:29 Changed 14 years ago by francois.work@…

Great! Works well for me too. Ibook G4 PPC 10.4.11

comment:30 Changed 14 years ago by eddieh (Eddie Hillenbrand)

Cc: eh88@… added

Cc Me!

comment:31 Changed 14 years ago by eddieh (Eddie Hillenbrand)

The patch worked for me too! I'm on a single processor G4 running 10.5.8.

comment:32 Changed 14 years ago by lhorner@…

Worked for me too. (Also single G4 running 10.5.8.)

comment:33 Changed 14 years ago by drechsel@…

Worked for me too. (Also single G4 running 10.4.11.)

comment:34 Changed 14 years ago by jameskyle@…

I've applied the patch and am testing the build on my mac pro right now, thank you for this effort and improvements.

comment:35 Changed 14 years ago by jameskyle@…

Resolution: fixed
Status: newclosed

Committed, and again. Thank you for the improvements.

comment:36 in reply to:  35 Changed 14 years ago by mklein-de (Michael Klein)

Replying to jameskyle@…:

Committed, and again. Thank you for the improvements.

My pleasure; there is an empty files/patch-build-Make.top.diff left after upgrading to the latest tree. It's obsolete, you can safely delete it.

Note: See TracTickets for help on using tickets.