Skip to content

Commit 7db6496

Browse files
committed
use older GLIBC versions of functions to work on manylinux
1 parent 3278543 commit 7db6496

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ if [ "$os_type" = "Linux" ]; then
496496
bin_path_unsanitized="$tmp_path_unsanitized/gcc/bin/release/linux/x64/libebm"
497497
bin_file="libebm_linux_x64.so"
498498
g_log_file_unsanitized="$obj_path_unsanitized/libebm_release_linux_x64_build_log.txt"
499-
both_args_extra="-m64 -DNDEBUG -O3 -Wl,--wrap=memcpy -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=log2,--wrap=pow"
499+
both_args_extra="-m64 -DNDEBUG -O3 -Wl,--wrap=memcpy -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=log2,--wrap=pow,--wrap=expf,--wrap=logf"
500500
c_args_specific="$c_args $both_args $both_args_extra"
501501
cpp_args_specific="$cpp_args $both_args $both_args_extra"
502502
# the linker wants to have the most dependent .o/.so/.dylib files listed FIRST
@@ -527,7 +527,7 @@ if [ "$os_type" = "Linux" ]; then
527527
bin_path_unsanitized="$tmp_path_unsanitized/gcc/bin/debug/linux/x64/libebm"
528528
bin_file="libebm_linux_x64_debug.so"
529529
g_log_file_unsanitized="$obj_path_unsanitized/libebm_debug_linux_x64_build_log.txt"
530-
both_args_extra="-m64 -O1 -Wl,--wrap=memcpy -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=log2,--wrap=pow"
530+
both_args_extra="-m64 -O1 -Wl,--wrap=memcpy -Wl,--wrap=exp -Wl,--wrap=log -Wl,--wrap=log2,--wrap=pow,--wrap=expf,--wrap=logf"
531531
c_args_specific="$c_args $both_args $both_args_extra"
532532
cpp_args_specific="$cpp_args $both_args $both_args_extra"
533533
# the linker wants to have the most dependent .o/.so/.dylib files listed FIRST

python/interpret-core/interpret/glassbox/_ebm/_merge_ebms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ def merge_ebms(models):
324324
else:
325325
raise Exception("Inconsistent model types being merged.")
326326

327+
# TODO: create the ExplainableBoostingClassifier etc, type directly
328+
# by name instead of using __new__ from ebm_type
327329
ebm = ebm_type.__new__(ebm_type)
328330

329331
if any(

shared/libebm/special/linux_wrap_functions.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ __asm__(".symver exp, exp@GLIBC_2.2.5");
3939
__asm__(".symver log, log@GLIBC_2.2.5");
4040
__asm__(".symver log2, log2@GLIBC_2.2.5");
4141
__asm__(".symver pow, pow@GLIBC_2.2.5");
42+
__asm__(".symver expf, expf@GLIBC_2.2.5");
43+
__asm__(".symver logf, logf@GLIBC_2.2.5");
4244

4345
extern "C" {
4446
void * __wrap_memcpy(void * dest, const void * src, size_t n) {
@@ -56,6 +58,12 @@ extern "C" {
5658
double __wrap_pow(double base, double exponent) {
5759
return pow(base, exponent);
5860
}
61+
float __wrap_expf(float x) {
62+
return expf(x);
63+
}
64+
float __wrap_logf(float x) {
65+
return logf(x);
66+
}
5967
}
6068

6169
#elif defined(__i386__)

0 commit comments

Comments
 (0)