eigen3 install problems
Ryan Schmidt
ryandesign at macports.org
Tue Aug 9 08:10:49 PDT 2011
On Aug 9, 2011, at 06:21, Brickle Macho wrote:
> I started from a new clean macport install. Downloaded the package,
> installed. Then installed python27, then tried to install opencv with
> python bindings:
>
> % sudo port install opencv +python27
>
> After a little investigation I discovered it fails installing eigen3.
> When I try the following:
>
> % sudo port install -v eigen3
>
> I see it fails with the following extract from highlighting the error:
> ------
> /usr/local/bin/gfortran -L/opt/local/lib -arch x86_64 -pipe -O2 -m64
> CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -o cmTryCompileExec
>
>
> gfortran: error: x86_64: No such file or directory
>
> gfortran: error: unrecognized option ‘-arch’
>
> gmake[1]: *** [cmTryCompileExec] Error 1
>
> gmake[1]: Leaving directory
> `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_math_eigen3/eigen3/work/3.0.1-x86_64/CMakeFiles/CMakeTmp'
>
>
> gmake: *** [cmTryCompileExec/fast] Error 2
> -------
>
>
> Figuring is some gfortran instal in /usr/local/bin,
I agree, that's probably the problem. It's not supported to have things installed in /usr/local while using MacPorts. Please remove (or move aside) /usr/local.
> issue I try install
> gfortran from macports
>
> % sudo port install gcc46 +gfortran
>
> This appears to install correctly, no errors.
We do have a build failure reported with gcc46 +gfortran:
https://trac.macports.org/ticket/30166
But it's interesting to hear that it builds for you. Maybe it only happens on certain systems.
> So I try to install
> eigen3, I clean it first just in case:
>
> % sudo port clean eigne3
> % sudo port -v install eigen3
>
> from the error message it appears to be macports gfortran but is still
> fails. Extract of verbose output follows:
>
> ----
> /opt/local/bin/gfortran -L/opt/local/lib -arch x86_64 -pipe -O2 -m64
> CMakeFiles/cmTryCompileExec.dir/testFortranCompiler.f.o -o cmTryCompileExec
>
>
> gfortran: error: x86_64: No such file or directory
>
> gfortran: error: unrecognized option '-arch'
>
> gmake[1]: *** [cmTryCompileExec] Error 1
> -----
Where did /opt/local/bin/gfortran come from? gcc46 +gfortran should (hopefully -- I haven't tried it) only install /opt/local/bin/gfortran-mp-4.6. Try "port provides /opt/local/bin/gfortran"; if it says gcc46 provided it, file a bug report against the gcc46 port.
> Any ideas how to fix the problem?
Remove all programs called exactly "gfortran" so that eigen3 won't find them. Or, if you want the fortran parts of eigen3, use one of eigen3's gcc variants (gcc44 or gcc45).
More information about the macports-users
mailing list