<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Giovanni </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
It seems that the library was compiled with a compiler different from the main program, I don't know if and how it can happen. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Several options for fixing this:</div>
<ol start="1" style="list-style-type: decimal;" data-editing-info="{"applyListStyleFromLevel":false,"orderedStyleType":1}">
<li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div class="elementToProof">try a "make clean" inside the MBD directory and manually remove the .a file, then rebuild</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div class="elementToProof">Give a try to the cmake build system.</div>
</li><li style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<div class="elementToProof">If you don't mind about MBD, add -D__NOMBD to the DFLAGS variable inside the make.inc </div>
</li></ol>
<div id="appendonsend"></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hope this helps</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Pietro </div>
<hr style="display: inline-block; width: 98%;">
<div dir="ltr" id="divRplyFwdMsg"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> users <users-bounces@lists.quantum-espresso.org> on behalf of Giovanni Cantele <giovanni.cantele@spin.cnr.it><br>
<b>Sent:</b> Thursday, March 6, 2025 14:26<br>
<b>To:</b> Quantum ESPRESSO users Forum <users@lists.quantum-espresso.org><br>
<b>Subject:</b> [QE-users] Compilation issue under MacOs: 7.3 versus 7.3.1</span>
<div> </div>
</div>
<div style="direction: ltr;">Hi all,</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I'm experiencing a compilation issue of pw.x under MacOS 14.6.1.</div>
<div style="direction: ltr;">The make.inc is pasted at the end of this message.</div>
<div style="direction: ltr;">While with this make.inc qe-7.3 straightly compiles, using the SAME make.inc</div>
<div style="direction: ltr;">qe-7.3.1 produces this error:</div>
<div style="direction: ltr;">______________________ ERROR ______________________</div>
<div style="direction: ltr;" class="elementToProof">ld: warning: ignoring file /Users/cantele/Software/qe-7.3.1//MBD/libmbd.a, building for macOS-arm64 but attempting to link with file built for macOS-arm64<br>
Undefined symbols for architecture arm64:<br>
"___mbd_MOD___vtab_mbd_Mbd_calc_t", referenced from:<br>
___libmbd_interface_MOD_clean_mbd in libqemod.a(mbdlib.o)<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
___libmbd_interface_MOD_init_mbd in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_destroy", referenced from:<br>
___libmbd_interface_MOD_clean_mbd in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_evaluate_vdw_method", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_get_exception", referenced from:<br>
___libmbd_interface_MOD_init_mbd in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_get_gradients", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_get_lattice_stress", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_init", referenced from:<br>
___libmbd_interface_MOD_init_mbd in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_update_coords", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_update_lattice_vectors", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
"___mbd_MOD_mbd_calc_update_vdw_params_from_ratios", referenced from:<br>
___libmbd_interface_MOD_mbd_interface in libqemod.a(mbdlib.o)<br>
ld: symbol(s) not found for architecture arm64</div>
<div style="direction: ltr;">---------------------------------------------------------------------------------------</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">It seems that libmbd is causing the issue or at least it is the point where the issue shows up.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Does anybody have any hint about how to make 7.3.1 compile just as 7.3?</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Thanks.</div>
<div style="direction: ltr;">Giovanni</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">make.inc file ______________________________________________________________</div>
<div style="direction: ltr;"># make.inc. Generated from <a href="http://make.inc.in" id="OWAda4bd50f-3512-2067-fc08-75891e73e2ee" class="OWAAutoLink" data-auth="NotApplicable">
make.inc.in</a> by configure.<br>
<br>
# compilation rules<br>
<br>
.SUFFIXES :<br>
.SUFFIXES : .o .c .f90 .h .fh<br>
<br>
# most fortran compilers can directly preprocess c-like directives: use<br>
# $(MPIF90) $(F90FLAGS) -c $<<br>
# if explicit preprocessing by the C preprocessor is needed, use:<br>
# $(CPP) $(CPPFLAGS) $< -o $*.F90<br>
# $(MPIF90) $(F90FLAGS) -c $*.F90 -o $*.o<br>
# remember the tabulator in the first column !!!<br>
<br>
.f90.o:<br>
$(MPIF90) $(F90FLAGS) -c $<<br>
<br>
.c.o:<br>
$(CC) $(CFLAGS) -c $<<br>
<br>
.h.fh:<br>
$(CPP) $(CPPFLAGS) $< -o $*.fh<br>
<br>
<br>
<br>
# Top QE directory, useful for locating libraries, linking QE with plugins<br>
# The following syntax should always point to TOPDIR:<br>
TOPDIR = $(dir $(abspath $(filter %make.inc,$(MAKEFILE_LIST))))<br>
# if it doesn't work, uncomment the following line (edit if needed):<br>
<br>
# TOPDIR = /Users/cantele/Software/qe-7.3.1<br>
<br>
# DFLAGS = precompilation options (possible arguments to -D and -U)<br>
# used by the C compiler and preprocessor<br>
# To use libxc (v>=4.3.0), add -D__LIBXC to DFLAGS<br>
# See include/defs.h.README for a list of options and their meaning<br>
# With the exception of IBM xlf, FDFLAGS = $(DFLAGS)<br>
# For IBM xlf, FDFLAGS is the same as DFLAGS with separating commas<br>
<br>
# MANUAL_DFLAGS = additional precompilation option(s), if desired<br>
# BEWARE: it does not work for IBM xlf! Manually edit FDFLAGS<br>
MANUAL_DFLAGS =<br>
DFLAGS = -D__FFTW<br>
FDFLAGS = $(DFLAGS) $(MANUAL_DFLAGS)<br>
<br>
# IFLAGS = how to locate directories with *.h or *.f90 file to be included<br>
# typically -I$(TOPDIR)/include -I/some/other/directory/<br>
# the latter contains .e.g. files needed by FFT libraries<br>
# for libxc add -I/path/to/libxc/include/<br>
<br>
IFLAGS = -I. -I$(TOPDIR)/include<br>
<br>
# MOD_FLAG = flag used by f90 compiler to locate modules<br>
<br>
MOD_FLAG = -I<br>
<br>
# BASEMOD_FLAGS points to directories containing basic modules,<br>
# while BASEMODS points to the corresponding module libraries.<br>
# More package-specific directories can be added in each Makefile<br>
# and stored into MODFLAGS, and the same for module libraries in QEMODS<br>
<br>
BASEMOD_FLAGS= $(MOD_FLAG)$(TOPDIR)/upflib \<br>
$(MOD_FLAG)$(TOPDIR)/XClib \<br>
$(MOD_FLAG)$(TOPDIR)/Modules \<br>
$(MOD_FLAG)$(TOPDIR)/FFTXlib/src \<br>
$(MOD_FLAG)$(TOPDIR)/LAXlib \<br>
$(MOD_FLAG)$(TOPDIR)/UtilXlib \<br>
$(MOD_FLAG)$(TOPDIR)/MBD \<br>
$(MOD_FLAG)$(TOPDIR)/KS_Solvers $(FOX_MOD)<br>
<br>
# If A depends upon B, A should come before B in the list below<br>
# (most compilers don't care but some don't resolve cross links)<br>
BASEMODS= $(TOPDIR)/Modules/libqemod.a \<br>
$(TOPDIR)/upflib/libupf.a \<br>
$(TOPDIR)/XClib/xc_lib.a \<br>
$(TOPDIR)/FFTXlib/src/libqefft.a \<br>
$(TOPDIR)/LAXlib/libqela.a \<br>
$(TOPDIR)/UtilXlib/libutil.a \<br>
$(TOPDIR)/MBD/libmbd.a<br>
<br>
# Compilers: fortran-90, fortran-77, C<br>
# If a parallel compilation is desired, MPIF90 should be a fortran-90<br>
# compiler that produces executables for parallel execution using MPI<br>
# (such as for instance mpif90, mpf90, mpxlf90,...);<br>
# otherwise, an ordinary fortran-90 compiler (f90, g95, xlf90, ifort,...)<br>
<br>
MPIF90 = gfortran<br>
F90 = gfortran<br>
CC = cc<br>
<br>
# GPU architecture (Kepler: 35, Pascal: 60, Volta: 70, Ampere: 80)<br>
GPU_ARCH=<br>
<br>
# CUDA runtime (should be compatible with the CUDA driver)<br>
CUDA_RUNTIME=<br>
<br>
# CUDA F90 Flags<br>
CUDA_F90FLAGS= $(MOD_FLAG)$(TOPDIR)/external/devxlib/src<br>
<br>
# CUDA C Flags<br>
CUDA_CFLAGS=<br>
<br>
# C preprocessor and preprocessing flags - for explicit preprocessing,<br>
# if needed (see the compilation rules above)<br>
# preprocessing flags must include DFLAGS and IFLAGS<br>
<br>
CPP = cpp<br>
CPPFLAGS = -P -traditional -Uvector $(DFLAGS) $(IFLAGS)<br>
<br>
# compiler flags: C, F90<br>
# C flags must include DFLAGS and IFLAGS<br>
# F90 flags must include MODFLAGS, IFLAGS, and FDFLAGS with appropriate syntax<br>
<br>
CFLAGS = -O3 $(DFLAGS) $(IFLAGS) $(CUDA_CFLAGS)<br>
F90FLAGS = $(FFLAGS) -cpp $(FDFLAGS) $(CUDA_F90FLAGS) $(IFLAGS) $(MODFLAGS)<br>
<br>
# compiler flags with and without optimization for fortran-77<br>
# the latter is NEEDED to properly compile dlamch.f, used by lapack<br>
FFLAGS = -O3 -g -fallow-argument-mismatch<br>
FFLAGS_NOOPT = -O0 -g<br>
<br>
# compiler flag needed by some compilers when the main program is not fortran<br>
# Currently used for Yambo<br>
<br>
FFLAGS_NOMAIN =<br>
<br>
# Linker, linker-specific flags (if any)<br>
# Typically LD coincides with F90 or MPIF90, LD_LIBS is empty<br>
# for libxc, set LD_LIBS=-L/path/to/libxc/lib/ -lxcf03 -lxc<br>
# If libxc release is 5.0.0 replace -lxcf03 with -lxcf90<br>
<br>
LD = gfortran<br>
LDFLAGS = -g<br>
LD_LIBS =<br>
<br>
# External Libraries (if any) : blas, lapack, fft, MPI<br>
<br>
# If you have nothing better, use the local copy<br>
# BLAS_LIBS = $(TOPDIR)/external/lapack/libblas.a<br>
<br>
BLAS_LIBS = -lblas<br>
<br>
# If you have nothing better, use the local copy<br>
# LAPACK = liblapack<br>
# LAPACK_LIBS = $(TOPDIR)/external/lapack/liblapack.a<br>
<br>
LAPACK =<br>
LAPACK_LIBS = -L/usr/local/lib -llapack -lblas<br>
<br>
SCALAPACK_LIBS =<br>
<br>
# nothing needed here if the the internal copy of FFTW is compiled<br>
# (needs -D__FFTW in DFLAGS)<br>
<br>
FFT_LIBS =<br>
<br>
# HDF5<br>
HDF5_LIBS =<br>
<br>
# FOX<br>
FOX =<br>
FOX_MOD =<br>
FOX_LIB =<br>
FOX_FLAGS =<br>
<br>
# ENVIRON<br>
ENVIRON_LIBS =<br>
<br>
# MPI libraries (should not be needed)<br>
<br>
MPI_LIBS =<br>
<br>
# IBM-specific: MASS libraries, if available and if -D__MASS is defined in FDFLAGS<br>
<br>
MASS_LIBS =<br>
<br>
# CUDA libraries<br>
CUDA_LIBS= -L$(TOPDIR)/external/devxlib/src -ldevXlib<br>
CUDA_EXTLIBS = devxlib<br>
<br>
# ar command and flags - for most architectures: AR = ar, ARFLAGS = ruv<br>
<br>
AR = ar<br>
ARFLAGS = ruv<br>
<br>
# ranlib command. If ranlib is not needed (it isn't in most cases) use<br>
# RANLIB = echo<br>
<br>
RANLIB = ranlib -c<br>
<br>
# all internal and external libraries - do not modify<br>
<br>
FLIB_TARGETS = all<br>
<br>
LIBXC_LIBS =<br>
QELIBS = $(LIBXC_LIBS) \<br>
$(CUDA_LIBS) $(SCALAPACK_LIBS) $(LAPACK_LIBS) $(FOX_LIB) \<br>
$(FFT_LIBS) $(BLAS_LIBS) $(MPI_LIBS) $(MASS_LIBS) $(HDF5_LIBS) \<br>
$(ENVIRON_LIBS) $(LD_LIBS)<br>
<br>
# wget or curl - useful to download from network<br>
WGET = wget -O<br>
<br>
# Install directory - "make install" copies *.x executables there<br>
PREFIX = /usr/local</div>
<div style="direction: ltr;"><span style="color: rgb(0, 0, 0);">-- <br>
<br>
Giovanni Cantele, PhD<br>
CNR-SPIN<br>
c/o Dipartimento di Fisica<br>
Universita' di Napoli "Federico II"<br>
Complesso Universitario M. S. Angelo - Ed. 6<br>
Via Cintia, I-80126, Napoli, Italy<br>
</span><span style="color: rgb(17, 85, 204);"><a href="mailto:giovanni.cantele@spin.cnr.it" id="OWA57326696-fb73-ba38-3839-b60671428fe9" class="OWAAutoLink" style="color: rgb(17, 85, 204);">e-mail: giovanni.cantele@spin.cnr.it</a></span><span style="color: rgb(0, 0, 0);"><br>
Phone: +39 081 676910<br>
Skype contact: giocan74<br>
<br>
ResearcherID: </span><span style="color: rgb(17, 85, 204);"><a href="http://www.researcherid.com/rid/A-1951-2009" id="OWAacd20909-cb29-fee7-bf45-05be103cd9f2" class="OWAAutoLink" style="color: rgb(17, 85, 204);" data-auth="NotApplicable">http://www.researcherid.com/rid/A-1951-2009</a></span><span style="color: rgb(0, 0, 0);"><br>
Web page: </span><span style="color: rgb(17, 85, 204);"><a href="https://sites.google.com/view/giovanni-cantele/home" id="OWAaadf7d6c-ad22-e7bd-77d2-97a11e35e9a5" class="OWAAutoLink" style="color: rgb(17, 85, 204);" data-auth="NotApplicable">https://sites.google.com/view/giovanni-cantele/home</a></span></div>
</body>
</html>