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

update podspec #3526

Merged
merged 2 commits into from
Oct 5, 2023
Merged

update podspec #3526

merged 2 commits into from
Oct 5, 2023

Conversation

rettinghaus
Copy link
Contributor

I made some updates to the podspec file, but now I'm stuck with this error:

humlib.h:45:10: fatal error: 'algorithm' file not found

@craigsapp
Copy link
Contributor

humlib.h:45:10: fatal error: 'algorithm' file not found

Line 45:

#include <algorithm>

This is a standard C++ header file:

https://cplusplus.com/reference/algorithm

Do you know what compiler/version is being used?

@rettinghaus
Copy link
Contributor Author

LLVM clang version 15.0.0 on macOS 14.

@rettinghaus
Copy link
Contributor Author

It's strange, because we have it also in other headers, but no complaints on them.

@craigsapp
Copy link
Contributor

Yes, that is strange. Perhaps humlib.h is being treated as a C include file somehow?

There are two C header files loaded just before <algorithm>:

#include <stdarg.h>
#include <string.h>

#include <algorithm>
#include <cctype>
#include <chrono>
#include <cmath>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <locale>
#include <map>
#include <regex>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

Perhaps converting

#include <stdarg.h>
#include <string.h>

will fix the problem. Mixing C and C++ header files should not be a problem, but it would be good to try.

In C++, you can include C headers like <stdarg.h> and <string.h> using the #include directive as you've shown. C++ is designed to be compatible with C, so you can use C headers in C++ code without any issues.

Here's how you can include them in C++ code to use only C++ headers:

#include <cstdarg> // for <stdarg.h>
#include <cstring>  // for <string.h>

And see if the problem with #include <algorithm> is then fixed.

@rettinghaus
Copy link
Contributor Author

Funny, because now it's

humlib.h:42:10: fatal error: 'cstdarg' file not found

Verovio.podspec Outdated Show resolved Hide resolved
@lpugin
Copy link
Contributor

lpugin commented Oct 2, 2023

humlib.h:45:10: fatal error: 'algorithm' file not found

When are you having this error? Building what?

@craigsapp
Copy link
Contributor

Funny, because now it's

humlib.h:42:10: fatal error: 'cstdarg' file not found

Funny, but predictable yet still strange: it is complaining about the first C++ header file, but skipped over it when it was formatted as a C header include. So somehow it seems that humlib.h is treated as C source code.

I have clang 14.0.3 on MacOS 13.4.1 (Ventura). Maybe I should risk updating to macOS 14 Sonoma which was released last week (https://en.wikipedia.org/wiki/MacOS_Sonoma).

On Linux, I have clang 16.0.6 (but uses gcc 13.2.1). I am getting only one warning compiling verovio, but it is a new one:

/user/c/craig/git-cloud/verovio/src/iopae.cpp: In member function ‘void vrv::PAEInput::ParseHeader(jsonxx::Object&)’:
/user/c/craig/git-cloud/verovio/src/iopae.cpp:3231:29: warning: loop variable ‘key’ of type ‘const std::string&’ {aka ‘const std::__cxx11::basic_string<char>&’} binds to a temporary constructed from type ‘const char* const’ [-Wrange-loop-construct]
 3231 |     for (const std::string &key : { "scoring", "key_mode", "role", "voice_intrument" }) {
      |                             ^~~
/user/c/craig/git-cloud/verovio/src/iopae.cpp:3231:29: note: use non-reference type ‘const std::string’ {aka ‘const std::__cxx11::basic_string<char>’} to make the copy explicit or ‘const char* const&’ to prevent copying

@rettinghaus
Copy link
Contributor Author

It's not connected to macOS, I hit this particular thing before.

@lpugin
Copy link
Contributor

lpugin commented Oct 3, 2023

It builds without problem and no warning for me with xcode 15.0 on macos 13.5.2

@lpugin
Copy link
Contributor

lpugin commented Oct 3, 2023

@lpugin lpugin marked this pull request as draft October 5, 2023 08:52
Copy link
Contributor

@lpugin lpugin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you change back the version? Then I can merge it and update the pod after the next release.

@lpugin lpugin marked this pull request as ready for review October 5, 2023 12:01
@lpugin lpugin merged commit a5ab4ba into rism-digital:develop Oct 5, 2023
5 checks passed
@rettinghaus rettinghaus deleted the dev/cocoaPods branch October 16, 2023 17:04
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 this pull request may close these issues.

3 participants