Undefined symbols for architecture x86_64 error on fortran compiling

Christopher Jones jonesc at hep.phy.cam.ac.uk
Wed Dec 11 08:20:36 PST 2013


Hi,

Where is this ‘ifort’ coming from ? A Macports package or elsewhere ? From the messages below, I am not sure I see what this has to do with MacPorts ?

Chris

On 11 Dec 2013, at 5:13pm, zhifeng yang <yangzf01 at gmail.com> wrote:

> Here is the whole command to compile this fortran code with error
> 
> ifort -o wrf.exe -openmp -fpp -auto -O3 -ip -fp-model precise -w -ftz -align all -fno-alias -FR -convert big_endian   -ip -Wl,-stack_addr,0xF10000000 -Wl,-stack_size,0x64000000 -m64   wrf.o ../main/module_wrf_top.o libwrflib.a /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/fftpack/fftpack5/libfftpack.a /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/io_grib1/libio_grib1.a /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/io_grib_share/libio_grib_share.a /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/io_int/libwrfio_int.a -L/Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/esmf_time_f90 -lesmf_time /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/RSL_LITE/librsl_lite.a /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/frame/module_internal_header_util.o /Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/frame/pack_utils.o  -L/Users/bruce/Documents/A/model/WRFChem/WRFChem3_5_1/WRFV3/external/io_netcdf -lwrfio_nf -L/opt/local/lib -lnetcdff -lnetcdf
> Undefined symbols for architecture x86_64:
>   "_module_data_soa_vbs_mp_ccofm_", referenced from:
>       _module_aerosols_soa_vbs_mp_nuclcond_ in libwrflib.a(module_aerosols_soa_vbs.o)
>       _module_aerosols_soa_vbs_mp_aerosols_soa_vbs_init_ in libwrflib.a(module_aerosols_soa_vbs.o)
>   "_module_data_soa_vbs_mp_ccofm_org_", referenced from:
>       _module_aerosols_soa_vbs_mp_nuclcond_ in libwrflib.a(module_aerosols_soa_vbs.o)
>       _module_aerosols_soa_vbs_mp_aerosols_soa_vbs_init_ in libwrflib.a(module_aerosols_soa_vbs.o)
>   "_module_data_soa_vbs_mp_cw_phase_", referenced from:
>       _module_aerosols_soa_vbs_mp_modpar_ in libwrflib.a(module_aerosols_soa_vbs.o)
>       _module_aerosols_soa_vbs_mp_modpar_..0 in libwrflib.a(module_aerosols_soa_vbs.o)
> 
> Thank you
> Bruce
> 
> On Dec 11, 2013, at 10:09 AM, zhifeng yang <yangzf01 at gmail.com> wrote:
> 
>> Here is the whole error
>> 
>> Undefined symbols for architecture x86_64:
>>   "___kmpc_end_master", referenced from:
>>       _wrf_message_ in module_wrf_error.o
>>       _wrf_message2_ in module_wrf_error.o      _wrf_check_error_ in module_wrf_error.o      _wrf_error_fatal_ in module_wrf_error.o      _wrf_error_fatal3_ in module_wrf_error.o
>>   "___kmpc_global_thread_num", referenced from:
>>       _wrf_message_ in module_wrf_error.o
>>       _wrf_message2_ in module_wrf_error.o
>>       _wrf_check_error_ in module_wrf_error.o
>>       _wrf_error_fatal_ in module_wrf_error.o
>>       _wrf_error_fatal3_ in module_wrf_error.o
>>       _module_wrf_error._ in module_wrf_error.o
>>   "___kmpc_master", referenced from:
>>       _wrf_message_ in module_wrf_error.o
>>       _wrf_message2_ in module_wrf_error.o
>>       _wrf_check_error_ in module_wrf_error.o
>>       _wrf_error_fatal_ in module_wrf_error.o
>>       _wrf_error_fatal3_ in module_wrf_error.o
>> ld: symbol(s) not found for architecture x86_64
>> make[2]: [diffwrf] Error 1 (ignored)
>> 
>> Actually the code is fine, no error in the code. Because it’s from WRF committee. I guess the reason that I get the error is from compiler or its flags. But I am not sure currently.
>> 
>> Thank you
>> Bruce
>> 
>> On Dec 11, 2013, at 10:06 AM, Ryan Schmidt <ryandesign at macports.org> wrote:
>> 
>>> 
>>> On Dec 11, 2013, at 01:40, Gmail wrote:
>>> 
>>>> When I compile a fortran code, I got the error 
>>>> Undefined symbols for architecture x86_64
>>>> 
>>>> My mac is 64bits. The fortran compiler used here is ifort.
>>> 
>>> The relevant information would be *what* symbols were undefined, what your code looks like, and where those symbols are actually defined.
>>> 
>>> 
>> 
> 
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> https://lists.macosforge.org/mailman/listinfo/macports-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20131211/d0cccad9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2030 bytes
Desc: not available
URL: <https://lists.macosforge.org/pipermail/macports-users/attachments/20131211/d0cccad9/attachment.p7s>


More information about the macports-users mailing list