Cross compiling for MorphOS apps
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 564 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: 508 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: 508 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: 564 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: 508 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: 564 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: 508 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: 564 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: 564 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: 17 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: 4977 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
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    I tried to build the GCC9 cross compiler with the current April 2020 SDK and 1.9 setup-cross-sdk.sh script under Cygwin. The November 2019 SDK builds fine with the script, but the current one doesn't. I get this error in setup-cross-sdk.log:
    Quote:

    make: *** No rule to make target 'gcc-9.2.0.tar.xz', needed by 'gcc-9.2.0/.morphos-sources-stamp'. Stop.

    While building I looked into the temp directory, and I found gcc-9.3.0.tar.xz there, but apparently most of the patches and the Makefile is for GCC 9.2.0. Has anyone managed to build a GCC9 cross-compiler with the latest SDK? I remember the last SDK required some patches too in the setup-cross-sdk.sh script. Please advise.
    This is just like television, only you can see much further.
  • »09.09.20 - 17:08
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 2971 from 2003/3/5
    From: Canada
    9.2.0 patches should just apply to 9.3.0... That said I have absolutely no time to look into updating the SDK. Will not happen before 3.14 is out for sure.
  • »09.09.20 - 18:27
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    BSzili
    Posts: 559 from 2012/6/8
    From: Hungary
    Unfortunately the Makefile has some issue, because it downloads gcc-9.3.0.tar.xz, but it's looking for gcc-9.2.0.tar.xz to build. Thanks for the response, I'll stay with the November 2019 SDK until then.
    This is just like television, only you can see much further.
  • »10.09.20 - 10:34
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    amigadave
    Posts: 2794 from 2006/3/21
    From: Northern Calif...
    Quote:

    Jim wrote:
    That's a big jump, Hollywood to C/C++. C requires pretty extensive knowledge of the environment you're operating in.


    I've done some reading of several Amiga C/C++ books, and had started writing a couple first experiments (like Hello World stuff) with C in the past, and it seems to make the most sense to go back to learning C/C++ after I get a good grasp of using Hollywood, if my purpose remains just wanting to create programs that run on MorphOS/AmigaOS3 + 4/ and maybe AROS. Learning how to code in 68k Assembler I would consider to be a "big jump" from Hollywood.
    MorphOS - The best Next Gen Amiga choice.
  • »10.09.20 - 17:33
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 564 from 2004/4/15
    Are there any updates?
    regards
    eliot
  • »12.12.20 - 08:24
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 2971 from 2003/3/5
    From: Canada
    A new SDK is in the works... no ETA yet though.
  • »18.12.20 - 15:13
    Profile Visit Website
  • IKE
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    IKE
    Posts: 146 from 2009/11/7
    From: Southern CA
    That's great news!
    IKE

    MacMini G4 1.5Ghz/PowerBook G4 1.67Ghz/PowerMac G5 2.0Ghz DP 7,2 Radeon 9650/256MB

    Join the conversation @ r/morphos
  • »19.12.20 - 18:51
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 590 from 2010/2/10
    From: FRANCE
    @jacadcaps it's possible to update libpng on next SDK ? thks
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »26.12.20 - 17:06
    Profile Visit Website
  • MorphOS Developer
    Piru
    Posts: 576 from 2003/2/24
    From: finland, the l...
    Quote:

    beworld wrote:
    it's possible to update libpng on next SDK ? thks

    libpng will be the latest 1.2 version (1.2.59). Note that different libpng versions are not API/ABI compatiple, and we happen to rely on 1.2.

    However, if you need a specific version it is not hard to build it yourself. Typically you can then add -I to pull correct includes and -L to pull the correct link library when linking.
  • »27.12.20 - 02:12
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 590 from 2010/2/10
    From: FRANCE
    @piru i talk about version 1.6.37,
    but if this last version is not compatible with that of the SDK, it does not matter, I have my own version, it was just to optimize my executable.
    Thanks for your answer, I now know why it's version 1.2 on the SDK now.
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »27.12.20 - 07:32
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    beworld
    Posts: 590 from 2010/2/10
    From: FRANCE
    hi all,
    Any update for Cross-compiling with last SDK (gcc 10) ?
    Thanks
    IMac G5 2.1,PowerBook G4 1.5,MacMini 1.5, PowerMac G5 2.7 died !!!
    My MOS ports
  • »20.03.21 - 12:04
    Profile Visit Website