Changes between Initial Version and Version 1 of Ticket #62912


Ignore:
Timestamp:
May 17, 2021, 8:57:30 PM (3 years ago)
Author:
ryandesign (Ryan Carsten Schmidt)
Comment:

You didn't attach the main.log, but the portion of it that you copied into the ticket description is enough to figure out that this is the familiar problem where you are using a C++20-capable compiler on a case-insensitive filesystem and the project you are trying to compile includes a VERSION file and it adds a -I flag pointing to the directory containing the VERSION file which then conflicts with the C++20 "version" header. See https://bugs.llvm.org/show_bug.cgi?id=42540

It's an upstream issue that should be reported to and fixed by the developers of netcdf-cxx.

The best solution is for the project to change its build system so that a -I flag for the directory containing the VERSION file is not added. Usually the VERSION file is in the top level directory and usually source files are in a subdirectory like "src" so adding an include path for the root directory isn't necessary. Often though projects by default write something like a config.h to the root directory, which causes the problem. If this is what's going on here, then the project can avoid the problem by writing config.h to a different directory.

An alternative is to move or rename the VERSION file, for example to VERSION.txt. If the VERSION file is referenced by other files, those references need to be updated.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62912

    • Property Status changed from new to assigned
    • Property Summary changed from Failed to build netcdf-cxx@4.2 under Big Sur 11.3.1 to netcdf-cxx @4.2: ../version:1:1: error: expected external declaration
    • Property Owner set to tenomoto
    • Property Keywords netcdf removed
    • Property Port netcdf-cxx added; bash removed
  • Ticket #62912 – Description

    initial v1  
    11Attached is the error log
     2{{{
    23:info:build ../version:1:1: error: expected external declaration
    34:info:build ../version:1:2: error: unknown type name 'n'
     
    4950:debug:build Error code: CHILDSTATUS 3868 2
    5051:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_netcdf-cxx/netcdf-cxx/main.log for details.
     52}}}