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

In included file: too few arguments provided to function-like macro invocation #1

Closed
Season0518 opened this issue May 9, 2024 · 7 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@Season0518
Copy link

image

After I configured gcc-13 and conan according to Configure option 2: invoice conan, then cmake, it prompted "In included file: too few arguments provided to function like macro invoice". Why is this?

OS: macOS 14.4.1 23E224 arm64

SDK:
xcode-select: version 2406
gcc: gcc-13 (Homebrew GCC 13.2.0) 13.2.0
clangd: Homebrew clangd version 18.1.5
XCode: 15.3 (SDKVersion 14.4)

@FeignClaims
Copy link
Owner

FeignClaims commented May 9, 2024

I'm also using macos and encountered this problem before. This actually is something about your clangd extension configuraiton or your gcc installation.

The possible solution is:

  • Configure your vscode clangd extension, add --query-driver=path_pattern_1,...,path_pattern_n option to specify the compiler path.
  • Since gcc has released 14 today (or yesterday maybe?), it's a fairly good time to run brew upgrade --greedy to upgrade gcc.
image

Also, there's a link issue in homebrew llvm that might be related to this problem.

What's more, could you show me your conan gcc profile by cat $(conan profile path <profile_name>)? Here my profile by the way:

_common
[conf]
tools.build:cflags=['-L/opt/homebrew/opt/llvm/lib/c++', '-Wno-unused-command-line-argument']
tools.build:cxxflags=['-L/opt/homebrew/opt/llvm/lib/c++', '-Wno-unused-command-line-argument']
&:tools.cmake.cmake_layout:build_folder_vars=['settings.compiler']
&:tools.cmake.cmaketoolchain:generator=Ninja Multi-Config
gcc
include(_common)

[settings]
arch=armv8
build_type=Release
compiler=gcc
compiler.cppstd=23
compiler.libcxx=libstdc++11
compiler.version=14
os=Macos

[conf]
tools.build:compiler_executables = {"c": "/opt/homebrew/bin/gcc-14", "cpp": "/opt/homebrew/bin/g++-14"}

@FeignClaims FeignClaims self-assigned this May 9, 2024
@FeignClaims FeignClaims added the good first issue Good for newcomers label May 9, 2024
@FeignClaims
Copy link
Owner

It seems like you're using my VSCode configuration tutorial? If that's the case, the appendix actually has shown how to set --query-driver=path_pattern_1,...,path_pattern_n here.

@Season0518
Copy link
Author

First of all, thank you for your prompt answer.

I just solved this problem by downgrading the XCode version. I downgraded the XCode version to 15.0 and the problem was solved. In fact, this problem was originally caused by updating XCode.

image

For the solution you mentioned, I will try it in the virtual machine to see if it can be solved

@Season0518
Copy link
Author

It seems like you're using my VSCode configuration tutorial? If that's the case, the appendix actually has shown how to set --query-driver=path_pattern_1,...,path_pattern_n here.

In fact, I wrote my own XMake-based version inspired by your VSCode configuration tutorial.

Because I wanted to get help, I used your configuration to reproduce the entire error when I encountered this error.

@FeignClaims
Copy link
Owner

In fact, I wrote my own XMake-based version inspired by your VSCode configuration tutorial.

Good to know. To give more information on this, I've actually changed the VSCode tutorial significantly on 2024/02/09, and rewritten the template used in that tutorial and this repository yesterday, so maybe it would be good for you to go take a look.

@Season0518
Copy link
Author

Season0518 commented May 10, 2024

Thank you for your solution.

In fact, this problem can be easily solved through brew upgrade gcc --greedy.

I have tested it on different computers (physical and virtual), and in fact, upgrading the gcc version is a simple and effective solution.

Finally, Here is my config: Season0518/MyConfig. Based on XMake, simplified configuration and minimized network connections as much as possible.

@FeignClaims
Copy link
Owner

In fact, this problem can be easily solved through brew upgrade gcc --greedy.

To clarify, the issue might be caused by the update of XCode as you mentioned. Just executing brew reinstall gcc should be enough to solve this problem, as I did before.

I was too lazy to mention this. Sorry for the misleading.

@FeignClaims FeignClaims transferred this issue from another repository May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants