Eugenio
On Nov 26, 2014, at 10:29 AM, Eugenio Gianniti < address@hidden> wrote:
Hi all,
I’ve been trying to set up a Portfile of fem-fenics for MacPorts.
After some fun due to boost requiring a +mpi build, and that variant having been removed 2 months ago, and then running into dolfin needing py-scientific, which in turn needs py-numpy < 1.9.0, as numpy >= 1.9.0 no longer has the oldnumeric module,
I finally got to the point of building fem-fenics, but I get the following error:
:info:configure CPPFLAGS='-I/usr/include/ -I/opt/local/include/eigen3 -I. -DLATEST_DOLFIN -pipe -Os -arch x86_64 -std=c++11 -Wno-deprecated -DDOLFIN_VERSION=\"1.4.0\" -DBOOST_UBLAS_NDEBUG -DDOLFIN_SIZE_T=8 -DHAS_UMFPACK -DHAS_CHOLMOD -DHAS_ZLIB
-DHAS_CPPUNIT -DHAS_MPI -DHAS_QT4 -DHAS_VTK -I/opt/local/include -I/opt/local/include/vtk-5.10 -I/opt/local/include -I/opt/local/include/mpich-mp -I/opt/local/include -I/opt/local/include/eigen3 -I/opt/local/include/mpich-mp -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include
-I/opt/local/include/libxml2 ' /opt/local/bin/mkoctfile-3.8.2 Mesh.o -o Mesh.oct "-L/opt/local/lib" "-L/opt/local/lib/mpich-mp" "-L/opt/local/lib" "-lQtCore" "-lQtGui" "-lpmpi" "-lmpi" "-lmpicxx" "-lcppunit" "-lz" "-latlas" "-lf77blas" "-lcblas"
"-lsuitesparseconfig" "-lccolamd" "-lcolamd" "-lcamd" "-lamd" "-lcholmod" "-lumfpack" "-lboost_iostreams-mt" "-lboost_thread-mt" "-lboost_system-mt" "-lboost_program_options-mt" "-lboost_filesystem-mt" "-lxml2" "-Wl,-headerpad_max_install_names"
"-arch" "x86_64" "-ldolfin" -lboost_mpi -lboost_serialization
:info:configure mkoctfile: unrecognized argument -archmake: *** [Mesh.oct] Error 1
:info:configure
:info:configure pkg: error running `make' for the fem-fenics package.
:info:configure error: called from 'configure_make' in file /opt/local/share/octave/3.8.2/m/pkg/private/configure_make.m near line 82, column 9
:info:configure error: called from:
:info:configure error: /opt/local/share/octave/3.8.2/m/pkg/private/install.m at line 199, column 5
:info:configure error: /opt/local/share/octave/3.8.2/m/pkg/private/build.m at line 50, column 3
:info:configure error: /opt/local/share/octave/3.8.2/m/pkg/pkg.m at line 516, column 7
:info:configure Command failed: cd "/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_math_octave-fem-fenics/octave-fem-fenics/work/fem-fenics" && /opt/local/bin/octave -q -f --eval 'pkg build -verbose -nodeps /opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_math_octave-fem-fenics/octave-fem-fenics/work/fem-fenics
/opt/local/var/macports/build/_Users_marius_Development_MacPorts_ports_math_octave-fem-fenics/octave-fem-fenics/work/.tmp/fem-fenics.tar.gz'
Any ideas?
Yeah, the problem is that mkoctfile can manage just a subset of options and flags for the compiler/linker, and I’d say that -arch is one of the unsupported ones. That’s the reason why the preprocessor flags are passed via the environment and not as arguments
to mkoctfile, but unfortunately this doesn’t hold for linker flags as well.
If you don’t mind I can provide you with a patch tonight or tomorrow to check that everything works, then I’ll push it to the repo, possibly releasing another version of the package with the correct build scripts. Are you creating a Portfile to install the
“stable” version or the development one?
Eugenio
That would be great!
Thanks,
Marius
--
Marius Schamschula
I attach a patch to pass linker flags the way preprocessor flags are passed. Unfortunately for the time being I can’t test it myself on Mac OS X, but on Ubuntu it doesn’t break anything, and it should avoid the error caused by mkoctfile not recognizing
the -arch flag.
Let me know if you succeed in building.
Eugenio
|