2018-03-22 1:11 GMT-06:00 John Covici <[email protected]>:

> cd
> /var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src-abi_x86_64.amd64/driver
> && /usr/bin/x86_64-pc-linux-gnu-gcc -DDBUG_OFF -DDISABLE_ALL_PSI
> -DHAVE_LIBDL -DHAVE_LPCWSTR -DTHREAD -DUSE_SQLCOLATTRIBUTE_SQLLEN_PTR\
> -DUSE_SQLPARAMOPTIONS_SQLULEN_PTR -DUSE_UNIXODBC -D_UNIX_
> -Dmyodbc5a_EXPORTS -I/usr/include/mysql
> -I/var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src
> -I/var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connec\tor-odbc-5.3.10-src/driver/../util
> -DNDEBUG -O2 -mtune=core2 -pipe -ggdb -fPIC   -w -o
> CMakeFiles/myodbc5a.dir/dll.c.o -c
> /var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src/driver/dll.c
> /var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src/driver/dll.c:
> In function `myodbc_end':
> /var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src/driver/dll.c:114:5:
> error: `my_thread_end_wait_time' undeclared (first use in this
> function); did you mean `my_thread_end'?
>      my_thread_end_wait_time= 0;
>              ^~~~~~~~~~~~~~~~~~~~~~~
>                      my_thread_end
>                         
> /var/tmp/portage/dev-db/myodbc-5.3.10-r1/work/mysql-connector-odbc-5.3.10-src/driver/dll.c:114:5:
>                         note: each undeclared identifier is reported only once
>                         for each function it appears in
>                         make[2]: ***
>                         [driver/CMakeFiles/myodbc5a.dir/build.make:183:
>                         driver/CMakeFiles/myodbc5a.dir/dll.c.o] Error 1
>

This seems to be an upstream bug.

The variable my_thread_end_wait_time is not defined in any .h file
included by the file driver/dll.c nor anywhere else in that file.

It is only defined as a global static variable in another
file(mysql_sys/my_thr_init.c) aka not visible outside that file.

It may be that to fix it, with an emphasis on the may be, they only
need to make it a declaration and not just an assignment in dll.c,
that means add `static uint` before "my_thread_end_wait_time = 0;" at
line 114.  I did not read what's going on in that file, to be sure,
just noticed it is not a valid C program. It may also be this is code
not removed that should have been removed, since
my_thread_end_wait_time does not seem to be used at all in that file.
Take this to upstream, they should be able to know what to do to fix
it, once there is a patch, make emerge use it, or wait for it to be
added to the portage tree.

Reply via email to