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

Fix oboe driver build issue in latest glib #1063

Closed
wants to merge 1 commit into from
Closed

Fix oboe driver build issue in latest glib #1063

wants to merge 1 commit into from

Conversation

devingryu
Copy link
Contributor

@devingryu devingryu commented Mar 5, 2022

I recently managed to build latest glib(2.71.2) on Android with meson, and found that oboe driver is not building well on it.

It is because glib is included (indirectly in fluidsynth_priv.h) in the scope of extern "C". In glib header glib-2.0/glib/glib-typeof.h, <cstddef> is included, which has cpp template code. So it generates following error:

error: templates must have C++ linkage
template <class _Tp> struct __libcpp_is_integral { enum { value = 0 }; };

I think this error is not generated in usual since oboe driver is not used in desktop environments, and it is the only driver that is written in cpp. But to consider updating glib in Android, I think the code should be changed to prevent further issues.

I hope this change does not make a big issue to other platform builds...

Thanks in advance.

@sonarcloud
Copy link

sonarcloud bot commented Mar 5, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@derselbst derselbst left a comment

Choose a reason for hiding this comment

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

LGTM, thanks. I'll cherry-pick it to the 2.2.x branch later on.

Pls. note that we do have an Android CI pipeline, which also compiles and links Oboe. But it uses glib 2.58.3, the last version which uses autotools, because I failed to get it working with meson. So if you did manage to get it built, I'd welcome a PR on that as well.

@devingryu
Copy link
Contributor Author

devingryu commented Mar 5, 2022

Pls. note that we do have an Android CI pipeline, which also compiles and links Oboe. But it uses glib 2.58.3, the last version which uses autotools, because I failed to get it working with meson. So if you did manage to get it built, I'd welcome a PR on that as well.

Of course I'll make PR if you want, but that meson cross-file is just made with my immature googling and brute-force testing. So please make sure to test if it doesn't make any problems before accepting. Also, it needs extra libpcre build process. (Building goes well anyway, since it has fallback subproject feature).

Thanks for accepting!

@derselbst
Copy link
Member

Cherry-picked and merged back to master. Pls. update your local master.

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.

None yet

2 participants