#18 3.9.42 PTHREAD* error on build

developer
closed
5
2016-07-14
2011-06-24
No

building on cygwin using gcc-4.3.4

ATLAS install complete. Examine
ATLAS/bin/<arch>/INSTALL_LOG/SUMMARY.LOG for details.
make[1]: Leaving directory `/pub/cygports/lapack/atlas-3.9.42-1/build'
make clean
make[1]: Entering directory `/pub/cygports/lapack/atlas-3.9.42-1/build'
rm -f *.o x* config?.out *core*
make[1]: Leaving directory `/pub/cygports/lapack/atlas-3.9.42-1/build'
Creating library file: libatlas.dll.alibatlas.a(ATL_ptflushcache.o):ATL_ptflushcache.c:(.text+0x63): undefined reference to `_ATL_goparallel'
libatlas.a(ATL_ptflushcache.o):ATL_ptflushcache.c:(.text+0xa3): undefined reference to `_ATL_goparallel'
libatlas.a(ATL_ptflushcache.o):ATL_ptflushcache.c:(.text+0x1d2): undefined reference to `_ATL_goparallel'
collect2: ld returned 1 exit status

and from LIBUPDATE.LOG

make[3]: Entering directory `/pub/cygports/lapack/atlas-3.9.42-1/build/src/threads'
gcc-4 -DL2SIZE=4194304 -I/pub/cygports/lapack/atlas-3.9.42-1/build/include -I/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//include -I/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_WinNT -DATL_ARCH_Corei1 -DATL_CPUMHZ=3 -DGCCWIN -DUseClock -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_GAS_x8632 -DPentiumCPS=2000 -DATL_FULL_LAPACK -DATL_NCPU=4 -fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fno-schedule-insns2 -fno-common -m32 -o ATL_goparallel_prank.o -c /pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c
/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c: In function ‘ATL_goparallel_prank’:
/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c:196: error: ‘PTHREAD_CREATE_DETACHED’ undeclared (first use in this function)
/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c:196: error: (Each undeclared identifier is reported only once
/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c:196: error: for each function it appears in.)
/pub/cygports/lapack/atlas-3.9.42-1/src/ATLAS//src/threads/ATL_goparallel_prank.c:197: error: ‘PTHREAD_SCOPE_SYSTEM’ undeclared (first use in this function)
make[3]: *** [ATL_goparallel_prank.o] Error 1

Discussion

  • marco atzeri

    marco atzeri - 2011-06-24

    this change allow the build of ATL_goparallel_prank.c

    $ diff -uN include/atlas_threads.h~ include/atlas_threads.h
    --- include/atlas_threads.h~ 2011-06-22 22:41:28.000000000 +0200
    +++ include/atlas_threads.h 2011-06-24 18:16:21.375000000 +0200
    @@ -22,7 +22,7 @@
    #define ATL_WINTHREADS
    #endif
    #include "atlas_pthreads.h" /* gened file defs ATL_NTHREADS & ATL_NTHRPOW2 */
    -#ifdef ATL_WINTHREADS
    +#if defined (ATL_WINTHREADS) && ! defined (__CYGWIN__)
    #include <windows.h>
    typedef struct
    {

    I will test a full build again. Very time consuming....

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-07-01

    Hi,

    Can you try again with 3.9.44. I fixed a bunch of threading errors (though I can't confirm it will work for Windows yet myself).

    Thanks,
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-07-01
    • assigned_to: nobody --> rwhaley
    • labels: 360152 --> Problems with threading
     
  • R. Clint Whaley

    R. Clint Whaley - 2011-07-01
    • status: open --> open-fixed
     
  • marco atzeri

    marco atzeri - 2011-07-04

    on atlas-3.9.44 ATL_goparallel_prank.o is built but:

    make[1]: Leaving directory `/pub/cygports/lapack/atlas-3.9.44-1/build'
    Creating library file: libatlas.dll.alibatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x156): undefined reference to `_
    ATL_thread_init'
    libatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x1a4): undefined reference to `_ATL_join_tree'
    libatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x1ac): undefined reference to `_ATL_free_tree'
    libatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x1b8): undefined reference to `_ATL_thread_free'
    libatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x1f5): undefined reference to `_ATL_wait_tree'
    libatlas.a(ATL_dptgeadd.o):ATL_ptgeadd.c:(.text+0x247): undefined reference to `_ATL_signal_tree'

    on src/ATLAS/src/pthreads/misc there are 24 C files

    $ ls *.c
    ATL_1dsplit.c ATL_create_tree.c ATL_ptgeadd.c ATL_thread_free.c
    ATL_Sgeadd.c ATL_free_node.c ATL_ptgescal.c ATL_thread_init.c
    ATL_Sgescal.c ATL_free_tree.c ATL_ptgezero.c ATL_thread_tree.c
    ATL_Sgezero.c ATL_init_node.c ATL_pthescal.c ATL_traverse_tree.c
    ATL_Stzscal.c ATL_join_tree.c ATL_pttrscal.c ATL_tzsplit.c
    ATL_apply_tree.c ATL_print_node_id.c ATL_signal_tree.c ATL_wait_tree.c

    on build/src/pthreads/misc there are 18 object files
    $ ls *.o
    ATL_cptgeadd.o ATL_dptgeadd.o ATL_sptgescal.o ATL_zptgezero.o
    ATL_cptgescal.o ATL_dptgescal.o ATL_sptgezero.o ATL_zpthescal.o
    ATL_cptgezero.o ATL_dptgezero.o ATL_spttrscal.o ATL_zpttrscal.o
    ATL_cpthescal.o ATL_dpttrscal.o ATL_zptgeadd.o
    ATL_cpttrscal.o ATL_sptgeadd.o ATL_zptgescal.o

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-07-05

    Ah, the problem is in building the dynamic lib, not in the static library. You are right that I have not yet tried to build dynamic libs. None of the routines in src/pthreads are being built anymore, and they shouldn't be referenced. Probably they are prototyped somewhere, which does not cause a problem for static libs, but does cause a missing link for some dynamic builds. I will look at this once I have static libraries fully working (right now the static libs are occasionally seg faulting on Windows, and I have to track this down).

    Cheers,
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2011-07-11
    • status: open-fixed --> open-accepted
     
  • R. Clint Whaley

    R. Clint Whaley - 2012-10-09

    I think I got dynamic libs working for the stable. Can you confirm or deny if --shared works for 3.10.0?

    Thanks,
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2016-07-14
    • status: open-accepted --> closed
    • Group: --> developer
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks