Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  gcc-8 vs wchar.h

    Posted Tue June 09, 2020 12:29 AM
    Hi,

    I'm having trouble building gettext with gcc8.3.0 (from the toolbox) on AIX 7.1. Here's the error...

    checking whether putc_unlocked is declared... yes
    checking whether putchar_unlocked is declared... yes
    checking whether <wchar.h> uses 'inline' correctly... no
    configure: error: <wchar.h> cannot be used with this compiler (cc -I/usr/include -I/usr/include -D_THREAD_SAFE).
    This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
    C99 mode. You have four options:
    - Add the flag -fgnu89-inline to CC and reconfigure, or
    - Fix your include files, using parts of
    https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621, or
    - Use a gcc version older than 4.3, or
    - Don't use the flags -std=c99 or -std=gnu99.
    Configuration aborted.
    configure: error: ./configure failed for gettext-runtime
    *** Error code 1

    Stop.


    The message doesn't seem right, but I'm wondering if anyone's seen this and has a workaround...

    Full disclosure - I'm using the "pkgsrc" framework from NetBSD to do the compiling. However this does not seem to be related to the "pkgsrc" environment or options.

    Any help would be appreciated. Thanks!

    Louis Guillaume


    ------------------------------
    Louis Guillaume
    ------------------------------

    #AIXOpenSource


  • 2.  RE: gcc-8 vs wchar.h

    Posted Tue June 09, 2020 03:07 AM
    " checking whether <wchar.h> uses 'inline' correctly... no"
    You need to look into the config.log file and see why the above one is failing.

    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: gcc-8 vs wchar.h

    Posted Tue August 04, 2020 01:50 PM
    On 6/9/20 3:06 AM, Ayappan P via IBM Community wrote:
    > " checking whether <wchar.h> uses 'inline' correctly... no"
    > You need to look into the config.log file and see why the above one is failing.
    >
    > ------------------------------
    > Ayappan P
    > ------------------------------


    Wow - can't believe it's been 2 months since I could get back to this!

    Anyway - here's what I have found in config.log. This time actually it's
    occurring while building "gzip".

    ld: 0711-317 ERROR: Undefined symbol: .renamed_wcstod

    wchar.h has "wcstod" function prototypes...

    # grep wcstod /usr/include/wchar.h
    extern double wcstod();
    extern double wcstod(const wchar_t * __restrict__, wchar_t ** __restrict__);
    return ((long double)wcstod (__a, __b));
    extern _Decimal32 wcstod32();
    extern _Decimal64 wcstod64();
    extern _Decimal128 wcstod128();
    extern _Decimal32 wcstod32(const wchar_t *, wchar_t **);
    extern _Decimal64 wcstod64(const wchar_t *, wchar_t **);
    extern _Decimal128 wcstod128(const wchar_t *, wchar_t **);



    ... but I'm not sure what library would provide a ".renamed_wcstod"
    symbol in AIX.

    Any help would be great. Thanks!

    --
    Louis






    > -------------------------------------------
    > Original Message:
    > Sent: Mon June 08, 2020 05:17 PM
    > From: Louis Guillaume
    > Subject: gcc-8 vs wchar.h
    >
    > Hi,
    >
    > I'm having trouble building gettext with gcc8.3.0 (from the toolbox) on AIX 7.1. Here's the error...
    >
    > checking whether putc_unlocked is declared... yes
    > checking whether putchar_unlocked is declared... yes
    > checking whether <wchar.h> uses 'inline' correctly... no
    > configure: error: <wchar.h> cannot be used with this compiler (cc -I/usr/include -I/usr/include -D_THREAD_SAFE).
    > This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
    > C99 mode. You have four options:
    > - Add the flag -fgnu89-inline to CC and reconfigure, or
    > - Fix your include files, using parts of
    > https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621, <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621,> or
    > - Use a gcc version older than 4.3, or
    > - Don't use the flags -std=c99 or -std=gnu99.
    > Configuration aborted.
    > configure: error: ./configure failed for gettext-runtime
    > *** Error code 1
    >
    > Stop.
    >
    >
    > The message doesn't seem right, but I'm wondering if anyone's seen this and has a workaround...
    >
    > Full disclosure - I'm using the "pkgsrc" framework from NetBSD to do the compiling. However this does not seem to be related to the "pkgsrc" environment or options.
    >
    > Any help would be appreciated. Thanks!
    >
    > Louis Guillaume
    >
    > ------------------------------
    > Louis Guillaume
    > ------------------------------
    >
    >
    > Reply to Sender : https://community.ibm.com/eGroups/PostReply/?GroupId=6211&SenderKey=6e8b80bf-0c16-4fde-8bc3-bf7d7d549680&MID=169356&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved
    >
    > Reply to Discussion : https://community.ibm.com/eGroups/PostReply/?GroupId=6211&MID=169356&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved
    >
    >
    >
    > You are subscribed to "AIX Open Source" as lguillaume@berklee.edu. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved&GroupKey=af5415f8-d8d8-4ac4-b3cb-08a8da184054.
    >




  • 4.  RE: gcc-8 vs wchar.h

    Posted Tue August 04, 2020 02:14 PM
    (take 2 on this message. Last attempt was garbled. Trying with "top-post")

    Wow - can't believe it's been 2 months since I could get back to this!

    Anyway - here's what I have found in config.log. This time actually it's
    occurring while building "gzip".

    ld: 0711-317 ERROR: Undefined symbol: .renamed_wcstod

    wchar.h has "wcstod" function prototypes...

    # grep wcstod /usr/include/wchar.h
    extern double wcstod();
    extern double wcstod(const wchar_t * __restrict__, wchar_t ** __restrict__);
    return ((long double)wcstod (__a, __b));
    extern _Decimal32 wcstod32();
    extern _Decimal64 wcstod64();
    extern _Decimal128 wcstod128();
    extern _Decimal32 wcstod32(const wchar_t *, wchar_t **);
    extern _Decimal64 wcstod64(const wchar_t *, wchar_t **);
    extern _Decimal128 wcstod128(const wchar_t *, wchar_t **);



    ... but I'm not sure what library would provide a ".renamed_wcstod"
    symbol in AIX.

    Any help would be great. Thanks!

    --
    Louis

    On 6/9/20 3:06 AM, Ayappan P via IBM Community wrote:
    > " checking whether <wchar.h> uses 'inline' correctly... no"
    > You need to look into the config.log file and see why the above one is failing.
    >
    > ------------------------------
    > Ayappan P
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Mon June 08, 2020 05:17 PM
    > From: Louis Guillaume
    > Subject: gcc-8 vs wchar.h
    >
    > Hi,
    >
    > I'm having trouble building gettext with gcc8.3.0 (from the toolbox) on AIX 7.1. Here's the error...
    >
    > checking whether putc_unlocked is declared... yes
    > checking whether putchar_unlocked is declared... yes
    > checking whether <wchar.h> uses 'inline' correctly... no
    > configure: error: <wchar.h> cannot be used with this compiler (cc -I/usr/include -I/usr/include -D_THREAD_SAFE).
    > This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
    > C99 mode. You have four options:
    > - Add the flag -fgnu89-inline to CC and reconfigure, or
    > - Fix your include files, using parts of
    > https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621, <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621,> or
    > - Use a gcc version older than 4.3, or
    > - Don't use the flags -std=c99 or -std=gnu99.
    > Configuration aborted.
    > configure: error: ./configure failed for gettext-runtime
    > *** Error code 1
    >
    > Stop.
    >
    >
    > The message doesn't seem right, but I'm wondering if anyone's seen this and has a workaround...
    >
    > Full disclosure - I'm using the "pkgsrc" framework from NetBSD to do the compiling. However this does not seem to be related to the "pkgsrc" environment or options.
    >
    > Any help would be appreciated. Thanks!
    >
    > Louis Guillaume
    >
    > ------------------------------
    > Louis Guillaume
    > ------------------------------
    >
    >
    > Reply to Sender : https://community.ibm.com/eGroups/PostReply/?GroupId=6211&SenderKey=6e8b80bf-0c16-4fde-8bc3-bf7d7d549680&MID=169356&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved
    >
    > Reply to Discussion : https://community.ibm.com/eGroups/PostReply/?GroupId=6211&MID=169356&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved
    >
    >
    >
    > You are subscribed to "AIX Open Source" as lguillaume@berklee.edu. To change your subscriptions, go to http://community.ibm.com/community/user/preferences?section=Subscriptions&MDATE=757545%253b45%253e&UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved. To unsubscribe from this community discussion, go to http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=cdf23e8a-66aa-4fd0-82eb-bf4d6fd25076&sKey=KeyRemoved&GroupKey=af5415f8-d8d8-4ac4-b3cb-08a8da184054.
    >




  • 5.  RE: gcc-8 vs wchar.h

    Posted Wed August 05, 2020 10:44 AM
    This is somehow seems to be related to optimization flag.
    Can you try adding -O2 flag and see if it works.
    We need to check conftest.c program being generated and compare it's behavior with optimization and without optimization.

    ------------------------------
    SANGAMESH
    ------------------------------



  • 6.  RE: gcc-8 vs wchar.h

    Posted Thu August 06, 2020 01:03 AM
    Thank You Sangamesh - adding `-O2' to CFLAGS did the trick.

    --
    Louis

    On 8/5/20 10:44 AM, SANGAMESH MALLAYYA via IBM Community wrote:
    > This is somehow seems to be related to optimization flag.
    > Can you try adding -O2 flag and see if it works.
    > We need to check conftest.c program being generated and compare it's behavior with optimization and without optimization.
    >
    > ------------------------------
    > SANGAMESH
    > ------------------------------
    > -------------------------------------------
    > Original Message:
    > Sent: Tue August 04, 2020 02:13 PM
    > From: Louis Guillaume
    > Subject: gcc-8 vs wchar.h
    >
    > (take 2 on this message. Last attempt was garbled. Trying with "top-post")
    >
    > Wow - can't believe it's been 2 months since I could get back to this!
    >
    > Anyway - here's what I have found in config.log. This time actually it's
    > occurring while building "gzip".
    >
    > ld: 0711-317 ERROR: Undefined symbol: .renamed_wcstod
    >
    > wchar.h has "wcstod" function prototypes...
    >
    > # grep wcstod /usr/include/wchar.h
    > extern double wcstod();
    > extern double wcstod(const wchar_t * __restrict__, wchar_t ** __restrict__);
    > return ((long double)wcstod (__a, __b));
    > extern _Decimal32 wcstod32();
    > extern _Decimal64 wcstod64();
    > extern _Decimal128 wcstod128();
    > extern _Decimal32 wcstod32(const wchar_t *, wchar_t **);
    > extern _Decimal64 wcstod64(const wchar_t *, wchar_t **);
    > extern _Decimal128 wcstod128(const wchar_t *, wchar_t **);
    >
    >
    >
    > ... but I'm not sure what library would provide a ".renamed_wcstod"
    > symbol in AIX.
    >
    > Any help would be great. Thanks!
    >
    > --
    > Louis
    >
    > On 6/9/20 3:06 AM, Ayappan P via IBM Community wrote:
    >> " checking whether
    >
    > Reply to Sender : https://us-west-2.protection.sophos.com?d=ibm.com&u=aHR0cHM6Ly9jb21tdW5pdHkuaWJtLmNvbS9lR3JvdXBzL1Bvc3RSZXBseS8_R3JvdXBJZD02MjExJk1JRD0xOTIwNDAmU2VuZGVyS2V5PWJiYmM1YjhlLThhMWItNDg4Zi1iYWIxLTg4ZTZlN2FkYjNhNiZNREFURT03NTc1NDUlMjUzZDQ1JTI1M2EmVXNlcktleT1jZGYyM2U4YS02NmFhLTRmZDAtODJlYi1iZjRkNmZkMjUwNzYmc0tleT00M2ViMDBlZDE5YjY0ZmVlOTFmNw==&e=bGd1aWxsYXVtZUBiZXJrbGVlLmVkdQ==&t=bnZOcmx2OU5JQzc0bXhPOHJHMitlREM5RVJZOGNDYkUvNFArMFI0NWJlZz0=&h=c33c6055e60b431c83e709ffef3c0bdc
    >
    > Reply to Discussion : https://us-west-2.protection.sophos.com?d=ibm.com&u=aHR0cHM6Ly9jb21tdW5pdHkuaWJtLmNvbS9lR3JvdXBzL1Bvc3RSZXBseS8_R3JvdXBJZD02MjExJk1JRD0xOTIwNDAmTURBVEU9NzU3NTQ1JTI1M2Q0NSUyNTNhJlVzZXJLZXk9Y2RmMjNlOGEtNjZhYS00ZmQwLTgyZWItYmY0ZDZmZDI1MDc2JnNLZXk9NDNlYjAwZWQxOWI2NGZlZTkxZjc=&e=bGd1aWxsYXVtZUBiZXJrbGVlLmVkdQ==&t=V0tkMGpKK082N3dGWkNkS1FIUFNxNHdJSW5PTXA2emd4VDZSblp3TnhGTT0=&h=c33c6055e60b431c83e709ffef3c0bdc
    >
    >
    >
    > You are subscribed to "AIX Open Source" as lguillaume@berklee.edu. To change your subscriptions, go to https://us-west-2.protection.sophos.com?d=ibm.com&u=aHR0cDovL2NvbW11bml0eS5pYm0uY29tL2NvbW11bml0eS91c2VyL3ByZWZlcmVuY2VzP3NlY3Rpb249U3Vic2NyaXB0aW9ucyZNREFURT03NTc1NDUlMjUzZDQ1JTI1M2EmVXNlcktleT1jZGYyM2U4YS02NmFhLTRmZDAtODJlYi1iZjRkNmZkMjUwNzYmc0tleT00M2ViMDBlZDE5YjY0ZmVlOTFmNw==&e=bGd1aWxsYXVtZUBiZXJrbGVlLmVkdQ==&t=MHBqZ3RKK2t2akErWGhwNHNUdWRlcnFreHRDYzlIcmN0b28wS2d5REl6cz0=&h=c33c6055e60b431c83e709ffef3c0bdc. To unsubscribe from this community discussion, go to https://us-west-2.protection.sophos.com?d=ibm.com&u=aHR0cDovL2NvbW11bml0eS5pYm0uY29tL0hpZ2hlckxvZ2ljL2VHcm91cHMvVW5zdWJzY3JpYmUuYXNweD9Vc2VyS2V5PWNkZjIzZThhLTY2YWEtNGZkMC04MmViLWJmNGQ2ZmQyNTA3NiZzS2V5PTQzZWIwMGVkMTliNjRmZWU5MWY3Jkdyb3VwS2V5PWFmNTQxNWY4LWQ4ZDgtNGFjNC1iM2NiLTA4YThkYTE4NDA1NA==&e=bGd1aWxsYXVtZUBiZXJrbGVlLmVkdQ==&t=bjZ3dkVwLzc2b05BWHBubWN2T1BmUVAzRURsQlRWM2l5RXFSZkYwSVk5ND0=&h=c33c6055e60b431c83e709ffef3c0bdc.
    >