Fix scipy linking errors (#2289)
With newer versions of emscripten, linker errors surface eariler.
This makes it easier to find function pointer cast errors without
having to execute the bad code path -- the errors happen when the
wasm modules are linked (at load time in the browser)
Anyways, this fixes more linker errors. Mostly the problems have
to do with LAPACK functions that take string arguments. Most
LAPACK functions that take string arguments use them as enums and
only care about the first character of the string. Because of the
way that f2c works, we need to replace these strings with the ascii
code of the first character so we should replace:
sTRSV( 'UPPER', 'NOTRANS', 'NONUNIT', J, H, LDH, Y, 1 )
==>
CALL sTRSV( 85, 78, 78, J, H, LDH, Y, 1 )
where 85 and 78 are the ascii codes of U and N. Various character
variables are subbed into being integer variables. The two
functions `ilaenv` and `xerbla` expect actual C strings as an
argument, but it is very annoying to produce C strings so instead
I added wrapper functions ilaenvf2c and xerblaf2c to clapack and
instead of calling ilaenv and xerbla we call the f2c versions.
2022-03-24 06:17:29 +00:00
|
|
|
From 78ff0cec961d9eb4e94193995fe151e1ecdae9df Mon Sep 17 00:00:00 2001
|
|
|
|
From: Roman Yurchak <rth.yurchak@gmail.com>
|
|
|
|
Date: Fri, 18 Mar 2022 20:01:39 -0700
|
|
|
|
Subject: [PATCH 5/7] remove redundant symbols
|
|
|
|
|
2020-12-20 10:30:12 +00:00
|
|
|
Remove a few symbols from LAPACK that are redundantly defined with BLAS or are
|
|
|
|
ported in scipy. It wouldn't be an issue if we were linking dynamically, but
|
|
|
|
because of static linking otherwise we get errors at link time about symbols
|
|
|
|
defined twice.
|
2018-10-31 13:47:52 +00:00
|
|
|
|
2021-03-29 08:37:03 +00:00
|
|
|
- Roman Yurchak (https://github.com/pyodide/pyodide/pull/238)
|
Fix scipy linking errors (#2289)
With newer versions of emscripten, linker errors surface eariler.
This makes it easier to find function pointer cast errors without
having to execute the bad code path -- the errors happen when the
wasm modules are linked (at load time in the browser)
Anyways, this fixes more linker errors. Mostly the problems have
to do with LAPACK functions that take string arguments. Most
LAPACK functions that take string arguments use them as enums and
only care about the first character of the string. Because of the
way that f2c works, we need to replace these strings with the ascii
code of the first character so we should replace:
sTRSV( 'UPPER', 'NOTRANS', 'NONUNIT', J, H, LDH, Y, 1 )
==>
CALL sTRSV( 85, 78, 78, J, H, LDH, Y, 1 )
where 85 and 78 are the ascii codes of U and N. Various character
variables are subbed into being integer variables. The two
functions `ilaenv` and `xerbla` expect actual C strings as an
argument, but it is very annoying to produce C strings so instead
I added wrapper functions ilaenvf2c and xerblaf2c to clapack and
instead of calling ilaenv and xerbla we call the f2c versions.
2022-03-24 06:17:29 +00:00
|
|
|
---
|
|
|
|
SRC/Makefile | 4 ++--
|
|
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/SRC/Makefile b/SRC/Makefile
|
|
|
|
index 5f1eb22..32e669b 100644
|
2018-10-31 13:47:52 +00:00
|
|
|
--- a/SRC/Makefile
|
|
|
|
+++ b/SRC/Makefile
|
Fix scipy linking errors (#2289)
With newer versions of emscripten, linker errors surface eariler.
This makes it easier to find function pointer cast errors without
having to execute the bad code path -- the errors happen when the
wasm modules are linked (at load time in the browser)
Anyways, this fixes more linker errors. Mostly the problems have
to do with LAPACK functions that take string arguments. Most
LAPACK functions that take string arguments use them as enums and
only care about the first character of the string. Because of the
way that f2c works, we need to replace these strings with the ascii
code of the first character so we should replace:
sTRSV( 'UPPER', 'NOTRANS', 'NONUNIT', J, H, LDH, Y, 1 )
==>
CALL sTRSV( 85, 78, 78, J, H, LDH, Y, 1 )
where 85 and 78 are the ascii codes of U and N. Various character
variables are subbed into being integer variables. The two
functions `ilaenv` and `xerbla` expect actual C strings as an
argument, but it is very annoying to produce C strings so instead
I added wrapper functions ilaenvf2c and xerblaf2c to clapack and
instead of calling ilaenv and xerbla we call the f2c versions.
2022-03-24 06:17:29 +00:00
|
|
|
@@ -48,9 +48,9 @@ include ../make.inc
|
2018-10-31 13:47:52 +00:00
|
|
|
#
|
|
|
|
#######################################################################
|
|
|
|
|
|
|
|
-ALLAUX = maxloc.o ilaenv.o ieeeck.o lsamen.o xerbla.o xerbla_array.o iparmq.o \
|
|
|
|
+ALLAUX = maxloc.o ilaenv.o ieeeck.o lsamen.o iparmq.o \
|
|
|
|
ilaprec.o ilatrans.o ilauplo.o iladiag.o chla_transtype.o \
|
|
|
|
- ../INSTALL/ilaver.o ../INSTALL/lsame.o
|
|
|
|
+ ../INSTALL/ilaver.o
|
|
|
|
|
|
|
|
ALLXAUX =
|
|
|
|
|
Fix scipy linking errors (#2289)
With newer versions of emscripten, linker errors surface eariler.
This makes it easier to find function pointer cast errors without
having to execute the bad code path -- the errors happen when the
wasm modules are linked (at load time in the browser)
Anyways, this fixes more linker errors. Mostly the problems have
to do with LAPACK functions that take string arguments. Most
LAPACK functions that take string arguments use them as enums and
only care about the first character of the string. Because of the
way that f2c works, we need to replace these strings with the ascii
code of the first character so we should replace:
sTRSV( 'UPPER', 'NOTRANS', 'NONUNIT', J, H, LDH, Y, 1 )
==>
CALL sTRSV( 85, 78, 78, J, H, LDH, Y, 1 )
where 85 and 78 are the ascii codes of U and N. Various character
variables are subbed into being integer variables. The two
functions `ilaenv` and `xerbla` expect actual C strings as an
argument, but it is very annoying to produce C strings so instead
I added wrapper functions ilaenvf2c and xerblaf2c to clapack and
instead of calling ilaenv and xerbla we call the f2c versions.
2022-03-24 06:17:29 +00:00
|
|
|
--
|
|
|
|
2.25.1
|
|
|
|
|