Closed matt-shenton closed 2 years ago
Hi Matt,
Thanks for reporting this issue. The first compile warning is harmless and expected. The compile failure though, I believe, is because GNU GCC version 5 or higher is needed. I will add this requirement to the documentation.
Thanks and please let me know if other issues arise! Jens
Hi Jens, I met an identical error as Matt, although I installed gcc7.30.
[ 28%] Building CXX object CMakeFiles/FaNDOM.dir/OMIO.cpp.o [ 42%] Building CXX object CMakeFiles/FaNDOM.dir/OMHelper.cpp.o /home/cheng/Documents/Temp_bioinfo_tools/FaNDOM/OMHelper.cpp: 関数 ‘std::string return_current_time_and_date()’ 内: /home/cheng/Documents/Temp_bioinfo_tools/FaNDOM/OMHelper.cpp:236:61: エラー: ‘put_time’ was not declared in this scope ss << put_time(std::localtime(&in_time_t), "%Y-%m-%d %X"); ^ make[2]: [CMakeFiles/FaNDOM.dir/OMHelper.cpp.o] エラー 1 make[1]: [CMakeFiles/FaNDOM.dir/all] エラー 2 make: *** [all] エラー 2
Thank you, Cheng
Hi, Yes, actually, changing the gcc version didn"t solve my problem either. Sorry for not reporting back
Best regards Matt
Interesting - thanks for letting me know. Could you please specify which OS you are using? If you do
cmake --system-information cmake_info.txt
less cmake_info.txt
There will be a line near the top specifying CMAKE_CXX_COMPILER ==
. What C++ compiler does this specify? Please note that the file this points to is possibly a symlink to the real compiler (at least on Ubuntu). I think it is possible that if the default is g++, instead of gcc, and if the g++ version is not over 5.0 then the issue would persist. If you could also check what version of the compiler that path points to currently that would also be very helpful.
Thank you and sorry for the issues, Jens
I don't have root access, so I used a conda environment to install gcc
following the procedure above: CMAKE_CXX_COMPILER == "usr/bin/c++"
and indeed, the version was 4.8.5 the CMAKE_C_COMPILER points to the x86_64-conda-linux-gnu-cc in my conda environment
///////////////
OK, now I used "conda install -c conda-forge gxx"
and the CMAKE_CXX_COMPILER and CMAKE_C_COMPILER are both the ones in my conda environment.
g++ version is g++ (GCC) 11.2.0
However, the same error as above is still happening.
Best regards Matt
Hi, Jens and Matt,
I could finally compile it by using Ubuntu's gcc9.3.0. It seems the problem is on the OS.
Best, Cheng
Thank you Matt and Cheng,
Would you be able to provide the OS version you were using? I can try to recreate and correct the issue since I currently do not get such a bug on the Ubuntu and Mac OS systems we have tried.
If you are desperate to make it work in the meantime, you could replace the offending line OMHelper.cpp:236 with ss << "Timestamp unavailable!";
and re-compile.
Thank you, Jens
Thank you Matt and Cheng,
Would you be able to provide the OS version you were using? I can try to recreate and correct the issue since I currently do not get such a bug on the Ubuntu and Mac OS systems we have tried.
(base) [mshenton@cluster1 ~]$ cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
Thanks
Matt
Is it the time that's causing the problem? Could it be an Asian time setting? the OS language is Japanese here
(base) [mshenton@cluster1 ~]$ locale LANG=ja_JP.UTF-8 LC_CTYPE="ja_JP.UTF-8" LC_NUMERIC="ja_JP.UTF-8" LC_TIME="ja_JP.UTF-8" LC_COLLATE="ja_JP.UTF-8" LC_MONETARY="ja_JP.UTF-8" LC_MESSAGES="ja_JP.UTF-8" LC_PAPER="ja_JP.UTF-8" LC_NAME="ja_JP.UTF-8" LC_ADDRESS="ja_JP.UTF-8" LC_TELEPHONE="ja_JP.UTF-8" LC_MEASUREMENT="ja_JP.UTF-8" LC_IDENTIFICATION="ja_JP.UTF-8" LC_ALL=
Hi, Jens,
The followings are my PC's OS information, almost exactly same as Matt's ones.
Best, Cheng
NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
Hi Matt and Cheng,
I was able to test on a CentOS 7 system and reproduced the error. I have modified the tool in the latest commit c338423 so it does not use put_time
and uses a more standard method instead. I was then able to run FaNDOM without issues (and with GCC < 5.0) after this update.
Please let me know if it continues to cause any issues.
Thanks, Jens
Thank you, Jens. Happy to know that you have got FaNDOM worked on CentOS
Dear Jens,
Sorry, it took me a while to get round to testing. Now I have confirmed I could successfully install it.
Many thanks Matt
Hi there
Having trouble installing here
Linux cluster1 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
This is a Japanese machine,
The first error below says "Warning: Converting from NULL to non-pointer type ‘int’"
エラー just means "error"
Thanks for any advice. Best wishes Matt Shenton
(fandom) [mshenton@cluster1 FaNDOM]$ cmake CMakeLists.txt && make -- The C compiler identification is GNU 4.8.5 -- The CXX compiler identification is GNU 4.8.5 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /lustre/home/mshenton/pipelines/FaNDOM Scanning dependencies of target FaNDOM [ 14%] Building CXX object CMakeFiles/FaNDOM.dir/main.cpp.o In file included from /lustre/home/mshenton/pipelines/FaNDOM/main.cpp:10:0: /lustre/home/mshenton/pipelines/FaNDOM/threadsafe_queue.h: In instantiation of ‘Data threadsafe_queue::pop() [with Data = int]’: /lustre/home/mshenton/pipelines/FaNDOM/main.cpp:134:37: required from here /lustre/home/mshenton/pipelines/FaNDOM/threadsafe_queue.h:21:20: 警告: NULL から非ポインタ型 ‘int’ へ変換しています [-Wconversion-null] return NULL; ^ [ 28%] Building CXX object CMakeFiles/FaNDOM.dir/OMIO.cpp.o [ 42%] Building CXX object CMakeFiles/FaNDOM.dir/OMHelper.cpp.o /lustre/home/mshenton/pipelines/FaNDOM/OMHelper.cpp: 関数 ‘std::string return_current_time_and_date()’ 内: /lustre/home/mshenton/pipelines/FaNDOM/OMHelper.cpp:236:61: エラー: ‘put_time’ was not declared in this scope ss << put_time(std::localtime(&in_time_t), "%Y-%m-%d %X"); ^ make[2]: [CMakeFiles/FaNDOM.dir/OMHelper.cpp.o] エラー 1 make[1]: [CMakeFiles/FaNDOM.dir/all] エラー 2 make: *** [all] エラー 2