Menu

#968 failing to build threaded library in chroot'ed environment

Stable_(v3.10.x)
closed-fixed
None
5
2014-12-16
2014-10-21
Fede
No

Hi,

I'm trying to create a package for the guix package manager
http://www.gnu.org/software/guix/
The host is a x86_64 system with Debian 7.6 and a Xeon CPU E5520. I'm using gfortran 4.8.3 and the same version of gcc.

I configure atlas with the following command:
../configure -Fa alg -fPIC -b 64 --shared --with-netlib-lapack-tarfile=/gnu/store/f2ww67gp17x6xrc35jmazsj3f8fmqflj-lapack-3.5.0.tgz

During the build phase I get the following error:


...
/gnu/store/0wl7043yrh9k1k3cg0aghdkfm5ivls7c-gfortran-4.8.3/bin/gcc -DL2SIZE=4194
304 -I/tmp/nix-build-atlas-3.10.2.drv-4/build/include -I/tmp/nix-build-atlas-3.1
0.2.drv-4/build/../ATLAS//include -I/tmp/nix-build-atlas-3.10.2.drv-4/build/../A
TLAS//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_Linux -
DATL_ARCH_Corei1 -DATL_CPUMHZ=2262 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64B
ITS -DATL_GAS_x8664 -m64 -DATL_DYLIBS -DATL_FULL_LAPACK -DATL_NCPU=2 -fomit-fram
e-pointer -mfpmath=sse -O2 -fno-schedule-insns2 -msse3 -fPIC -m64 -fPIC -o tune_
aff.o -c /tmp/nix-build-atlas-3.10.2.drv-4/build/../ATLAS//tune/threads/tune_aff
.c
In file included from /tmp/nix-build-atlas-3.10.2.drv-4/build/../ATLAS//tune/thr
eads/tune_aff.c:2:0:
/tmp/nix-build-atlas-3.10.2.drv-4/build/../ATLAS//include/atlas_threads.h:30:78: fatal error: atlas_pthreads.h: No such file or directory
#include "atlas_pthreads.h" / gened file defs ATL_NTHREADS & ATL_NTHRPOW2 /
^
compilation terminated.
Makefile:300: recipe for target 'tune_aff.o' failed
make[4]: *** [tune_aff.o] Error 1
make[4]: Leaving directory '/tmp/nix-build-atlas-3.10.2.drv-4/build/tune/threads'
Makefile:19: recipe for target 'IThreadTune' failed


If I disable building of the threaded library by adding "-t 0" to the configure parameters, then everything works fine.

To build a package, the guix program creates a chroot environment with a "homeless" build user. That environment is somewhat limiting. Atlas is in fact not able to detect CPU throttling. However, the CPU and the number of cores appear to be detected correctly:

OS configured as Linux (1)
Assembly configured as GAS_x8664 (2)
Vector ISA Extension configured as SSE3 (6,448)
Architecture configured as Corei1 (26)
Clock rate configured as 2262Mhz
Maximum number of threads configured as 8

The library builds successfully outside of the chroot environment (and detects the same CPU as above). Would you be able to give some advise on how I can help atlas to correctly determine the information required to build the threaded library in a chroot'ed environment? I'm looking for an automatic way, because this should go in a build recipe for the guix package manager.

Thank you in advance for your help!
Regards,
Fede

Discussion

  • Fede

    Fede - 2014-10-21

    The error message above actually corresponds to a test where I had "-t 2". If I do not specify the "-t" flag, then I get "-DATL_NCPU=2" in the error message.

     
  • Fede

    Fede - 2014-10-22

    I've found that the problem was that the file "atlas_pthreads.h" was being accessed by some make jobs before it was created by another one. The solution was to pass "-Ss pmake 'make -j 1'" to the configure script.

     
  • R. Clint Whaley

    R. Clint Whaley - 2014-12-16
    • status: open --> closed-fixed
    • assigned_to: R. Clint Whaley
     
  • R. Clint Whaley

    R. Clint Whaley - 2014-12-16

    OK, I am glad you found the solution yourself, as I have no experience installing as chroot!

    I'm closing this as fixed.

    Thanks,
    Clint

     

Log in to post a comment.