Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors building 4.3.1 tag on macOS with Clang 12.0.5 #111

Closed
aerorahul opened this issue Jun 3, 2021 · 0 comments · Fixed by #112
Closed

Errors building 4.3.1 tag on macOS with Clang 12.0.5 #111

aerorahul opened this issue Jun 3, 2021 · 0 comments · Fixed by #112

Comments

@aerorahul
Copy link

echo -n AC_PACKAGE_VERSION>VERSION

I recently tried building the CXX4 API on macOS with Clang 12.0.5 and discovered that the above line gives an error such as below:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr
../version:1:1: error: expected external declaration
-n 4.3.1
^
../version:1:2: error: unknown type name 'n'
-n 4.3.1
 ^
../version:1:4: error: expected unqualified-id
-n 4.3.1
   ^

I traced the solution down to replacing the line in configure:

~/s/s/h/p/netcdf-cxx4-4.3.1 ❯❯❯ git diff                                                                tags/v4.3.1^0 ✱
diff --git i/configure w/configure
index cd6cf06..8c8d28e 100755
--- i/configure
+++ w/configure
@@ -2491,7 +2491,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu

 # Create the VERSION file, which contains the package version from
 # AC_INIT.
-echo -n 4.3.1>VERSION
+echo -n 4.3.1>VERSION.txt


 { $as_echo "$as_me:${as_lineno-$LINENO}: netCDF-cxx4 4.3.1" >&5

And from there to configure.ac to the above line.

I am not very familiar with the autotools build system, so I apologize if this is not the correct place for the edit.
I thought documenting a solution in an issue might help some other users facing a similar issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant