Skip to content

Commit

Permalink
debug 1
Browse files Browse the repository at this point in the history
  • Loading branch information
nilason committed Sep 4, 2024
1 parent a13c314 commit 88d5663
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 137 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_ubuntu-22.04.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ fi

# non-existent variables as an errors
set -u
ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig
# ls -l /usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig
export INSTALL_PREFIX=$1
export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig
# export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/openblas-pthread/pkgconfig

./configure \
--prefix="$INSTALL_PREFIX/" \
Expand Down
104 changes: 10 additions & 94 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -13772,29 +13772,25 @@ if test -n "$USE_BLAS"; then

save_CFLAGS="$CFLAGS"; CFLAGS="$BLASINC $CFLAGS"
save_LIBS="$LIBS"; LIBS="$BLASLIB"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: CFLAGS: \"$CFLAGS\"" >&5
printf "%s\n" "$as_me: CFLAGS: \"$CFLAGS\"" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: LDFLAGS: \"$LDFLAGS\"" >&5
printf "%s\n" "$as_me: LDFLAGS: \"$LDFLAGS\"" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: LIBS: \"$LIBS\"" >&5
printf "%s\n" "$as_me: LIBS: \"$LIBS\"" >&6;}

ac_fn_c_check_header_compile "$LINENO" "cblas.h" "ac_cv_header_cblas_h" "$ac_includes_default"
if test "x$ac_cv_header_cblas_h" = xyes
then :
printf "%s\n" "#define HAVE_CBLAS_H 1" >>confdefs.h

fi
ac_fn_c_check_header_compile "$LINENO" "cblas-atlas.h" "ac_cv_header_cblas_atlas_h" "$ac_includes_default"
else $as_nop
ac_fn_c_check_header_compile "$LINENO" "cblas-atlas.h" "ac_cv_header_cblas_atlas_h" "$ac_includes_default"
if test "x$ac_cv_header_cblas_atlas_h" = xyes
then :
printf "%s\n" "#define HAVE_CBLAS_ATLAS_H 1" >>confdefs.h

else $as_nop
as_fn_error $? "*** Unable to find \"cblas.h\" (or \"cblas-atlas.h\") with \"$CFLAGS\"." "$LINENO" 5
fi

fi


{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking to BLAS" >&5
printf %s "checking for linking to BLAS... " >&6; }

cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
char cblas_dgemm();
Expand All @@ -13811,91 +13807,11 @@ then :
blas_ok=yes
else $as_nop



fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $blas_ok" >&5
printf "%s\n" "$blas_ok" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking to BLAS dgemm_" >&5
printf %s "checking for linking to BLAS dgemm_... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
char dgemm_();
int
main (void)
{
return dgemm_();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
blas_ok=yes
else $as_nop



fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $blas_ok" >&5
printf "%s\n" "$blas_ok" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking to BLAS sgemm" >&5
printf %s "checking for linking to BLAS sgemm... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
char sgemm();
int
main (void)
{
return sgemm();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
blas_ok=yes
else $as_nop



fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $blas_ok" >&5
printf "%s\n" "$blas_ok" >&6; }

{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for linking to BLAS dgemm" >&5
printf %s "checking for linking to BLAS dgemm... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
char dgemm();
int
main (void)
{
return dgemm();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
blas_ok=yes
else $as_nop


as_fn_error $? "*** Unable to link to BLAS library with \"$LIBS\"." "$LINENO" 5

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $blas_ok" >&5
printf "%s\n" "$blas_ok" >&6; }

CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
Expand Down Expand Up @@ -13941,7 +13857,7 @@ if test -n "$USE_BLAS" && test -n "$USE_LAPACK"; then
lapack_ok=no

if ! ${PKG_CONFIG} --exists ${LAPACK_PKG} ; then
as_fn_error $? "*** Unable to locate LAPACK pkg-conf package \"${LAPACK_PKG}\".
as_fn_error $? "*** Unable to locate LAPACK pkg-conf package \"$LAPACK_PKG\".
Perhaps you need to set PKG_CONFIG_PATH." "$LINENO" 5
fi

Expand Down Expand Up @@ -13982,7 +13898,7 @@ then :
lapack_ok=yes
else $as_nop

as_fn_error $? "*** Unable to link to LAPACKE library with \"$LAPACKLIB\"." "$LINENO" 5
as_fn_error $? "*** Unable to link to LAPACKE library with \"$LIBS\"." "$LINENO" 5

fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
Expand Down
49 changes: 8 additions & 41 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1616,49 +1616,16 @@ if test -n "$USE_BLAS"; then

save_CFLAGS="$CFLAGS"; CFLAGS="$BLASINC $CFLAGS"
save_LIBS="$LIBS"; LIBS="$BLASLIB"
dnl save_LDFLAGS="$LDFLAGS"; LDFLAGS="$BLASLIB $LDFLAGS"
AC_MSG_NOTICE([CFLAGS: "$CFLAGS"])
AC_MSG_NOTICE([LDFLAGS: "$LDFLAGS"])
AC_MSG_NOTICE([LIBS: "$LIBS"])
AC_CHECK_HEADERS([cblas.h cblas-atlas.h])

AC_MSG_CHECKING([for linking to BLAS])
dnl AC_LINK_IFELSE([AC_LANG_PROGRAM(
dnl [[char cblas_dgemm();]], [[return cblas_dgemm();]])],
dnl [blas_ok=yes] , [
dnl AC_MSG_ERROR([*** Unable to link to BLAS library with "$BLASLIB".])
dnl ])
AC_CHECK_HEADER([cblas.h],[], [AC_CHECK_HEADER([cblas-atlas.h],[],
AC_MSG_ERROR([*** Unable to find "cblas.h" (or "cblas-atlas.h") with "$CFLAGS".]))])

AC_MSG_CHECKING([for linking to BLAS])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[char cblas_dgemm();]], [[return cblas_dgemm();]])],
[blas_ok=yes] , [
[]
])
AC_MSG_RESULT($blas_ok)

AC_MSG_CHECKING([for linking to BLAS dgemm_])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[char dgemm_();]], [[return dgemm_();]])],
[blas_ok=yes] , [
[]
])
AC_MSG_RESULT($blas_ok)

AC_MSG_CHECKING([for linking to BLAS sgemm])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[char sgemm();]], [[return sgemm();]])],
[blas_ok=yes] , [
[]
])
AC_MSG_RESULT($blas_ok)

AC_MSG_CHECKING([for linking to BLAS dgemm])
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[char dgemm();]], [[return dgemm();]])],
[blas_ok=yes] , [
[]
])
AC_MSG_RESULT([$blas_ok])
AC_MSG_ERROR([*** Unable to link to BLAS library with "$LIBS".])]
)

CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
Expand Down Expand Up @@ -1700,7 +1667,7 @@ if test -n "$USE_BLAS" && test -n "$USE_LAPACK"; then
lapack_ok=no

if ! ${PKG_CONFIG} --exists ${LAPACK_PKG} ; then
AC_MSG_ERROR([*** Unable to locate LAPACK pkg-conf package "${LAPACK_PKG}".
AC_MSG_ERROR([*** Unable to locate LAPACK pkg-conf package "$LAPACK_PKG".
Perhaps you need to set PKG_CONFIG_PATH.])
fi

Expand All @@ -1717,8 +1684,8 @@ if test -n "$USE_BLAS" && test -n "$USE_LAPACK"; then
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[[char LAPACKE_dgesv();]], [[return LAPACKE_dgesv(); ]])],
[lapack_ok=yes] , [
AC_MSG_ERROR([*** Unable to link to LAPACKE library with "$LAPACKLIB".])
])
AC_MSG_ERROR([*** Unable to link to LAPACKE library with "$LIBS".])]
)
AC_MSG_RESULT(yes)

CFLAGS="$save_CFLAGS"
Expand Down

0 comments on commit 88d5663

Please sign in to comment.