Re: gfortran for M1?

2021-03-20 Thread petr.2006
Thank you Chris,

it was the reason. Now it works. Great.

Petr

__
> Od: "Christopher Jones" 
> Komu: petr.2...@centrum.cz, "Gerben Wierda via macports-users" 
> , "Marius Schamschula" 
> 
> Datum: 20.03.2021 16:50
> Předmět: Re: gfortran for M1?
>
>Hi,
>
>You probably need to specify the SDK location. There are a number ways you can 
>do this, gcc now supports the same mechanisms as clang. i.e. using scrub or 
>setting SDKROOT .
>I personally have
>
>export SDKROOT=`xcrun --show-sdk-path`
>in my shell profile for this very reason.
>
>Chris
>
>> On 20 Mar 2021, at 2:59 pm, petr.2...@centrum.cz wrote:
>> 
>> Thank you Marius,
>> 
>> it did not help. I also reboot the machine.
>> Now I am getting:
>> 
>> ld: library not found for -lm
>> collect2: error: ld returned 1 exit status
>> 
>> I am not sure whether the message from collect2 was there before running 
>> sudo port select gcc mp-gcc-devel.
>> 
>> I am using bash, but in default zsh it behaves the same.
>> 
>> pmm:work pet$ env
>> SHELL=/bin/zsh
>> XPC_FLAGS=0x0
>> TERM_PROGRAM_VERSION=440
>> __CFBundleIdentifier=com.apple.Terminal
>> SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SMYfudJeEJ/Listeners
>> TERM_SESSION_ID=1AAB1E17-A7F0-4363-9F82-6F387012CAC1
>> PWD=/Users/pet/work
>> LOGNAME=pet
>> HOME=/Users/pet
>> TMPDIR=/var/folders/tk/dp822xl925n937bzfkc1t6v0gn/T/
>> TERM=xterm-256color
>> USER=pet
>> DISPLAY=/private/tmp/com.apple.launchd.EJPRpCSOgP/org.macports:0
>> SHLVL=1
>> XPC_SERVICE_NAME=0
>> LC_CTYPE=UTF-8
>> LC_COLLATE=C
>> PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
>> OLDPWD=/Users/pet
>> TERM_PROGRAM=Apple_Terminal
>> _=/usr/bin/env
>> 
>> Petr
>> 
>> 
>> __
>>> Od: "Marius Schamschula" 
>>> Komu: "Gerben Wierda via macports-users" 
>>> Datum: 20.03.2021 15:24
>>> Předmět: Re: gfortran for M1?
>>> 
>>> Petr,
>>> 
>>> sudo port select gcc mp-gcc-devel
>>> 
>>> will add links so that the binaries, includes and libraries can be found.
>>> 
 On Mar 20, 2021, at 8:59 AM,   
 wrote:
 
 Thank you Chris,
 
 I found gfortran-mp-devel in /opt/local/bin.
 
 However trying to compile my source a got linker error:
 ld: library not found for -lm
 
 And I am lost again. I did not specified any linker options,
 just compiler options:
 -g -fbounds-check -ffpe-trap=invalid,zero,overflow 
 -ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
 -Wuninitialized
 
 (Sorry for beginner question. Google did not help.)
 
 Petr
 
 __
> Od: "Chris Jones" 
> Komu: petr.2...@centrum.cz
> Datum: 20.03.2021 14:04
> Předmět: Re: gfortran for M1?
> 
> CC: 
> Hi,
> 
> Gcc-devel provides gfortran for M1 machines by default.
> 
> Chris
> 
>> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
>> 
>> Is it already possible to install gfortran on M1?
>> It seems that gcc-devel does not have +gfortran variant and and other 
>> gcc versions are not compatible. 
>> Thank you, 
>> Petr
> 
> 
> 
>>> 
>>> Marius
>>> --
>>> Marius Schamschula
>>> 
>>> 
>>> 
>
>
>


Re: gfortran for M1?

2021-03-20 Thread Christopher Jones
sorry… auto text correction turned ‘xcrun’ into ’scrub’….

> On 20 Mar 2021, at 3:50 pm, Christopher Jones  
> wrote:
> 
> Hi,
> 
> You probably need to specify the SDK location. There are a number ways you 
> can do this, gcc now supports the same mechanisms as clang. i.e. using scrub 
> or setting SDKROOT .
> I personally have
> 
> export SDKROOT=`xcrun --show-sdk-path`
> in my shell profile for this very reason.
> 
> Chris
> 
>> On 20 Mar 2021, at 2:59 pm, petr.2...@centrum.cz wrote:
>> 
>> Thank you Marius,
>> 
>> it did not help. I also reboot the machine.
>> Now I am getting:
>> 
>> ld: library not found for -lm
>> collect2: error: ld returned 1 exit status
>> 
>> I am not sure whether the message from collect2 was there before running 
>> sudo port select gcc mp-gcc-devel.
>> 
>> I am using bash, but in default zsh it behaves the same.
>> 
>> pmm:work pet$ env
>> SHELL=/bin/zsh
>> XPC_FLAGS=0x0
>> TERM_PROGRAM_VERSION=440
>> __CFBundleIdentifier=com.apple.Terminal
>> SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SMYfudJeEJ/Listeners
>> TERM_SESSION_ID=1AAB1E17-A7F0-4363-9F82-6F387012CAC1
>> PWD=/Users/pet/work
>> LOGNAME=pet
>> HOME=/Users/pet
>> TMPDIR=/var/folders/tk/dp822xl925n937bzfkc1t6v0gn/T/
>> TERM=xterm-256color
>> USER=pet
>> DISPLAY=/private/tmp/com.apple.launchd.EJPRpCSOgP/org.macports:0
>> SHLVL=1
>> XPC_SERVICE_NAME=0
>> LC_CTYPE=UTF-8
>> LC_COLLATE=C
>> PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
>> OLDPWD=/Users/pet
>> TERM_PROGRAM=Apple_Terminal
>> _=/usr/bin/env
>> 
>> Petr
>> 
>> 
>> __
>>> Od: "Marius Schamschula" 
>>> Komu: "Gerben Wierda via macports-users" 
>>> Datum: 20.03.2021 15:24
>>> Předmět: Re: gfortran for M1?
>>> 
>>> Petr,
>>> 
>>> sudo port select gcc mp-gcc-devel
>>> 
>>> will add links so that the binaries, includes and libraries can be found.
>>> 
 On Mar 20, 2021, at 8:59 AM,   
 wrote:
 
 Thank you Chris,
 
 I found gfortran-mp-devel in /opt/local/bin.
 
 However trying to compile my source a got linker error:
 ld: library not found for -lm
 
 And I am lost again. I did not specified any linker options,
 just compiler options:
 -g -fbounds-check -ffpe-trap=invalid,zero,overflow 
 -ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
 -Wuninitialized
 
 (Sorry for beginner question. Google did not help.)
 
 Petr
 
 __
> Od: "Chris Jones" 
> Komu: petr.2...@centrum.cz
> Datum: 20.03.2021 14:04
> Předmět: Re: gfortran for M1?
> 
> CC: 
> Hi,
> 
> Gcc-devel provides gfortran for M1 machines by default.
> 
> Chris
> 
>> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
>> 
>> Is it already possible to install gfortran on M1?
>> It seems that gcc-devel does not have +gfortran variant and and other 
>> gcc versions are not compatible. 
>> Thank you, 
>> Petr
> 
> 
> 
>>> 
>>> Marius
>>> --
>>> Marius Schamschula
>>> 
>>> 
>>> 
> 



smime.p7s
Description: S/MIME cryptographic signature


Re: gfortran for M1?

2021-03-20 Thread Christopher Jones
Hi,

You probably need to specify the SDK location. There are a number ways you can 
do this, gcc now supports the same mechanisms as clang. i.e. using scrub or 
setting SDKROOT .
I personally have

export SDKROOT=`xcrun --show-sdk-path`
in my shell profile for this very reason.

Chris

> On 20 Mar 2021, at 2:59 pm, petr.2...@centrum.cz wrote:
> 
> Thank you Marius,
> 
> it did not help. I also reboot the machine.
> Now I am getting:
> 
> ld: library not found for -lm
> collect2: error: ld returned 1 exit status
> 
> I am not sure whether the message from collect2 was there before running 
> sudo port select gcc mp-gcc-devel.
> 
> I am using bash, but in default zsh it behaves the same.
> 
> pmm:work pet$ env
> SHELL=/bin/zsh
> XPC_FLAGS=0x0
> TERM_PROGRAM_VERSION=440
> __CFBundleIdentifier=com.apple.Terminal
> SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SMYfudJeEJ/Listeners
> TERM_SESSION_ID=1AAB1E17-A7F0-4363-9F82-6F387012CAC1
> PWD=/Users/pet/work
> LOGNAME=pet
> HOME=/Users/pet
> TMPDIR=/var/folders/tk/dp822xl925n937bzfkc1t6v0gn/T/
> TERM=xterm-256color
> USER=pet
> DISPLAY=/private/tmp/com.apple.launchd.EJPRpCSOgP/org.macports:0
> SHLVL=1
> XPC_SERVICE_NAME=0
> LC_CTYPE=UTF-8
> LC_COLLATE=C
> PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
> OLDPWD=/Users/pet
> TERM_PROGRAM=Apple_Terminal
> _=/usr/bin/env
> 
> Petr
> 
> 
> __
>> Od: "Marius Schamschula" 
>> Komu: "Gerben Wierda via macports-users" 
>> Datum: 20.03.2021 15:24
>> Předmět: Re: gfortran for M1?
>> 
>> Petr,
>> 
>> sudo port select gcc mp-gcc-devel
>> 
>> will add links so that the binaries, includes and libraries can be found.
>> 
>>> On Mar 20, 2021, at 8:59 AM,   
>>> wrote:
>>> 
>>> Thank you Chris,
>>> 
>>> I found gfortran-mp-devel in /opt/local/bin.
>>> 
>>> However trying to compile my source a got linker error:
>>> ld: library not found for -lm
>>> 
>>> And I am lost again. I did not specified any linker options,
>>> just compiler options:
>>> -g -fbounds-check -ffpe-trap=invalid,zero,overflow 
>>> -ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
>>> -Wuninitialized
>>> 
>>> (Sorry for beginner question. Google did not help.)
>>> 
>>> Petr
>>> 
>>> __
 Od: "Chris Jones" 
 Komu: petr.2...@centrum.cz
 Datum: 20.03.2021 14:04
 Předmět: Re: gfortran for M1?
 
 CC: 
 Hi,
 
 Gcc-devel provides gfortran for M1 machines by default.
 
 Chris
 
> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
> 
> Is it already possible to install gfortran on M1?
> It seems that gcc-devel does not have +gfortran variant and and other gcc 
> versions are not compatible. 
> Thank you, 
> Petr
 
 
 
>> 
>> Marius
>> --
>> Marius Schamschula
>> 
>> 
>> 



smime.p7s
Description: S/MIME cryptographic signature


Re: gfortran for M1?

2021-03-20 Thread petr.2006
Thank you Marius,

it did not help. I also reboot the machine.
Now I am getting:

ld: library not found for -lm
collect2: error: ld returned 1 exit status

I am not sure whether the message from collect2 was there before running 
sudo port select gcc mp-gcc-devel.

I am using bash, but in default zsh it behaves the same.

pmm:work pet$ env
SHELL=/bin/zsh
XPC_FLAGS=0x0
TERM_PROGRAM_VERSION=440
__CFBundleIdentifier=com.apple.Terminal
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.SMYfudJeEJ/Listeners
TERM_SESSION_ID=1AAB1E17-A7F0-4363-9F82-6F387012CAC1
PWD=/Users/pet/work
LOGNAME=pet
HOME=/Users/pet
TMPDIR=/var/folders/tk/dp822xl925n937bzfkc1t6v0gn/T/
TERM=xterm-256color
USER=pet
DISPLAY=/private/tmp/com.apple.launchd.EJPRpCSOgP/org.macports:0
SHLVL=1
XPC_SERVICE_NAME=0
LC_CTYPE=UTF-8
LC_COLLATE=C
PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
OLDPWD=/Users/pet
TERM_PROGRAM=Apple_Terminal
_=/usr/bin/env

Petr


__
> Od: "Marius Schamschula" 
> Komu: "Gerben Wierda via macports-users" 
> Datum: 20.03.2021 15:24
> Předmět: Re: gfortran for M1?
>
>Petr,
>
>sudo port select gcc mp-gcc-devel
>
>will add links so that the binaries, includes and libraries can be found.
>
>> On Mar 20, 2021, at 8:59 AM,   
>> wrote:
>> 
>> Thank you Chris,
>> 
>> I found gfortran-mp-devel in /opt/local/bin.
>> 
>> However trying to compile my source a got linker error:
>> ld: library not found for -lm
>> 
>> And I am lost again. I did not specified any linker options,
>> just compiler options:
>> -g -fbounds-check -ffpe-trap=invalid,zero,overflow 
>> -ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
>> -Wuninitialized
>> 
>> (Sorry for beginner question. Google did not help.)
>> 
>> Petr
>> 
>> __
>>> Od: "Chris Jones" 
>>> Komu: petr.2...@centrum.cz
>>> Datum: 20.03.2021 14:04
>>> Předmět: Re: gfortran for M1?
>>> 
>>> CC: 
>>> Hi,
>>> 
>>> Gcc-devel provides gfortran for M1 machines by default.
>>> 
>>> Chris
>>> 
 On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
 
 Is it already possible to install gfortran on M1?
 It seems that gcc-devel does not have +gfortran variant and and other gcc 
 versions are not compatible. 
 Thank you, 
 Petr
>>> 
>>> 
>>> 
>
>Marius
>--
>Marius Schamschula
>
>
>


Re: gfortran for M1?

2021-03-20 Thread Marius Schamschula
Petr,

sudo port select gcc mp-gcc-devel

will add links so that the binaries, includes and libraries can be found.

> On Mar 20, 2021, at 8:59 AM,   
> wrote:
> 
> Thank you Chris,
> 
> I found gfortran-mp-devel in /opt/local/bin.
> 
> However trying to compile my source a got linker error:
> ld: library not found for -lm
> 
> And I am lost again. I did not specified any linker options,
> just compiler options:
> -g -fbounds-check -ffpe-trap=invalid,zero,overflow 
> -ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
> -Wuninitialized
> 
> (Sorry for beginner question. Google did not help.)
> 
> Petr
> 
> __
>> Od: "Chris Jones" 
>> Komu: petr.2...@centrum.cz
>> Datum: 20.03.2021 14:04
>> Předmět: Re: gfortran for M1?
>> 
>> CC: 
>> Hi,
>> 
>> Gcc-devel provides gfortran for M1 machines by default.
>> 
>> Chris
>> 
>>> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
>>> 
>>> Is it already possible to install gfortran on M1?
>>> It seems that gcc-devel does not have +gfortran variant and and other gcc 
>>> versions are not compatible. 
>>> Thank you, 
>>> Petr
>> 
>> 
>> 

Marius
--
Marius Schamschula



Re: gfortran for M1?

2021-03-20 Thread petr.2006
Thank you Chris,

I found gfortran-mp-devel in /opt/local/bin.

However trying to compile my source a got linker error:
ld: library not found for -lm

And I am lost again. I did not specified any linker options,
just compiler options:
-g -fbounds-check -ffpe-trap=invalid,zero,overflow 
-ffpe-summary=invalid,zero,overflow -fno-sign-zero -fno-automatic 
-Wuninitialized

(Sorry for beginner question. Google did not help.)

Petr

__
> Od: "Chris Jones" 
> Komu: petr.2...@centrum.cz
> Datum: 20.03.2021 14:04
> Předmět: Re: gfortran for M1?
>
> CC: 
>Hi,
>
>Gcc-devel provides gfortran for M1 machines by default.
>
>Chris
>
>> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
>> 
>> Is it already possible to install gfortran on M1?
>> It seems that gcc-devel does not have +gfortran variant and and other gcc 
>> versions are not compatible. 
>> Thank you, 
>> Petr
>
>
>


Re: gfortran for M1?

2021-03-20 Thread Chris Jones
Hi,

Gcc-devel provides gfortran for M1 machines by default.

Chris

> On 20 Mar 2021, at 1:01 pm, petr.2...@centrum.cz wrote:
> 
> Is it already possible to install gfortran on M1?
> It seems that gcc-devel does not have +gfortran variant and and other gcc 
> versions are not compatible. 
> Thank you, 
> Petr



gfortran for M1?

2021-03-20 Thread petr.2006
Is it already possible to install gfortran on M1?
It seems that gcc-devel does not have +gfortran variant and and other gcc 
versions are not compatible. 
Thank you, 
Petr