Cross compiling for MorphOS apps
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 511 from 2004/4/15
    Hmm,

    for me bigfoots script does not work on Ubuntu 19.10 for some reasons.
    I have changed some lines, but now compilation of ggc9 fails with really trivial
    error (missing stdio.h).

    What I needed to change in bigfoots script:
    - it checks for an sdk lha archive (don't know if exists anywhere,
    but on morphos site there is only this archive sdk-source-20191006.tar.xz)
    I removed the lha parts because they don't seem to be required
    - make for gcc is called CFLAGS -m32 set. As I remember correctly, a 32 bit
    env is not required anymore, so I also removed this argument

    In the end I get the error above.
    I don't know if the correct script was put to public.

    That's the way I called the script:
    Code:

    ./setup-cross-sdk.sh --gcc9 --force


    My changes: https://exdev.selfhost.eu/mos/setup-cross-sdk.sh
    regards
    eliot
  • »18.10.19 - 20:54
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 326 from 2003/4/11
    Quote:

    Marlon wrote:

    Have you checked out my script?


    No I haven't, sorry.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »19.10.19 - 06:57
    Profile Visit Website
  • MorphOS Developer
    bigfoot
    Posts: 326 from 2003/4/11
    Quote:

    eliot wrote:
    Hmm,

    for me bigfoots script does not work on Ubuntu 19.10 for some reasons.
    I have changed some lines, but now compilation of ggc9 fails with really trivial
    error (missing stdio.h).


    Yes, it fails because of those changes :)

    Quote:

    What I needed to change in bigfoots script:
    - it checks for an sdk lha archive (don't know if exists anywhere,
    but on morphos site there is only this archive sdk-source-20191006.tar.xz)
    I removed the lha parts because they don't seem to be required


    The lha archive is required. It's on the MorphOS website. It's the regular SDK download, and it contains, among other things, stdio.h

    Quote:

    - make for gcc is called CFLAGS -m32 set. As I remember correctly, a 32 bit
    env is not required anymore, so I also removed this argument


    Only if it detects you're building an old SDK with an old version of Binutils that doesn't work when compiled in 64 bit mode, which won't be the case if you're compiling the latest SDK. No need to change that.

    Quote:

    In the end I get the error above.
    I don't know if the correct script was put to public.


    It was. It just requires you to supply it with both files it needs, and to not make modifications to it.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »19.10.19 - 07:00
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 511 from 2004/4/15
    @bigfoot

    Oh man, your are absolutely right.
    It seems that I threw away my brain yesterday evening.
    I am totally sorry, ...
    regards
    eliot
  • »19.10.19 - 16:44
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 326 from 2003/4/11
    Quote:

    eliot wrote:
    @bigfoot

    Oh man, your are absolutely right.
    It seems that I threw away my brain yesterday evening.
    I am totally sorry, ...


    Hey, as long as you got it to work in the end, I'm happy :)
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »21.10.19 - 21:42
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 511 from 2004/4/15
    Hi,

    the setup looks quiet well:
    Code:

    andre@drax:~/tmp/test_mos$ /gg/bin/ppc-morphos-g++ --version
    ppc-morphos-g++ (GCC/MorphOS) 9.2.0
    Copyright (C) 2019 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.

    andre@drax:~/tmp/test_mos$ /gg/bin/ppc-morphos-g++ -v
    Using built-in specs.
    COLLECT_GCC=/gg/bin/ppc-morphos-g++
    COLLECT_LTO_WRAPPER=/gg/lib/gcc-lib/ppc-morphos/9.2.0/lto-wrapper
    Target: ppc-morphos
    Configured with: ../gcc-9.2.0/configure --target=ppc-morphos --with-plugin-ld=no --enable-languages=c,c++,objc,obj-c++ --prefix=/gg --with-sysroot=/gg --libexecdir=/gg/lib --oldincludedir=/gg/include --program-prefix=ppc-morphos- --program-suffix=-9 --enable-threads=posix --disable-bootstrap --with-pkgversion=GCC/MorphOS --with-bugurl=http://www.morphos-team.net/ --enable-version-specific-runtime-libs
    Thread model: posix
    gcc version 9.2.0 (GCC/MorphOS)



    But I cannot compile/link a simple hello world example.
    Calling
    /gg/bin/ppc-morphos-g++ hello.cpp -o hello -noixemul -O3 -std=c++11

    leads to an linker error because it misses pthread_mutex_unlock and other pthread stuff.
    Are any more env variables|parameters to be set?

    EDIT:
    Complete error message:
    Code:

    andre@drax:~/tmp/test_mos$ /gg/bin/ppc-morphos-g++ hello.cpp -o hello -noixemul -O3 -std=c++11
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(locale.o): in function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/src/c++98/../../../../../../gcc-9.2.0/libstdc++-v3/src/c++98/locale.cc:433: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/src/c++98/../../../../../../gcc-9.2.0/libstdc++-v3/src/c++98/locale.cc:433: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(locale.o): in function `std::locale::_Impl::_M_install_cache(std::locale::facet const*, unsigned int)':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(locale_init.o): in function `std::locale::global(std::locale const&)':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/src/c++98/../../../../../../gcc-9.2.0/libstdc++-v3/src/c++98/locale_init.cc:284: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/src/c++98/../../../../../../gcc-9.2.0/libstdc++-v3/src/c++98/locale_init.cc:286: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(locale_init.o): in function `std::locale::global(std::locale const&)':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/bits/basic_string.h:6177: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(locale_init.o): in function `std::locale::global(std::locale const&)':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(eh_alloc.o): in function `_GLOBAL__sub_I__ZN9__gnu_cxx9__freeresEv':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_alloc.cc:338: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_alloc.cc:129: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_alloc.cc:338: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_alloc.cc:129: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(eh_globals.o): in function `_GLOBAL__sub_D___cxa_get_globals_fast':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:145: undefined reference to `pthread_getspecific'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:145: undefined reference to `pthread_getspecific'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:145: undefined reference to `pthread_setspecific'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/eh_globals.cc:145: undefined reference to `pthread_key_create'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(eh_globals.o): in function `_GLOBAL__sub_D___cxa_get_globals_fast':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:714: undefined reference to `pthread_key_delete'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(guard.o): in function `__cxa_guard_release':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/guard.cc:389: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/guard.cc:426: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/libsupc++/../../../../../gcc-9.2.0/libstdc++-v3/libsupc++/guard.cc:426: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(guard.o): in function `__cxa_guard_release':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ext/concurrence.h:103: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ext/concurrence.h:103: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ext/concurrence.h:283: undefined reference to `pthread_cond_wait'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ext/concurrence.h:283: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(guard.o): in function `__cxa_guard_release':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:700: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:700: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:700: undefined reference to `pthread_cond_broadcast'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(guard.o): in function `__cxa_guard_release':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ext/concurrence.h:282: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libstdc++.a(guard.o): in function `__cxa_guard_release':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:700: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:700: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:853: undefined reference to `pthread_cond_broadcast'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libstdc++-v3/include/ppc-morphos/bits/gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2.o): in function `uw_init_context_1':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:700: undefined reference to `pthread_once'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2-fde.o): in function `__register_frame_info.part.0':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2-fde.o): in function `__register_frame_info_bases':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2-fde.o): in function `__register_frame_info_table_bases':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2-fde.o): in function `__deregister_frame_info_bases':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /gg/lib/gcc-lib/ppc-morphos/9.2.0/libnix/libgcc.a(unwind-dw2-fde.o): in function `_Unwind_Find_FDE':
    /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:749: undefined reference to `pthread_mutex_lock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: /tmp/tmp.FhmnUA3YJF/gcc9/build/ppc-morphos/libnix/libgcc/./gthr-default.h:779: undefined reference to `pthread_mutex_unlock'
    collect2: error: ld returned 1 exit status



    EDIT2:
    Linking pthread does not help either:
    Code:

    andre@drax:~/tmp/test_mos$ /gg/bin/ppc-morphos-g++ hello.cpp -O3 -std=c++11 -lpthread
    /gg/lib/gcc-lib/ppc-morphos/9.2.0/../../../../ppc-morphos/bin/ld: cannot find -lpthread
    collect2: error: ld returned 1 exit status



    [ Edited by eliot 26.10.2019 - 10:40 ]
    regards
    eliot
  • »26.10.19 - 10:35
    Profile
  • MorphOS Developer
    bigfoot
    Posts: 326 from 2003/4/11
    Seems like there's another bug in the GCC 9 Makefile in the SDK source code archive that I overlooked. I've updated https://bigfoot.morphos-team.net/files/setup-cross-sdk.sh to patch this bug before building GCC 9 now.
    I rarely log in to MorphZone which means that I often miss private messages sent on here. If you wish to contact me, please email me at [username]@asgaard.morphos-team.net, where [username] is my username here on MorphZone.
  • »26.10.19 - 10:52
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 511 from 2004/4/15
    Thanks bigfoot, now everything is working like it should.
    :)
    regards
    eliot
  • »26.10.19 - 11:50
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 511 from 2004/4/15
    Hmm,

    I just recognized that currently only the gcc 9 is fixed.
    Gcc7 and 8 having the same problem as reported before.

    [ Edited by eliot 31.10.2019 - 17:01 ]
    regards
    eliot
  • »31.10.19 - 18:00
    Profile
  • Just looking around
    jarokuczi
    Posts: 13 from 2016/12/6
    Hello is there any chance to get updated Debian packages with the latest SDK?
  • »17.06.20 - 07:43
    Profile
  • Jim
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Jim
    Posts: 4897 from 2009/1/28
    From: Delaware, USA
    Quote:

    amigadave wrote:
    This should be very useful for programmers who only have room for one system, if they can run MorphOS3.12 (unsupported) on their Quad G5 PowerMac, and then boot into Linux PPC64 to cross compile MorphOS software on the same machine. I'm assuming that the various versions of gcc that are now supported are available for Linux PPC64, so that all 4 cores can be used when cross compiling software for MorphOS3.12.

    If I'm only going to do Hollywood programming as a beginner for a while, will I benefit much by getting a Quad Core PCIe G5 PowerMac and running some version of Linux to program from, instead of just using the MorphOS version of Hollywood, and running it on my existing 2.7GHz G5 PowerMac, running MorphOS3.12? After I become fairly proficient at Hollywood programming, I do plan to go back to learning how to program in C/C++, but it might be many months before I need to do that. Depends on what programming projects I decide to attempt.


    That's a big jump, Hollywood to C/C++. C requires pretty extensive knowledge of the environment you're operating in.
    "Never attribute to malice what can more readily explained by incompetence"
  • »18.06.20 - 17:09
    Profile