Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't open shared library - undefined symbol: my_thread_stack_size on CentOS 5 #13

Open
trel opened this issue Feb 28, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@trel
Copy link

commented Feb 28, 2014

With a stock yum installation of mysql-server on CentOS 5 ...

$ cat /etc/redhat-release 
CentOS release 5.10 (Final)
$ mysql --version
mysql  Ver 14.12 Distrib 5.0.95, for redhat-linux-gnu (x86_64) using readline 5.1
$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)

I am seeing an undefined symbol in the .so when I try to add the newly compiled functions into the database...

$ sudo make installdb
/usr/bin/mysql  <./uninstalldb.sql
if test -f .libs/lib_mysqludf_preg.dll; then  \
                /usr/bin/mysql  <./installdb_win.sql; \
        else \
                /usr/bin/mysql  <./installdb.sql;\
        fi
ERROR 1126 (HY000) at line 3: Can't open shared library 'lib_mysqludf_preg.so' (errno: 22 /usr/local/lib/lib_mysqludf_preg.so: undefined symbol: my_thread_stack_size)
make: *** [installdb] Error 1

This was originally left in context of working through the aclocal versioning issue - #8 (comment) - but stands on its own as an outstanding issue on CentOS 5.

@StygianTraveler

This comment has been minimized.

Copy link

commented Mar 23, 2014

I have the exact same problem here. About the same versions of everything - the only difference is MySQL 5.0.96 instead of 5.0.95. :)

Any leads?

@StygianTraveler

This comment has been minimized.

Copy link

commented Mar 23, 2014

Alright, the reference to my_thread_stack_size is at line 131 in preg_utils.c. It's an extern declaration, and I assume the definition is supposed to be in MySQL libs, maybe? But for whatever reason it's not there in my setup. Since the code will initialize the variable with a default value right after that part if it wasn't already initialized, I thought screw it, and just commented out both lines in that ifndef and re-compiled. It seems to work fine now. Not the most elegant fix (and surely not a solution for the repo) but oh well, at least I can use the UDFs now.

@gadamo

This comment has been minimized.

Copy link

commented Mar 24, 2014

I can confirm the same issue on OpenBSD 5.4 i386 and that the "fix" mentioned above by StygianTraveler got us around it.
@StygianTraveler Thanks.

@FormulaZero

This comment has been minimized.

Copy link

commented Mar 26, 2015

Sorry for the necro but i had the same problem, since it's not fixed yet here's a quick & dirty patch for preg_utils.c (thanks Stygian!)

131,132c131,133
<         extern unsigned long my_thread_stack_size;
<         thread_stack_size = my_thread_stack_size ;
---
>         //extern unsigned long my_thread_stack_size;
>         //thread_stack_size = my_thread_stack_size ;
>   thread_stack_size = 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.