Compilation error(s) on Mac OS X 10.10 (Mavericks)

Marco Caccin marco.... at gmail.com
Thu Jun 4 10:44:10 UTC 2015


Ciao Alfio,

Thanks for the quick reply, it pointed me to the solution of the issue. For 
what you wrote it sounded like a parallel make problem but ti was not. 
Apparently the default "cc" compiler, clang, does not compile the .c bits 
in cp2k properly (or not at all, I don't care about checking that). 

The solution that worked for me is to specify in the makefile in arch/ the 
GNU cc compiler instead of the factory default, for example:
*CC = /opt/local/bin/gcc *
if you have installed gcc via MacPorts.

Hope this helps in case someone else wants to compile on Mavericks.

All my best,

Marco
 

On Thursday, 4 June 2015 07:29:51 UTC+1, Alfio Lazzaro wrote:
>
> Ciao Marco,
> the three functions open_socket, readbuffer and writebuffer, which are 
> used in ipi_driver.F, are declared in the file socket.c. For some reason 
> you are non compiling/linking this file, that's why you are missing 
> symbols. Could you check in the output of the compilation what it does with 
> socket.c?
> Another solution I can suggest you is to use:
>
> D__NO_IPI_DRIVER
>
> in your flags to avoid the ipi_driver compilation...
>
> Cheers,
>
> Alfio
>
>
>
> Il giorno mercoledì 3 giugno 2015 17:02:24 UTC+2, Marco Caccin ha scritto:
>>
>> Dear community,
>>
>> I am trying to re-install cp2k on an iMac for preliminary toy models 
>> studies, but there seem to be some troubles in doing so since the last OS 
>> upgrade. 
>>
>> - First off, a small bug for which the fix is easy:
>>   in the Makefiles for Darwin architectures, change 'vecLib' with 
>> 'Accelerate' (The old library is no more present and has been included into 
>> Accelerate)
>>
>> - Next, the standing issue: by the end of the compilation, the following 
>> error is raised:
>>
>> gfortran -fopenmp -ffast-math -funroll-loops -ftree-vectorize -ffree-form 
>> -O2  -D__COMPILE_ARCH="\"Darwin-IntelMacintosh-gfortran\"" 
>> -D__COMPILE_DATE="\"Wed  3 Jun 2015 15:47:31 BST\"" -D__COMPILE_HOST="\"
>> phpc173.ph.kcl.ac.uk\"" -D__COMPILE_REVISION="\"-n svn: 15375\"" 
>> -D__DATA_DIR="\"$CP2K/cp2k/data\"" 
>>  -L/$CP2K/cp2k/lib/Darwin-IntelMacintosh-gfortran/ssmp -o 
>> /$CP2K/cp2k/exe/Darwin-IntelMacintosh-gfortran/cp2k.ssmp cp2k.o 
>>  -lcp2kstart -lcp2kmc -lcp2kswarm -lcp2kmotion -lcp2kthermostat -lcp2ktmc 
>> -lcp2kmain -lcp2ksubsys -lcp2kxc -lcp2kao -lcp2kinput -lcp2kpw -lcp2kfft 
>> -lcp2kma -lcp2kmachine -lcp2kdbcsrwrap -ldbcsr -ldbcsrarnoldi -ldbcsrvec 
>> -ldbcsrmm -ldbcsrops -ldbcsrbblock -ldbcsrbdist -ldbcsrbase -ldbcsrdata 
>> -ldbcsrerr -lmicsmm -lclsmm -lcp2kacc -lcp2kaccmic -lcp2ksrc 
>> -lcp2kaccopencl -lcp2kfm -lcp2kcommon -lcp2kmpiwrap -lcp2kgrid -lcp2kbase 
>> -Wl,-framework -Wl,Accelerate -Wl,-Y -Wl,10 -lgcc_eh
>> Undefined symbols for architecture x86_64:
>>   "_open_socket", referenced from:
>>       ___ipi_driver_MOD_run_driver in libcp2kmain.a(ipi_driver.o)
>>   "_readbuffer", referenced from:
>>       ___ipi_driver_MOD_run_driver in libcp2kmain.a(ipi_driver.o)
>>   "_writebuffer", referenced from:
>>       ___ipi_driver_MOD_writebuffer_s.constprop.1 in 
>> libcp2kmain.a(ipi_driver.o)
>>       ___ipi_driver_MOD_run_driver in libcp2kmain.a(ipi_driver.o)
>> ld: symbol(s) not found for architecture x86_64
>> collect2: error: ld returned 1 exit status
>>
>> Did anybody incur in the same problem and hopefully fixed it?
>>
>>
>> Best,
>>
>> Marco
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150604/d60100f1/attachment.htm>


More information about the CP2K-user mailing list