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

Alfio Lazzaro alfio.... at
Thu Jun 4 06:29:50 UTC 2015

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:


in your flags to avoid the ipi_driver compilation...



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="\"
>\"" -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: <>

More information about the CP2K-user mailing list