[MDEV-9388] mysql_config --libs output contains invalid -l-pthread Created: 2016-01-10 Updated: 2016-02-22 Resolved: 2016-02-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Scripts & Clients |
| Affects Version/s: | 10.1.10 |
| Fix Version/s: | 10.1.12 |
| Type: | Bug | Priority: | Major |
| Reporter: | Bernard Spil | Assignee: | Vladislav Vaintroub |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
FreeBSD meterkast.example.org 10.2-RELEASE-p8 FreeBSD 10.2-RELEASE-p8 #2: Sun Dec 13 15:21:37 CET 2015 root@meterkast.brnrd.eu:/usr/obj/usr/src/sys/BEASTIE102 amd64 |
||
| Attachments: |
|
| Description |
|
After building MariaDB 10.1 the mysql_config script contains -l-pthread in the libs output. This introduces build-errors for configure scripts that use mysql_config to retrieve build flags. For now worked around it by applying 's/-l-pthread/-lpthread/' to mysql_config before packaging. |
| Comments |
| Comment by Vladislav Vaintroub [ 2016-01-12 ] |
|
Could you please attach CMakeCache.txt from the server build, just to to understand where -l-pthread comes from? |
| Comment by Vladislav Vaintroub [ 2016-01-12 ] |
|
seems to work for me on my PCBSD VM [wlad@pcbsd ~/server/10.1]$ uname -a CMake suite maintained and supported by Kitware (kitware.com/cmake). |
| Comment by Bernard Spil [ 2016-01-12 ] |
|
The only thing I can find related to pthreads that we are passing to the build is from the cmake wrapper CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ |
| Comment by Vladislav Vaintroub [ 2016-01-12 ] |
|
Out of curiosity, what is the cmake version on the machine? While both are OK to pass to gcc for linking , only the -lpthread refernces a library, strictly speaking. |
| Comment by Vladislav Vaintroub [ 2016-01-12 ] |
|
Ok, this option -DTHREADS_HAVE_PTHREAD_ARG=YES makes a difference indeed. But you should not be setting it, it is internal to FindThreads module |
| Comment by Vladislav Vaintroub [ 2016-01-28 ] |
|
spil, could you provide more info on why -DTHREADS_HAVE_PTHREAD_ARG=YES is used? This is an internal variable inside FindThreads module, that in my understanding should not be manipulated |