[MacPorts] #38752: makefile variables in petsc +Accelerate refer to ATLAS libs
MacPorts
noreply at macports.org
Wed Apr 10 15:19:18 PDT 2013
#38752: makefile variables in petsc +Accelerate refer to ATLAS libs
---------------------------+--------------------------------
Reporter: kingcrimson@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.3
Keywords: | Port: petsc
---------------------------+--------------------------------
I installed petsc +Accelerate but the file
/opt/local/lib/petsc/conf/petscvariables
contains
{{{#!makefile
PETSC_EXTERNAL_LIB_BASIC = -lX11 -L/opt/local/lib/petsc/lib -lcmumps
-ldmumps -lsmumps -lzmumps -lmumps_common -lpord -lscalapack -lblacs
-lparmetis -lmetis -lml -lptesmumps -lptscotch -lptscotcherr -lpthread
-L/opt/local/lib -lyaml -L/usr/lib -llapack -lblas -lhdf5_fortran -lhdf5
-lhdf5hl_fortran -lhdf5_hl -lz -ldl -lmpi_f90 -lmpi_f77 -lmpi -lm
-lgfortran -L/opt/local/lib/gcc47/gcc/x86_64-apple-darwin12/4.7.2
-L/opt/local/lib/gcc47 -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm
-lm -lm -lz -lz -ldl
HDF5_LIB = -L/opt/local/lib -lhdf5_fortran -lhdf5 -lhdf5hl_fortran
-lhdf5_hl -lz
}}}
that causes the attached example to fail with this error
{{{
$ make 3_petsc_mat
/opt/local/bin/openmpicxx -o 3_petsc_mat.o -c -O2 -O2
-I/opt/local/lib/petsc/include -I/opt/local/lib/petsc/include
-I/opt/local/include -I/opt/local/include/openmpi -D__INSDIR__=
3_petsc_mat.c
clang: warning: treating 'c' input as 'c++' when in C++ mode, this
behavior is deprecated
--> Linking the executable... <--
/opt/local/bin/openmpicxx -Wl,-multiply_defined,suppress
-Wl,-multiply_defined -Wl,suppress -Wl,-commons,use_dylibs
-Wl,-search_paths_first -O2 -O2 -o 3_petsc_mat 3_petsc_mat.o
-L/opt/local/lib/petsc/lib -lpetsc -lX11 -lcmumps -ldmumps -lsmumps
-lzmumps -lmumps_common -lpord -lscalapack -lblacs -lparmetis -lmetis -lml
-lptesmumps -lptscotch -lptscotcherr -lpthread -L/opt/local/lib -lyaml
-L/usr/lib -llapack -lblas -lhdf5_fortran -lhdf5 -lhdf5hl_fortran
-lhdf5_hl -lz -ldl -lmpi_f90 -lmpi_f77 -lmpi -lm -lgfortran
-L/opt/local/lib/gcc47/gcc/x86_64-apple-darwin12/4.7.2
-L/opt/local/lib/gcc47 -lgfortran -lSystem -lgcc_ext.10.5 -lquadmath -lm
-lm -lm -lz -lz -ldl
Undefined symbols for architecture x86_64:
"_ATL_dger", referenced from:
_ATL_dgetf2 in liblapack.a(ATL_dgetf2.o)
"_ATL_xerbla", referenced from:
_atl_f77wrap_dgetrf_ in liblapack.a(ATL_f77wrap_dgetrf.o)
_atl_f77wrap_dgetrs_ in liblapack.a(ATL_f77wrap_dgetrs.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: [3_petsc_mat] Error 1 (ignored)
/bin/rm -f 3_petsc_mat.o
-->...done. <--
}}}
changing
{{{
-L/usr/lib -llapack -lblas
}}}
to
{{{
-Wl,-framework -Wl,Accelerate
}}}
in
/opt/local/lib/petsc/conf/petscvariables
fixes the problem for me
--
Ticket URL: <https://trac.macports.org/ticket/38752>
MacPorts <http://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list