package/mono: fixing multiple definition of vasprintf
PATCH 1/1 package/mono: fixing multiple definition of vasprintf
This patch fixes the detection of an available vasprintf function, this way the internal vasprintf function is not compiled.
Fixes http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/
http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/
---
This patch was submitted upstream and merged here:
https://github.com/mono/mono/commit/40c171799b671718969ee28a02f92884d7fd181e
I submitted here to fix the bug till a new version will be released.
...4-fixing-initialization-of-have-vasprintf.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 package/mono/0004-fixing-initialization-of-have-vasprintf.patch
package/mono/0004-fixing-initialization-of-have-vasprintf.patch new file +23 -0
@@ -0,0 +1,23 @@ +From 1c3d615d93b20d10c2729478d5104977dd9af23f Mon Sep 17 00:00:00 2001 +From: Angelo Compagnucci <[email protected]> +Date: Wed, 5 Aug 2015 12:59:45 +0200 +Subject: [PATCH] Fixing initialization of have_vasprintf + +This patch initialize properly have_vasprintf in case vasprint function is found. +Solves multiple definition of `vasprintf' error in case vasprint is not properly detected. +--- + eglib/configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/eglib/configure.ac b/eglib/configure.ac +index 5281419..4bf91e5 100644 +--- a/eglib/configure.ac ++++ b/eglib/configure.ac +@@ -135,6 +135,7 @@ AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) ++AC_CHECK_FUNC(vasprintf, have_vasprintf=yes) + AC_CHECK_FUNCS(getrlimit) + + #
Signature · 1 line
1.9.1
PATCH 1/1 package/mono: fixing multiple definition of vasprintf
Dear Angelo Compagnucci,
Quoted 8 lines · Angelo Compagnucci
This patch fixes the detection of an available vasprintf function, this way the internal vasprintf function is not compiled.
Fixes http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/
http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/Signed-off-by Angelo Compagnucci <[email protected]>
I've applied, but...
Quoted 4 lines
---
This patch was submitted upstream and merged here:
https://github.com/mono/mono/commit/40c171799b671718969ee28a02f92884d7fd181e
... this should have been mentioned in the patch itself.
And your SoB was missing in the patch itself.
package/mono/0004-fixing-initialization-of-have-vasprintf.patch line 20
Quoted 9 lines
package/mono/0004-fixing-initialization-of-have-vasprintf.patch new file +9
-0+diff --git a/eglib/configure.ac b/eglib/configure.ac +index 5281419..4bf91e5 100644 +--- a/eglib/configure.ac ++++ b/eglib/configure.ac +@@ -135,6 +135,7 @@ AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) ++AC_CHECK_FUNC(vasprintf, have_vasprintf=yes)
And this is clearly not a very clean solution. The AC_CHECK_FUNCS() macro already checks for vasprintf availability, so with this new line, you're checking two times for the same function.
And AC_CHECK_FUNCS already defines ac_cv_func_<function>=yes when the function is available. So a better change would be to rely on ac_cv_func_vasprintf=yes rather than defining this additional have_vasprintf=yes variable.
That being said, since the patch has been accepted upstream, I've applied.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/mono: fixing multiple definition of vasprintf
Dear Thomas Petazzoni,
2015-08-06 8:34 GMT+02:00 Thomas Petazzoni
<[email protected]>:
Quoted 12 lines
Dear Angelo Compagnucci,
Quoted 8 lines · Angelo Compagnucci
This patch fixes the detection of an available vasprintf function, this way the internal vasprintf function is not compiled.
Fixes http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/
http://autobuild.buildroot.net/results/3ab2b8667e5657bf07f55dd04dd857167ab4c62a/Signed-off-by Angelo Compagnucci <[email protected]>
Quoted 8 lines
I've applied, but...
Quoted 4 lines
---
This patch was submitted upstream and merged here:
https://github.com/mono/mono/commit/40c171799b671718969ee28a02f92884d7fd181e... this should have been mentioned in the patch itself.
I will keep in mind for the next time.
Quoted 1 line
And your SoB was missing in the patch itself.
Ops, sorry!
Quoted 14 lines
package/mono/0004-fixing-initialization-of-have-vasprintf.patch line 20
Quoted 9 lines
package/mono/0004-fixing-initialization-of-have-vasprintf.patch new file +9
-0+diff --git a/eglib/configure.ac b/eglib/configure.ac +index 5281419..4bf91e5 100644 +--- a/eglib/configure.ac ++++ b/eglib/configure.ac +@@ -135,6 +135,7 @@ AC_CHECK_SIZEOF(void *) + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(long long) + AC_CHECK_FUNCS(strlcpy stpcpy strtok_r rewinddir vasprintf) ++AC_CHECK_FUNC(vasprintf, have_vasprintf=yes)And this is clearly not a very clean solution. The
AC_CHECK_FUNCS()macro already checks for vasprintf availability, so with this new line, you're checking two times for the same function.
Quoted 4 lines
And
AC_CHECK_FUNCSalready defines ac_cv_func_<function>=yes when the function is available. So a better change would be to rely on ac_cv_func_vasprintf=yes rather than defining this additional have_vasprintf=yes variable.
Yes, I know, but the configure was using that variable and thought that creating that variable was better than chenging the variable name. I will propose a better patch upstream!
Quoted 10 lines
That being said, since the patch has been accepted upstream, I've applied.
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo