Problems with SDK 3.14: no gcc available
  • Order of the Butterfly
    Order of the Butterfly
    eliot
    Posts: 491 from 2004/4/15
    Hello,

    after installing the new SDK and rebooting a have no gcc in path.
    I installed the new SDK to Sys:Developement (the default path).
    There enough disk space left on my SFS partition.

    Code:

    System:Development> GCCSelect 7
    Switching default gcc links to the gcc 7 package
    System:Development> gcc --version
    gcc: Unbekannter Befehl
    System:Development> which gcc


    Sys:Prefs/Env-Archive/MorphOSSDK pintes to "SYS:Development/"

    Are any other scripts have influence to the SDK setup?


    [ Edited by eliot 11.10.2019 - 14:04 ]
    regards
    eliot
  • »11.10.19 - 13:47
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 1840 from 2003/3/5
    From: Poland
    Yeah sorry, I should have removed this script long ago. You should set CC to the compiler of your choice.
  • »11.10.19 - 16:05
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    amigadave
    Posts: 2630 from 2006/3/21
    From: Lake Arrowhead...
    Quote:

    jacadcaps wrote:
    Yeah sorry, I should have removed this script long ago. You should set CC to the compiler of your choice.


    So am I right in guessing that noobs like me are going to need some assistance in setting up the new SDK and choosing which GCC compiler version to download, setup, and use, so that I can get back to learning the basics of C/C++ programming on MorphOS? I'll be using Hollywood programming language most of the time, but would like to also get back to slowly learning the basics of C/C++ programming, or at least have it set up on my MorphOS systems, so I can show the SDK and newer GCC compiler versions supported, to other users at the AmiWest Show.

    Edit: I'm assuming that the SDK and the different versions of GCC are downloaded and installed separately. Noobs like me need advice on which version of GCC to install, and why that version should be used. Unless it is unstable, or does not produce code that is best optimized for MorphOS, I would think that the latest version of GCC would probably be the proper one to install, yes?

    [ Edited by amigadave 11.10.2019 - 09:03 ]
    MorphOS - The best Next Gen Amiga choice.
  • »11.10.19 - 16:56
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 1840 from 2003/3/5
    From: Poland
    The SDK contains all the GCC 2,5,7,8 and 9. You should refer to them as ppc-morphos-gcc-X. Alternatively you can make 'gcc' point to one of those with the gccselect script.

    The recommended way to compile projects is to set that up in FlowStudio OR write a makefile, where you should absolutely set CC to ppc-morphos-gcc-X

    [ Edited by jacadcaps 11.10.2019 - 18:33 ]
  • »11.10.19 - 17:31
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    eliot
    Posts: 491 from 2004/4/15
    So,

    so in the end, that's what did and I unerdstand so far:
    1. Removewd SDK from Sys:Development
    2. Removed file MorphOSSDK from Sys:Prefs/Env-Archive
    3. Reboot
    4. Did a clean install of the SDK to Work:Tools/Development
    5. Reboot

    - MorphOSSDK points to correct path
    - PATH says:
    Code:

    Work:Tools/Development> path
    Aktuelles_Verzeichnis
    System:MorphOS/C
    System:C
    System:Utilities
    System:S
    System:MorphOS/S
    C:

    There is no gg:bin, so

    Code:

    Work:Tools/Development> gcc
    gcc: Unbekannter Befehl

    must fail!

    Going to gg:bin
    Code:

    Work:Tools/Development/gg/bin> ppc-morphos-g++ --version
    2.95.3

    so the link points to version 2.95.3 at default


    Code:

    Work:Tools/Development> GCCSelect 5
    Switching default gcc links to the gcc 5 package
    Work:Tools/Development> gg:bin
    Work:Tools/Development/gg/bin> ppc-morphos-g++ --version
    ppc-morphos-g++ (GCC/MorphOS) 5.5.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    GccSelect just sets ppc-morphos-gccc|g++|cpp but NOT gcc or g++

    So I have to create these links on my own.

    Code:

    Ram Disk:> path add gg:bin
    Ram Disk:> path
    Aktuelles_Verzeichnis
    System:MorphOS/C
    System:C
    System:Utilities
    System:S
    System:MorphOS/S
    Work:Tools/Development/gg/bin
    C:
    Ram Disk:> ppc-morphos-g++ --version
    ppc-morphos-g++ (GCC/MorphOS) 5.5.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Ram Disk:>

    After adding gg:bin to path, I have all the sdk tools in path.

    Which is quiet helpful if you want to use other tools like git from the SDK
    Code:

    Ram Disk:> which git
    Work:Tools/Development/gg/bin/git


    BTW the env variables are also wrong:

    Code:

    Ram Disk:> set
    RC 0
    Result2 0
    _mchar &&
    _pchar |


    better:

    Code:

    Work:Tools/Development> set
    CC gcc
    CCC ppc-morphos-gcc
    CFLAGS -ISDL/
    CXX ppc-morphos-g++
    CXXFLAGS -noixemul
    LIBS -lSDL
    RC 0
    Result2 0
    VIMRUNTIME vim:
    _mchar &&
    _pchar |



    So to sum it up:
    1. add gg:bin to your path
    2. create links like gcc, g++, ...
    3. set your env variables on your own

    I don't know if these are only problems on my machine.
    But I really don't know what I am doing wrong at installation?
    If these probleme also exist on all other machines, I think the SDK should be fixed, because
    after installation there should be working env.
    regards
    eliot
  • »11.10.19 - 19:12
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    eliot
    Posts: 491 from 2004/4/15
    Just recognized that the Startup script in SDK: is not executable!
    Is this correct?
    If I look into Mossys:s/startup-sequence I can find the following line:
    Execute >NIL: SDK:Startup
    regards
    eliot
  • »11.10.19 - 19:19
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    eliot
    Posts: 491 from 2004/4/15
    Strange,
    after setting the Startup script executable and one more reboot, everything seems to be fine.
    Now there also the links g++, gcc, ...

    Now I am totally confused ...
    regards
    eliot
  • »11.10.19 - 19:26
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 1840 from 2003/3/5
    From: Poland
    Almost sounds as if you tried to use the SDK without rebooting after installing it. There's a part of the setup that gets ran during first reboot after you've installed the SDK.

    Which file system are you using by the way?

    [ Edited by jacadcaps 11.10.2019 - 21:43 ]
  • »11.10.19 - 20:37
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 1840 from 2003/3/5
    From: Poland
    Quote:

    eliot wrote:
    Just recognized that the Startup script in SDK: is not executable!
    Is this correct?
    If I look into Mossys:s/startup-sequence I can find the following line:
    Execute >NIL: SDK:Startup


    It doesn't have to have the S or E flags if you launch it via Execute.
  • »11.10.19 - 20:42
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    eliot
    Posts: 491 from 2004/4/15
    I rebooted after installation and using I am sfs on the system and work partition.

    [ Edited by eliot 12.10.2019 - 11:54 ]
    regards
    eliot
  • »11.10.19 - 20:55
    Profile