geomorphR/geomorph

Compiler checks for 32-bit version of gfortran on 64-bit system

Closed this issue · 3 comments

Hey, i have gfortran installed as per the installation instructions, but received this error:

* installing *source* packagegeomorph...
** packagegeomorphsuccessfully unpacked and MD5 sums checked
** libs
gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c geomorph.c -o geomorph.o
gcc -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -L/usr/local/lib -o geomorph.so geomorph.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/usr/local/lib/x86_64 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -lgfortran -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'
ld: library not found for -lgfortran
collect2: ld returned 1 exit status
make: *** [geomorph.so] Error 1
ERROR: compilation failed for packagegeomorph* removing/Library/Frameworks/R.framework/Versions/3.2/Resources/library/geomorphWarning in install.packages :
  installation of packagegeomorphhad non-zero exit status

I run OSX 10.8 (x86_64-apple-darwin10.8.0 (64-bit)) and have therefore installed the 64-bit version of gfortran 4.2.3. But your compiler incorrectly looks for the 32-bit version on my system. I therefore installed the 32-bit version from here:
http://cran.r-project.org/bin/macosx/tools/
and voilá, it works now and compiled correctly.
I feel you should either mention this in your instructions or add a check in the compilation configuration.
Best regards!

Thanks for your email. I've also found similar issues - R consistently uses
older versions of gfortan for compilation, it's out of our hands.
I do have however have this information in the instructions for geomorph (
http://www.geomorph.net/p/installing-geomorph.html)

Thanks

Emma


Emma Sherratt, PhD.

Lecturer in Zoology,
Zoology Division, School of Environmental and Rural Science,
Room L112 Bldg C02,
University of New England,
Armidale, NSW, Australia, 2351
Tel: +61 2 6773 5041
email: emma.sherratt@une.edu.au
Twitter: @DrEmSherratt

Caecilians are legless amphibians...

*                      __
    (\   .-.   .-.   /_")
     \\_//^\\_//^\\_//
      `"`   `"`   `"`*

learn more about them here: www.emmasherratt.com/caecilians




On 10 July 2015 at 08:07, zerweck <notifications@github.com> wrote:

> Hey, i have gfortran installed as per the installation instructions, but
> received this error:
>
> * installing *source* package ‘geomorph’ ...** package ‘geomorph’ successfully unpacked and MD5 sums checked** libsgcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include    -fPIC  -mtune=core2 -g -O2  -c geomorph.c -o geomorph.ogcc -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -L/usr/local/lib -o geomorph.so geomorph.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/usr/local/lib/x86_64 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -lgfortran -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundationld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'ld: warning: directory not found for option '-L/usr/local/lib/x86_64'ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'ld: library not found for -lgfortrancollect2: ld returned 1 exit statusmake: *** [geomorph.so] Error 1ERROR: compilation failed for package ‘geomorph’* removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/geomorph’Warning in install.packages :
>   installation of package ‘geomorph’ had non-zero exit status
>
> I run OSX 10.8 (x86_64-apple-darwin10.8.0 (64-bit)) and have therefore
> installed the 64-bit version of gfortran 4.2.3. But your compiler
> incorrectly looks for the 32-bit version on my system. I therefore
> installed the 32-bit version from here:
> http://cran.r-project.org/bin/macosx/tools/
> and voilá, it works now and compiled correctly.
> I feel you should either mention this in your instructions or add a check
> in the compilation configuration.
> Best regards!
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/EmSherratt/geomorph/issues/3>.
>

I do have however have this information in the instructions for geomorph ( http://www.geomorph.net/p/installing-geomorph.html)

Hey, thank you for your quick response. However, the relevant information (that even users of 64-Bit versions of OSX before 10.9 should download the 32-Bit gfortran installer instead of the 64-Bit one) is not actually in your installation instructions, as far as i saw.
Here's the relevant passage:

For OS 10.8 and below: go to CRAN website here and download the GNU Fortran compiler (gfortran-4.2.3.pkg) and follow install instructions.

But the links on CRAN are:

gfortran-4.2.3.pkg (OS X 10.5+, signed, 64-bit driver)

and

gfortran-4.2.3.dmg (OS X 10.4, 32-bit driver)

So my suggestion is to change your instructions to:

For OS 10.8 and below: go to CRAN website here and download the GNU Fortran compiler (gfortran-4.2.3.dmg, 32-Bit Version) and follow install instructions.

People installing R on a Mac or any other platform can refer to CRAN for
more details- as a package maintainer it is not my role to provide this
information. I did so in this instance out of good will to help geomorph
users. The 64 bit version may not have worked for you, however it has for
me when I've installed R on several other machines. So thank you, but I
shall leave my user guide as it is.

On Friday, July 10, 2015, zerweck notifications@github.com wrote:

I do have however have this information in the instructions for geomorph (
http://www.geomorph.net/p/installing-geomorph.html)

Hey, thank you for your quick response. However, the relevant information
(that even users of 64-Bit versions of OSX before 10.9 should download the
32-Bit gfortran installer instead of the 64-Bit one) is not actually in
your installation instructions, as far as i saw.
Here's the relevant passage:

For OS 10.8 and below: go to CRAN website here and download the GNU
Fortran compiler (gfortran-4.2.3.pkg) and follow install instructions.

But the links on CRAN are:

gfortran-4.2.3.pkg (OS X 10.5+, signed, 64-bit driver)

and

gfortran-4.2.3.dmg (OS X 10.4, 32-bit driver)

So my suggestion is to change your instructions to:

For OS 10.8 and below: go to CRAN website here and download the GNU
Fortran compiler (gfortran-4.2.3.dmg, 32-Bit Version) and follow
install instructions.


Reply to this email directly or view it on GitHub
https://github.com/EmSherratt/geomorph/issues/3#issuecomment-120394111.


Emma Sherratt, PhD.

Lecturer in Zoology,
Zoology Division, School of Environmental and Rural Science,
Room L112 Bldg C02,
University of New England,
Armidale, NSW, Australia, 2351
Tel: +61 2 6773 5041
email: emma.sherratt@une.edu.au
Twitter: @DrEmSherratt

Caecilians are legless amphibians...

*                      __
    (\   .-.   .-.   /_")
     \\_//^\\_//^\\_//
      `"`   `"`   `"`*

learn more about them here: www.emmasherratt.com/caecilians