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
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Component Version:  * simulavr
* Mandatory Fields

Add a New Comment Rich Markup
   

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.org/show_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>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.15-26b0.
    Corresponding source code