Skip to content

Build failure on 10.4: gthr-default.h:65:31: error: 'PTHREAD_RWLOCK_INITIALIZER' undeclared here (not in a function); did you mean 'PTHREAD_COND_INITIALIZER'? #15

@barracuda156

Description

@barracuda156

It has been reported that gcc 14.2.0 fails to build on Tiger: macports/macports-ports#26655 (comment)

:info:build In file included from /opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/gcc-14.2.0/libgfortran/../libgcc/gthr.h:157,
:info:build                  from /opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/gcc-14.2.0/libgfortran/io/io.h:33,
:info:build                  from /opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/gcc-14.2.0/libgfortran/io/unit.c:26:
:info:build ../libgcc/gthr-default.h:65:31: error: 'PTHREAD_RWLOCK_INITIALIZER' undeclared here (not in a function); did you mean 'PTHREAD_COND_INITIALIZER'?
:info:build    65 | #define __GTHREAD_RWLOCK_INIT PTHREAD_RWLOCK_INITIALIZER
:info:build       |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~
:info:build /opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/gcc-14.2.0/libgfortran/io/unit.c:107:34: note: in expansion of macro '__GTHREAD_RWLOCK_INIT'
:info:build   107 | __gthread_rwlock_t unit_rwlock = __GTHREAD_RWLOCK_INIT;
:info:build       |                                  ^~~~~~~~~~~~~~~~~~~~~
:info:build make[3]: *** [io/unit.lo] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/build/powerpc-apple-darwin8/libgfortran'
:info:build make[2]: *** [all] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/build/powerpc-apple-darwin8/libgfortran'
:info:build make[1]: *** [all-target-libgfortran] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/build'
:info:build make: *** [bootstrap-lean] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_Users_andersjenbo_macports-ports_lang_gcc14/libgcc14/work/build" && /usr/bin/make -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build libgcc14: command execution failed
:debug:build Error code: CHILDSTATUS 23317 2

Since apparently there are still a lot of users favoring 10.4 over 10.5–10.6, is it possible to fix this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions