_______________________________________________Oh, good. We should track down the dependency on git because people should be able to build from a source tar without git.
For that though, I’ll have to leave it to our cmake experts.
At this point, would you mind opening a github issue?
Frank
From: Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel [mailto:devel@lists.nfs-ganesha.org]
Sent: Friday, January 8, 2021 3:43 PM
To: Frank Filz <ffilzlnx@mindspring.com>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
Found the problem. My system was missing git, and for some reason this was causing cmake to hit the error:
CMake Error at CMakeLists.txt:162 (STRING):
STRING sub-command SUBSTRING requires four arguments.
Installing git fixed it. Note that I’m doing the build in a container, and I don’t really need to have git in there, but I don’t mind.
-Jeff
From: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel" <devel@lists.nfs-ganesha.org>
Reply-To: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC]" <jeffrey.c.becker@nasa.gov>
Date: Friday, January 8, 2021 at 2:57 PM
To: Frank Filz <ffilzlnx@mindspring.com>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
On a different system, I was able to get cmake to configure Ganesha, with cmake version 3.5.2. The version on the system on which I get the error is cmake version 3.17. Has this version been tested with Ganesha – maybe it’s too new? I realize this isn’t likely, but as I haven’t been able to find the source of my cmake error yet, I thought I should rule it out. Thanks.
-Jeff
From: Frank Filz <ffilzlnx@mindspring.com>
Date: Friday, January 8, 2021 at 12:52 PM
To: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC]" <jeffrey.c.becker@nasa.gov>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: RE: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
That’s what I see in my cmake, so you should be ok for pthreads, something else is causing cmake to fail.
Frank
From: Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] [mailto:jeffrey.c.becker@nasa.gov]
Sent: Friday, January 8, 2021 12:34 PM
To: Frank Filz <ffilzlnx@mindspring.com>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: Re: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
Yes:
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
From: Frank Filz <ffilzlnx@mindspring.com>
Date: Friday, January 8, 2021 at 12:03 PM
To: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC]" <jeffrey.c.becker@nasa.gov>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: RE: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
Did it eventually say “Found Threads: TRUE” though? If so, look for what other errors there are. I get the Failed message with my cmake, but also get the Found Threads: TRUE, and everything works.
Frank
From: Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel [mailto:devel@lists.nfs-ganesha.org]
Sent: Friday, January 8, 2021 11:27 AM
To: Frank Filz <ffilzlnx@mindspring.com>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: [NFS-Ganesha-Devel] Re: [EXTERNAL] RE: Pthread CMake error
I’ve added several packages that the CMake output indicated were missing, and the CMake still fails with the same CMakeError output. The only thing I can see is:
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
Is that the issue? If so, how to fix? Thanks.
-Jeff
From: Frank Filz <ffilzlnx@mindspring.com>
Date: Thursday, January 7, 2021 at 4:47 PM
To: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC]" <jeffrey.c.becker@nasa.gov>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: RE: [EXTERNAL] RE: [NFS-Ganesha-Devel] Pthread CMake error
No, there must have been another error. Keep looking through the output and error logs.
Frank
From: Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] [mailto:jeffrey.c.becker@nasa.gov]
Sent: Thursday, January 7, 2021 3:57 PM
To: Frank Filz <ffilzlnx@mindspring.com>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: Re: [EXTERNAL] RE: [NFS-Ganesha-Devel] Pthread CMake error
I think it fails. The end of the output along with the cmake error code is:
-- Configuring incomplete, errors occurred!
See also "/u/jcbecker/ganesha.build/CMakeFiles/CMakeOutput.log".
See also "/u/jcbecker/ganesha.build/CMakeFiles/CMakeError.log".
-bash-4.4# echo $?
1
Did it actually work? Thanks.
-Jeff
From: Frank Filz <ffilzlnx@mindspring.com>
Date: Thursday, January 7, 2021 at 3:50 PM
To: "Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC]" <jeffrey.c.becker@nasa.gov>
Cc: 'Ganesha-devel' <devel@lists.nfs-ganesha.org>
Subject: [EXTERNAL] RE: [NFS-Ganesha-Devel] Pthread CMake error
Does it actually fail? I see similar errors and everything works find.
Apparently the cmake magic checking for pthread functions looks for both libpthread and libpthreads. Our respective systems have libpthread which if you look below IS were it finds pthread_create, so all should be good.
Frank
From: Becker, Jeffrey C. (ARC-TN)[InuTeq, LLC] via Devel [mailto:devel@lists.nfs-ganesha.org]
Sent: Thursday, January 7, 2021 2:02 PM
To: devel@lists.nfs-ganesha.org
Subject: [NFS-Ganesha-Devel] Pthread CMake error
Hi. I’m trying to build Ganesha 3.4 (latest stable), and CMake output shows the following:
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
However CMake fails with the following in CMakeError.log. Not sure how to proceed. Please advise. Thanks.
-Jeff
Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_52ec6/fast && /usr/bin/gmake -f CMakeFiles/cmTC_52ec6.dir/build.make CMakeFiles/cmTC_52ec6.dir/build
gmake[1]: Entering directory '/u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_52ec6.dir/src.c.o
/usr/bin/cc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -DCMAKE_HAVE_LIBC_PTHREAD -o CMakeFiles/cmTC_52ec6.dir/src.c.o -c /u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp/src.c
Linking C executable cmTC_52ec6
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_52ec6.dir/link.txt --verbose=1
/usr/bin/cc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -DCMAKE_HAVE_LIBC_PTHREAD -rdynamic CMakeFiles/cmTC_52ec6.dir/src.c.o -o cmTC_52ec6
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/cmTC_52ec6.dir/src.c.o: in function `main':
src.c:(.text+0x2d): undefined reference to `pthread_create'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x39): undefined reference to `pthread_detach'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x45): undefined reference to `pthread_cancel'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x56): undefined reference to `pthread_join'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: src.c:(.text+0x6a): undefined reference to `pthread_atfork'
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_52ec6.dir/build.make:104: cmTC_52ec6] Error 1
gmake[1]: Leaving directory '/u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:138: cmTC_52ec6/fast] Error 2
Source file was:
#include <pthread.h>
void* test_func(void* data)
{
return data;
}
int main(void)
{
pthread_t thread;
pthread_create(&thread, NULL, test_func, NULL);
pthread_detach(thread);
pthread_cancel(thread);
pthread_join(thread, NULL);
pthread_atfork(NULL, NULL, NULL);
pthread_exit(NULL);
return 0;
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp
Run Build Command(s):/usr/bin/gmake cmTC_3a45d/fast && /usr/bin/gmake -f CMakeFiles/cmTC_3a45d.dir/build.make CMakeFiles/cmTC_3a45d.dir/build
gmake[1]: Entering directory '/u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_3a45d.dir/CheckFunctionExists.c.o
/usr/bin/cc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_3a45d.dir/CheckFunctionExists.c.o -c /usr/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_3a45d
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3a45d.dir/link.txt --verbose=1
/usr/bin/cc -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fno-strict-aliasing -DCHECK_FUNCTION_EXISTS=pthread_create -rdynamic CMakeFiles/cmTC_3a45d.dir/CheckFunctionExists.c.o -o cmTC_3a45d -lpthreads
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
gmake[1]: *** [CMakeFiles/cmTC_3a45d.dir/build.make:104: cmTC_3a45d] Error 1
gmake[1]: Leaving directory '/u/jcbecker/ganesha.build/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:138: cmTC_3a45d/fast] Error 2
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org