#75 Build 5.1.4 with GCC on HP-UX, SunOS, Darwin

closed-out-of-date
3
2008-01-28
2008-01-11
KBac
No

Fix gcc.mak on SunOS and Darwin.
Add -D_REENTRANT -D_POSIX_C_SOURCE=199506L on HP-UX.

Discussion

  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-11

    Logged In: YES
    user_id=615813
    Originator: NO

    I need problem demonstration and conformation about fix (i.e. unit tests).

    As about _REENTRANT, etc. defines, the makefile is wrong place for ones. For gcc _REENTRANT should be defined in spec file (because of -pthread/-pthreads option); if it not defined, definition should be in compiler- or platform-specific headers in stlport/stl/config/ catalog.

    If you has access to this platforms, pls check trunk along with 5_1 branch.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-11
    • priority: 5 --> 3
    • assigned_to: nobody --> complement
    • status: open --> open-rejected
     
  • KBac

    KBac - 2008-01-14

    Logged In: YES
    user_id=1862317
    Originator: YES

    On SunOS and Darwin gmake -f gcc.mak stldbg-XXX executed with error.
    File gcc.mak has comments:
    # This is here due to bug in GNU make 3.79.1 from Solaris build:
    stldbg-static : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-shared : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-static-dep : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-shared-dep : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    # This is here due to bug in GNU make 3.79 from MacOS build:
    stldbg-static : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-shared : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-static-dep : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    stldbg-shared-dep : CPPFLAGS = -D_STLP_DEBUG ${CPPFLAGS}
    These OS-specific rules have error.
    File gcc.mak has correct rules for all platform:
    # STLport DEBUG mode specific defines
    stldbg-static : DEFS += -D_STLP_DEBUG
    stldbg-shared : DEFS += -D_STLP_DEBUG
    stldbg-static-dep : DEFS += -D_STLP_DEBUG
    stldbg-shared-dep : DEFS += -D_STLP_DEBUG

    On HP-UX gcc man page recommend to define _REENTRANT and _POSIX_C_SOURCE=199506L with -pthread. For other platform _REENTRANT defines in gcc.mak file!

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-14

    Logged In: YES
    user_id=615813
    Originator: NO

    > For other platform _REENTRANT defines in gcc.mak file!

    This is wrong. But this will not be fixed in 5.1 branch --- this require upgrade makefiles and config files. See trunk instead.

    Again, both _REENTRANT and _POSIX_C_SOURCE=199506L should be in one of following files
    stlport/stl/config/_hpux.h, stlport/stl/config/_gcc.h. Looks like this defines intended
    for selection within system headers, so stlport/stl/config/_hpux.h is a good candidate for such defines.

    As about _POSIX_C_SOURCE=199506L, the decision depends upon:
    functions introduced with this def used only in libstlport internals, or mentioned via STLport's headers? If first, -D_POSIX_C_SOURCE=199506L in makefile ok; if second --- it should be in _hpux.h.

     
  • KBac

    KBac - 2008-01-14

    Build on HPUX

     
    Attachments
  • KBac

    KBac - 2008-01-14

    Logged In: YES
    user_id=1862317
    Originator: YES

    How about patch build_gcc1.patch?
    File Added: build_gcc1.patch

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-14

    Logged In: YES
    user_id=615813
    Originator: NO

    In 5.1 branch and in trunk; pls, check. I waiting report about unit tests for Darwin, Solaris and HP-UX.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-14
    • status: open-rejected --> open-fixed
     
  • Francois Dumont

    Francois Dumont - 2008-01-16

    Logged In: YES
    user_id=1096600
    Originator: NO

    I do not understand why _POSIX_C_SOURCE has been defined in _hpux.h. STLport should always avoid to define platform specific macros, this is user or platform API responsibility. If access to some platform functions depends on this macro then STLport should simply check it and then avoid access.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-16

    Logged In: YES
    user_id=615813
    Originator: NO

    > STLport should always avoid to define platform specific macros, this is
    > user or platform API responsibility. If access to some platform functions
    > depends on this macro then STLport should simply check it and then avoid
    > access.

    Neither understand nor agree. In Solaris, HPUX, *BSD you may see or not see some declaration (function present in system in any case), depends _you_ defines. In many cases it turn on _standard_ behaviour.

     
  • KBac

    KBac - 2008-01-22

    Logged In: YES
    user_id=1862317
    Originator: YES

    I can not build unit tests on HPUX.
    In file included from ../../../stlport/cwctype:28,
    from ../../../test/unit/cwctype_header_test.cpp:8:
    ../../../stlport/stl/_cwctype.h:59: error: `::wctype_t' has not been
    declared
    ../../../stlport/stl/_cwctype.h:60: error: `::wint_t' has not been
    declared
    ../../../stlport/stl/_cwctype.h:63: error: `::wctrans_t' has not been
    declared
    ../../../stlport/stl/_cwctype.h:65: error: `::towctrans' has not been
    declared
    ../../../stlport/stl/_cwctype.h:66: error: `::wctrans' has not been
    declared
    ../../../stlport/stl/_cwctype.h:67: error: `::wctype' has not been
    declared
    ../../../stlport/stl/_cwctype.h:69: error: `::iswctype' has not been
    declared
    ../../../stlport/stl/_cwctype.h:72: error: `::iswalnum' has not been
    declared
    ../../../stlport/stl/_cwctype.h:73: error: `::iswalpha' has not been
    declared
    ../../../stlport/stl/_cwctype.h:74: error: `::iswcntrl' has not been
    declared
    ../../../stlport/stl/_cwctype.h:76: error: `::iswdigit' has not been
    declared
    ../../../stlport/stl/_cwctype.h:77: error: `::iswgraph' has not been
    declared
    ../../../stlport/stl/_cwctype.h:78: error: `::iswlower' has not been
    declared
    ../../../stlport/stl/_cwctype.h:79: error: `::iswprint' has not been
    declared
    ../../../stlport/stl/_cwctype.h:80: error: `::iswpunct' has not been
    declared
    ../../../stlport/stl/_cwctype.h:81: error: `::iswspace' has not been
    declared
    ../../../stlport/stl/_cwctype.h:82: error: `::iswupper' has not been
    declared
    ../../../stlport/stl/_cwctype.h:83: error: `::iswxdigit' has not been
    declared
    ../../../stlport/stl/_cwctype.h:85: error: `::towlower' has not been
    declared
    ../../../stlport/stl/_cwctype.h:86: error: `::towupper' has not been
    declared
    gmake: *** [obj/gcc/so/cwctype_header_test.o] Error 1

     
  • KBac

    KBac - 2008-01-28

    Logged In: YES
    user_id=1862317
    Originator: YES

    I have no access to Darwin.
    Build STLport and unit tests on Solaris - OK. Unit tests result on Solaris - OK.
    For HPUX see request 1881036.
    Build STLport and unit tests on HPUX - OK. Unit tests result on HPUX - OK.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-28

    Logged In: YES
    user_id=615813
    Originator: NO

    Superseded by #1881036.

     
  • Petr Ovtchenkov

    Petr Ovtchenkov - 2008-01-28
    • status: open-fixed --> closed-out-of-date
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks