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

Compile error with CONFIG+="headless": src/util.cpp: variable ‘QRegularExpression rx1’ has initializer but incomplete type #2272

Closed
hoffie opened this issue Jan 23, 2022 · 1 comment · Fixed by #2273
Assignees
Labels
bug Something isn't working
Milestone

Comments

@hoffie
Copy link
Member

hoffie commented Jan 23, 2022

Describe the bug

Report by @corrados as part of #2267:

Unforunately, the current Jamulus source code does not compile on my Raspberry Pi with the following error message:

To Reproduce

  • distributions/raspijamulus.sh
  • Any current build with CONFIG+="headless"

Expected behavior

Sucessful compile

Screenshots

src/util.cpp: In static member function ‘static bool NetworkUtil::ParseNetworkAddress(QString, CHostAddress&, bool)’:
src/util.cpp:708:28: error: variable ‘QRegularExpression rx1’ has initializer but incomplete type
  708 |     QRegularExpression rx1 ( "^\\[([^]]*)\\](?::(\\d+))?$" ); // [addr4or6] or [addr4or6]:port
      |                            ^
src/util.cpp:709:28: error: variable ‘QRegularExpression rx2’ has initializer but incomplete type
  709 |     QRegularExpression rx2 ( "^([^:]*)(?::(\\d+))?$" );       // addr4 or addr4:port or host or host:port
      |                            ^
src/util.cpp:713:29: error: variable ‘QRegularExpressionMatch rx1match’ has initializer but incomplete type
  713 |     QRegularExpressionMatch rx1match = rx1.match ( strAddress );
      |                             ^~~~~~~~
src/util.cpp:714:29: error: variable ‘QRegularExpressionMatch rx2match’ has initializer but incomplete type
  714 |     QRegularExpressionMatch rx2match = rx2.match ( strAddress );
      |                             ^~~~~~~~
make: *** [Makefile:1762: util.o] Error 1

Operating system

Latest Raspbian (?)

Version of Jamulus

master

Additional context

@hoffie hoffie added the bug Something isn't working label Jan 23, 2022
@hoffie hoffie added this to the Release 3.8.2 milestone Jan 23, 2022
@hoffie hoffie self-assigned this Jan 23, 2022
@hoffie
Copy link
Member Author

hoffie commented Jan 23, 2022

b31e650 updated the regular expression handling for Qt6 compatibility. While the newer class QRegularExpression should be supported in all Qt versions, compile seems to fail here.

The change seems to miss an include. Maybe specific Qt versions have a problem with this, while others (newers?) don't (maybe due to implicit includes). Going to submit a PR in a second.

@hoffie hoffie mentioned this issue Jan 23, 2022
5 tasks
hoffie added a commit to hoffie/jamulus that referenced this issue Jan 23, 2022
b31e650 updated regexps to
QRegularExpression for Qt6 compatibility, but did not include
QRegularExpression.h.

While this has apparently not been a problem on several current Qt
versions, it seems to break in some environments (latest Raspbian?).

This commit adds the include.

Fixes jamulussoftware#2272
@hoffie hoffie changed the title Raspbian compile error: error: variable ‘QRegularExpression rx1’ has initializer but incomplete type Raspbian compile error: src/util.cpp: variable ‘QRegularExpression rx1’ has initializer but incomplete type Jan 23, 2022
hoffie added a commit to hoffie/jamulus that referenced this issue Jan 24, 2022
b31e650 updated regexps to
QRegularExpression for Qt6 compatibility, but did not include
QRegularExpression.h.

While this has apparently not been a problem on several current Qt
versions, it seems to break in some environments (latest Raspbian?).

This commit adds the include.

Fixes jamulussoftware#2272
@hoffie hoffie changed the title Raspbian compile error: src/util.cpp: variable ‘QRegularExpression rx1’ has initializer but incomplete type Compile error with CONFIG+="headless": src/util.cpp: variable ‘QRegularExpression rx1’ has initializer but incomplete type Jan 24, 2022
hoffie added a commit to hoffie/jamulus that referenced this issue Jan 25, 2022
b31e650 updated regexps to
QRegularExpression for Qt6 compatibility, but did not include
QRegularExpression.h.

While this has apparently not been a problem in most environments, it breaks
the build when using `CONFIG+=headless` (`CONFIG+="headless nosound"` is
unaffected).

This commit adds the includes.

Fixes jamulussoftware#2272
hoffie added a commit to hoffie/jamulus that referenced this issue Jan 25, 2022
b31e650 updated regexps to
QRegularExpression for Qt6 compatibility, but did not include
QRegularExpression.h.

While this has apparently not been a problem in most environments, it breaks
the build when using `CONFIG+=headless` (`CONFIG+="headless nosound"` is
unaffected).

This commit adds the includes.

Fixes jamulussoftware#2272
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant