-
Notifications
You must be signed in to change notification settings - Fork 121
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
meson: Fix missing libintl #60
meson: Fix missing libintl #60
Conversation
Hi @madpilot78, thanks for testing our Meson support on FreeBSD and your merge request(s).
|
I'm actually using meson build in the FreeBSD port, since it gives better control of enabled options.
I have not tested the master branch, only the release. I'm building through the FreeBSD ports tree, since I maintain the audacious port there. The only error I got is at build time:
I would need a little more time to test the master branch, but I don't expect any difference.
Yes, the error happened only there, adding the attached fix allowed the software to build. |
Does this patch work for you? diff --git a/meson.build b/meson.build
index 6c0fa7163..b64a2f475 100644
--- a/meson.build
+++ b/meson.build
@@ -55,6 +55,7 @@ endif
have_darwin = host_machine.system() == 'darwin'
+have_freebsd = host_machine.system() == 'freebsd'
have_windows = host_machine.system() == 'windows'
@@ -120,7 +121,7 @@ endif
if (cxx.has_header('libintl.h'))
add_project_arguments('-DHAVE_GETTEXT', language: ['c', 'cpp'])
- if have_darwin or have_windows
+ if have_darwin or have_freebsd or have_windows
add_project_link_arguments('-lintl', language: ['c', 'cpp'])
endif
endif
|
@radioactiveman Unluckily that would not work. It was the first thing I tried, but it fails because libintl resides in /usr/local/lib. It could work with |
libaudcore & libaudgui definitely use gettext as well. What library are they linking to? Are we mixing i18n libraries (e.g. BSD vs. GNU) by linking only libaudqt to libintl? |
@jlindgren90 Looks like the build system is able to figure things out for libaudcore by itself. Most probable cause is that some other library that they are linking to, lists I can investigate this. If this is the case would you rather have the patch extended to explicitly add |
Yes please. |
On it. |
Can you try this approach again, along with setting LIBRARY_PATH? It would be nice to add -lintl in one place rather than three. |
Worth a test, although I'm not very confident it will work, but I could be wrong. I'll report back. |
I was definitely wrong, it works fine, I'll followup later with a streamlined patch. |
Short and sweet. Looks good to me! |
I need to give due credit, this was @radioactiveman suggestion! |
Thanks, please prefix the commit message again with "meson: ". Then it's ready to go. :) |
Thanks @madpilot78 for reporting the issue and your time to fix and test this. |
Eventually, you probably want to update the minimum required version of meson and then use |
@eli-schwartz: Sounds good, thanks for the remark. Requiring 0.59 is too soon though in my opinion. I would like to still support Ubuntu 20.04 which ships Meson 0.53. I may try using a version check. :) |
meson has issues finding libintl in FreeBSD, work around it.
Ref.: mesonbuild/meson#4468
mesonbuild/meson#8875