Problems compiling MET with gcc compiler #1876
-
Dear MET_help support team, I am having troubles trying to compile MET in our machines. I am following the following tutorials:
but I get the following error message: ######################################################### Compiling libraries into: /home/diego/MET_TOOL_v4/10.1.2//external_libs Using python version: Compiling GSL_2.1 at mié oct 19 11:50:29 CEST 2022 Compiling MET at mié oct 19 11:52:32 CEST 2022 Looking at the config.log I found the following specific errors: ######################################################### gcc: error: unrecognized command line option '-V' configure:3788: $? = 1 and also this one: ######################################################### conftest.c:13:2: error: unknown type name 'choke' In file included from conftest.c:15:0: ^ configure:4464: $? = 1 To provide you with more information, here I show you my installation file: mc3:~/MET_TOOL_v4/10.1.2> cat install_met_env.mc3 #Find the directory this script is called from #Required #Required #Required #Required #Required #Root directory of your python install #Directory of your python executable #Python ldflags created using python2.7-config #Python cflags created using python2.7-config #64 bit machine or not #General CFLAGS #General CXXLAGS #Normally should be omitted or set to TRUE - only used if building from github repo #If you've already compiled these and don't need to compile them again, set the following Could you help me to solve this issue? Thanks in advance, Best Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
HI @diegocarrio. I see you are having problems compiling MET. Thank you for all of this helpful information and for using our tutorials/documentation. It would be great to look at the entire config.log file. Could you please either attach it here or send it up to our FTP server using the directions posted in the How to Send Us Data Discussion (and then let me know that you have posted it)? Offhand, I see that in the configuration file install_met_env.mc3, you have the compiler set to intel:
In the output from the script, I see that the following are not set:
And in the config.log file, it looks like the compiler being used is "gcc". That may or may not be problematic, if the script is expecting the Intel compiler, but gcc is being used, as there are directives in the compile script to do one thing if using Intel, in some cases, but another thing, if using GNU compilers. Did all of the libraries install successfully in /home/diego/MET_TOOL_v4/10.1.2//external_libs/lib and /home/diego/MET_TOOL_v4/10.1.2//external_libs/include? If you'd like to try again, changing
to
(if you truly would like to compile with the GNU compilers and not intel), I would also suggest simplifying the MET_PYTHON_CC variable from this:
to
Unfortunately, sometimes running "python3.8-config --cflags" can provide information that is not really necessary and can interfere with the installation. I look forward to taking a look at your existing or a new config.log file, which will hopefully shed some further light on what is going wrong. |
Beta Was this translation helpful? Give feedback.
-
Hi @jprestop I have modified the line 666 of the compile_MET_all_fix.sh in the following way and seems to work: export CURL_DIR="/usr/lib/x86_64-linux-gnu/" ./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include LIBS="-L${LIB_DIR}/lib -lhdf5_hl -lhdf5 -lz -lnetcdf" CURL_LIB="-L${CURL_LIB} -lcurl" > configure.log 2>&1 Now, the netcdf libraries seem to finish successfully with the following message: +-------------------------------------------------------------+ +-------------------------------------------------------------+ Now, the make.log file in met10.1.2 show me the following error: /home/diego/MET_TOOL_mc4/10.1.2/met-10.1.2/src/basic/vx_util/python_line.cc:172: undefined reference to I have uploaded this file in the ftp server with the following name: "make.log_24Oct2022". I hope it can help! Thanks in advance, |
Beta Was this translation helpful? Give feedback.
Hi @jprestop
I have modified the line 666 of the compile_MET_all_fix.sh in the following way and seems to work:
export CURL_DIR="/usr/lib/x86_64-linux-gnu/"
./configure --prefix=${LIB_DIR} LDFLAGS=-L${LIB_DIR}/lib CPPFLAGS=-I${LIB_DIR}/include LIBS="-L${LIB_DIR}/lib -lhdf5_hl -lhdf5 -lz -lnetcdf" CURL_LIB="-L${CURL_LIB} -lcurl" > configure.log 2>&1
Now, the netcdf libraries seem to finish successfully with the following message:
+-------------------------------------------------------------+
| Congratulations! You have successfully installed netCDF! |
| |
| You can use script "nc-config" to find out the relevant |
| compiler options to build your application. Enter |
| |
| nc-config --help |