sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.05k stars 280 forks source link

configure one php extension to use glibc #59

Closed FrodeMMeling closed 6 years ago

FrodeMMeling commented 7 years ago

Hello I am trying to get php_excel to work on alpine linux. I have a compiled version of php_excel from CentOS I copied into my Alpine and installed this glibc package. php_excel also requires libxl.so.

I copy them in to correct folders, but how can I get libxl.so to use glibc? I do not want other extensions to use it, just this libxl.so

/app/src # ldd /usr/local/lib/libxl.so
    ldd (0x7fa0bd8b9000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x7fa0bc15a000)
    libm.so.6 => ldd (0x7fa0bd8b9000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7fa0bbf47000)
    libc.so.6 => ldd (0x7fa0bd8b9000)
Error relocating /usr/local/lib/libxl.so: __swprintf_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __fprintf_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __memcpy_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __wcscat_chk: symbol not found
Error relocating /usr/local/lib/libxl.so: __printf_chk: symbol not found
frol commented 7 years ago

First of all, you cannot mix different libc in a single executable (which is PHP in your case), so you will need to bring PHP compiled with glibc as well if you cannot recompile the plugin.

Second of all, you are using ldd from musl, read this comment for details: https://github.com/sgerrand/alpine-pkg-glibc/issues/57#issuecomment-320491722

FrodeMMeling commented 7 years ago

Ok. I will try. I do not have /usr/glibc-compat/bin/ldd either. Would be nice to see an example of how to use this glibc in action.. for instance compiling up php.

sgerrand commented 6 years ago

Without knowing more about the "php_excel" package, it's hard to provide any help. If you're still trying to install this package, please comment with more details about this library.