Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 568060 - app-admin/elektra-0.8.15: fails to build in multilib - undefined reference to `pthread_create'
Summary: app-admin/elektra-0.8.15: fails to build in multilib - undefined reference to...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-12 10:45 UTC by Tomáš Chaloupka
Modified: 2018-11-25 23:54 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,8.36 KB, text/plain)
2015-12-12 10:46 UTC, Tomáš Chaloupka
Details
complete build.log (build.log,9.58 KB, text/plain)
2015-12-12 21:48 UTC, Tomáš Chaloupka
Details
CmakeOutput (CMakeOutput.log,86.38 KB, text/plain)
2015-12-12 21:48 UTC, Tomáš Chaloupka
Details
CMakeError (CMakeError.log,4.93 KB, text/plain)
2015-12-12 21:49 UTC, Tomáš Chaloupka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomáš Chaloupka 2015-12-12 10:45:53 UTC
Related to Bug 519492, but as elektra-0.8.12 should solve problem mentioned there..

This fails in configuration phase.
I already tried to rebuild multilib glibc, but it does not help.

CmakeError.log:
Determining if the pthread_create exist failed with the following output:
Change Dir: /tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_0f7a4/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_0f7a4.dir/build.make CMakeFiles/cmTC_0f7a4.dir/build
gmake[1]: Vstupuje se do adresáře „/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp“
Building C object CMakeFiles/cmTC_0f7a4.dir/CheckSymbolExists.c.o
/usr/bin/x86_64-pc-linux-gnu-gcc -m32   -march=native -O2 -pipe  -std=gnu99  -Wno-deprecated-declarations  -Wno-long-long -pedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wsign-compare -Wfloat-equal -Wformat-security    -o CMakeFiles/cmTC_0f7a4.dir/CheckSymbolExists.c.o   -c /tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp/CheckSymbolExists.c
/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp/CheckSymbolExists.c: In function ‘main’:
/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp/CheckSymbolExists.c:8:11: warning: ISO C forbids conversion of function pointer to object pointer type [-Wpedantic]
   return ((int*)(&pthread_create))[argc];
           ^
Linking C executable cmTC_0f7a4
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0f7a4.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-gcc -m32 -march=native -O2 -pipe  -std=gnu99  -Wno-deprecated-declarations  -Wno-long-long -pedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wsign-compare -Wfloat-equal -Wformat-security    -Wl,-O1 -Wl,--as-needed  CMakeFiles/cmTC_0f7a4.dir/CheckSymbolExists.c.o  -o cmTC_0f7a4 -rdynamic 
CMakeFiles/cmTC_0f7a4.dir/CheckSymbolExists.c.o: In function `main':
CheckSymbolExists.c:(.text.startup+0x7): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_0f7a4.dir/build.make:97: návod pro cíl „cmTC_0f7a4“ selhal
gmake[1]: *** [cmTC_0f7a4] Chyba 1
gmake[1]: Opouští se adresář „/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp“
Makefile:126: návod pro cíl „cmTC_0f7a4/fast“ selhal
gmake: *** [cmTC_0f7a4/fast] Chyba 2

File /tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
  (void)argv;
#ifndef pthread_create
  return ((int*)(&pthread_create))[argc];
#else
  (void)argc;
  return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" "cmTC_da1d0/fast"
/usr/bin/gmake -f CMakeFiles/cmTC_da1d0.dir/build.make CMakeFiles/cmTC_da1d0.dir/build
gmake[1]: Vstupuje se do adresáře „/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp“
Building C object CMakeFiles/cmTC_da1d0.dir/CheckFunctionExists.c.o
/usr/bin/x86_64-pc-linux-gnu-gcc -m32   -march=native -O2 -pipe  -std=gnu99  -Wno-deprecated-declarations  -Wno-long-long -pedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wsign-compare -Wfloat-equal -Wformat-security -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTC_da1d0.dir/CheckFunctionExists.c.o   -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_da1d0
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_da1d0.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-gcc -m32 -march=native -O2 -pipe  -std=gnu99  -Wno-deprecated-declarations  -Wno-long-long -pedantic -Wno-variadic-macros -Wall -Wextra -Wno-overlength-strings -Wsign-compare -Wfloat-equal -Wformat-security -Wshadow -Wcomments -Wtrigraphs -Wundef -Wuninitialized -Winit-self -Wmaybe-uninitialized -Wsign-compare -Wfloat-equal -Wformat-security -DCHECK_FUNCTION_EXISTS=pthread_create   -Wl,-O1 -Wl,--as-needed  CMakeFiles/cmTC_da1d0.dir/CheckFunctionExists.c.o  -o cmTC_da1d0 -rdynamic -lpthreads 
/usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
CMakeFiles/cmTC_da1d0.dir/build.make:97: návod pro cíl „cmTC_da1d0“ selhal
gmake[1]: *** [cmTC_da1d0] Chyba 1
gmake[1]: Opouští se adresář „/tmp/portage/app-admin/elektra-0.8.12/work/elektra-0.8.12-abi_x86_32.x86/CMakeFiles/CMakeTmp“
Makefile:126: návod pro cíl „cmTC_da1d0/fast“ selhal
gmake: *** [cmTC_da1d0/fast] Chyba 2

Reproducible: Always
Comment 1 Tomáš Chaloupka 2015-12-12 10:46:20 UTC
Created attachment 419026 [details]
emerge --info
Comment 2 Tomáš Mózes 2015-12-12 20:18:46 UTC
Please attach the full build log and also try to set locale to english so we can see english errors ;)

Yeah I do understand what they mean but not everybody is from CZ/SK :)
Comment 3 Tomáš Chaloupka 2015-12-12 21:48:26 UTC
Created attachment 419062 [details]
complete build.log
Comment 4 Tomáš Chaloupka 2015-12-12 21:48:51 UTC
Created attachment 419064 [details]
CmakeOutput
Comment 5 Tomáš Chaloupka 2015-12-12 21:49:14 UTC
Created attachment 419066 [details]
CMakeError
Comment 6 Tomáš Chaloupka 2015-12-12 21:55:52 UTC
For more info, currently I'm using elektra-0.8.7 with patch from Bug 519492, attachment 401014 [details, diff], which compiles fine with multilib.
Comment 7 Tomáš Chaloupka 2016-06-24 19:46:03 UTC
Still the same with elektra-0.8.15
Comment 8 Franz Graf 2016-09-30 19:53:18 UTC
Confirmed.
Comment 9 Andreas Sturmlechner gentoo-dev 2018-11-25 23:54:43 UTC
This was actually fixed in 0.8.16.