bugSimulavr: an AVR simulator - Bugs: bug #65947, error: unknown type name 'This'

 
 

bug #65947: error: unknown type name 'This'

Submitter:  Ryan Carsten Schmidt <ryandesign>
Submitted:  Wed 03 Jul 2024 09:48:56 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  * simulavr
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Wed 03 Jul 2024 09:48:56 PM UTC, original submission:  

1.1.0 fails to build with C++20-capable versions of clang on case-insensitive filesystems (as are typical on macOS):


In file included from /opt/local/var/macports/build/_Volumes_Shared_macports-ports_emulators_simulavr/simulavr/work/simulavr-release-1.1.0/libsim/atmega128.cpp:26:
In file included from /opt/local/var/macports/build/_Volumes_Shared_macports-ports_emulators_simulavr/simulavr/work/simulavr-release-1.1.0/include/atmega128.h:29:
In file included from /opt/local/var/macports/build/_Volumes_Shared_macports-ports_emulators_simulavr/simulavr/work/simulavr-release-1.1.0/include/avrdevice.h:29:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string:511:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/string_view:179:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/__string:57:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/algorithm:649:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/initializer_list:46:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/c++/v1/cstddef:37:
/opt/local/var/macports/build/_Volumes_Shared_macports-ports_emulators_simulavr/simulavr/work/simulavr-release-1.1.0/include/elfio/version:1:1: error: unknown type name 'This'
This is ElfIO version 2.2, see http://elfio.sourceforge.net/.
^


This happens because C++20 has a <version> header which other system headers include (even when not in C++20 mode), and the directory include/elfio contains a file called VERSION, and that directory is in the include path. For more background see https://bugs.llvm ... _bug.cgi?id=42540

The best solution is not adding that directory to the include path. Another solution is renaming or removing the VERSION file. Sometimes projects need the VERSION file for something, but I did not see any errors after removing the VERSION file and it built successfully.

Ryan Carsten Schmidt <ryandesign>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 16MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by ryandesign (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16.
    Corresponding source code