Skip to content

Failure to compile trunk on Solaris10/SPARC using C++ compiler #48915

Closed

Description

@smontanaro
BPO 4665
Nosy @loewis, @smontanaro, @tiran

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2008-12-15.16:27:33.599>
created_at = <Date 2008-12-14.21:16:32.017>
labels = []
title = 'Failure to compile trunk on Solaris10/SPARC using C++ compiler'
updated_at = <Date 2008-12-15.16:27:33.598>
user = 'https://github.com/smontanaro'

bugs.python.org fields:

activity = <Date 2008-12-15.16:27:33.598>
actor = 'loewis'
assignee = 'none'
closed = True
closed_date = <Date 2008-12-15.16:27:33.599>
closer = 'loewis'
components = []
creation = <Date 2008-12-14.21:16:32.017>
creator = 'skip.montanaro'
dependencies = []
files = []
hgrepos = []
issue_num = 4665
keywords = []
message_count = 7.0
messages = ['77828', '77829', '77833', '77835', '77836', '77838', '77874']
nosy_count = 3.0
nosy_names = ['loewis', 'skip.montanaro', 'christian.heimes']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue4665'
versions = []

Activity

  1. smontanaro commented on Dec 14, 2008

    @smontanaro
    ContributorAuthor

    I don't know if the Python source is supposed to be compilable with a C++
    compiler or not, but I'm having trouble finding a C compiler on the
    Solaris10/SPARC machines at work. I decided to give a C++ compiler a whirl:

    /opt/gnu/bin/c++ -c -fno-strict-aliasing -DNDEBUG -g  -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I../Include   -DPy_BUILD_CORE -o [Parser/tokenizer.o](https://github.com/python/cpython/blob/main/Parser/tokenizer.o) ../Parser/tokenizer.c
    ../Parser/tokenizer.c: In function `char * PyTokenizer_RestoreEncoding(tok_state *, int, int *)':
    ../Parser/tokenizer.c:1614: ANSI C++ forbids implicit conversion from `void *' in assignment
    

    Now this turns out to be a very old compiler:

    % /opt/gnu/bin/c++ --version
    2.95.3
    

    Should Python be able to compile with this ancient GNU C++ compiler?

    Thx,

    Skip

  2. tiran commented on Dec 14, 2008

    @tiran
    Member

    Python should be compile-able with a C++ compiler. I'll test it on my
    system in a couple of minutes.

  3. tiran commented on Dec 14, 2008

    @tiran
    Member

    The trunk contains lots of implicit casts from void pointers that make
    the code incompatible with C++.

  4. loewis commented on Dec 14, 2008

    loewismannequin
    Mannequin

    I disagree. It's not a requirement that the Python source code is
    compilable as C++. Only the header files should be thus compilable.

  5. tiran commented on Dec 14, 2008

    @tiran
    Member

    Ah, I was under the impression that Python must be compatible both C++
    and C89 compilers.

    Do we have any means to test the C++ compatibility of the header files?
    Full C++ compatibility is one way to make sure the header files are
    compatible, too. *wink* I don't see harm in sprinkling explicit type
    casts over the C code, too.

  6. loewis commented on Dec 14, 2008

    loewismannequin
    Mannequin

    Do we have any means to test the C++ compatibility of the header files?

    No, we fix it when users report bugs (which typically happens very
    quickly after we made some).

    Full C++ compatibility is one way to make sure the header files are
    compatible, too. *wink* I don't see harm in sprinkling explicit type
    casts over the C code, too.

    That requires discussion, I'm opposed to such a change: it adds
    unnecessary complication. In any case, such discussion would belong
    to python-dev.

  7. loewis commented on Dec 15, 2008

    loewismannequin
    Mannequin

    Closing as "won't fix" for now.

  8. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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