diff mbox

[2/2] package/parted: fix static link

Message ID 4431396aaa3e810c5ef599e341858e8849d530e1.1417276704.git.yann.morin.1998@free.fr
State Changes Requested
Headers show

Commit Message

Yann E. MORIN Nov. 29, 2014, 3:59 p.m. UTC
libuuid needs to be linked with -lintl when gettext is needed (with
locales).

For a static build, this is solved with the DT_NEEDED ELF tags, but for
a static link, it is not pulled in automatically.

Use pkg-config to find libuuid, instead of AC_CHECK_LIB().

Second part at fixing:
    http://autobuild.buildroot.net/results/c46/c467aeec258909bb82eda77123803944f97d8df8/

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 .../parted/parted-003-fix-static-link-uuid.patch    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 package/parted/parted-003-fix-static-link-uuid.patch

Comments

Peter Korsgaard Nov. 29, 2014, 4:56 p.m. UTC | #1
>>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:

 > libuuid needs to be linked with -lintl when gettext is needed (with
 > locales).

 > For a static build, this is solved with the DT_NEEDED ELF tags, but for

s/static/shared/

> a static link, it is not pulled in automatically.

 > Use pkg-config to find libuuid, instead of AC_CHECK_LIB().

 > Second part at fixing:
 >     http://autobuild.buildroot.net/results/c46/c467aeec258909bb82eda77123803944f97d8df8/

 > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
 > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 > ---
 >  .../parted/parted-003-fix-static-link-uuid.patch    | 21 +++++++++++++++++++++
 >  1 file changed, 21 insertions(+)
 >  create mode 100644 package/parted/parted-003-fix-static-link-uuid.patch

 > diff --git a/package/parted/parted-003-fix-static-link-uuid.patch b/package/parted/parted-003-fix-static-link-uuid.patch
 > new file mode 100644
 > index 0000000..e281b6f
 > --- /dev/null
 > +++ b/package/parted/parted-003-fix-static-link-uuid.patch
 > @@ -0,0 +1,21 @@

You forgot the patch description + signed-off-by.

Otherwise it looks good. Please don't forget to send it upstream.
Yann E. MORIN Nov. 29, 2014, 6:14 p.m. UTC | #2
Peter, All,

On 2014-11-29 17:56 +0100, Peter Korsgaard spake thusly:
> >>>>> "Yann" == Yann E MORIN <yann.morin.1998@free.fr> writes:
> 
>  > libuuid needs to be linked with -lintl when gettext is needed (with
>  > locales).
> 
>  > For a static build, this is solved with the DT_NEEDED ELF tags, but for
> 
> s/static/shared/

Yup, onviously. Fixed, thanks.

> > a static link, it is not pulled in automatically.
> 
>  > Use pkg-config to find libuuid, instead of AC_CHECK_LIB().
> 
>  > Second part at fixing:
>  >     http://autobuild.buildroot.net/results/c46/c467aeec258909bb82eda77123803944f97d8df8/
> 
>  > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
>  > Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  > ---
>  >  .../parted/parted-003-fix-static-link-uuid.patch    | 21 +++++++++++++++++++++
>  >  1 file changed, 21 insertions(+)
>  >  create mode 100644 package/parted/parted-003-fix-static-link-uuid.patch
> 
>  > diff --git a/package/parted/parted-003-fix-static-link-uuid.patch b/package/parted/parted-003-fix-static-link-uuid.patch
>  > new file mode 100644
>  > index 0000000..e281b6f
>  > --- /dev/null
>  > +++ b/package/parted/parted-003-fix-static-link-uuid.patch
>  > @@ -0,0 +1,21 @@
> 
> You forgot the patch description + signed-off-by.

Damn, I knew something was amiss in that submission.

If all that is incorrect is the patch description and a missing SoB,
then that's cool. I was expecting that series to be more controversial.

I'll respin those two a bit later. Thanks! :-)

> Otherwise it looks good. Please don't forget to send it upstream.

Yep, I'm actively pushing things upstream when it makes sense. ;-)

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/package/parted/parted-003-fix-static-link-uuid.patch b/package/parted/parted-003-fix-static-link-uuid.patch
new file mode 100644
index 0000000..e281b6f
--- /dev/null
+++ b/package/parted/parted-003-fix-static-link-uuid.patch
@@ -0,0 +1,21 @@ 
+diff -durN parted-3.1.orig/configure.ac parted-3.1/configure.ac
+--- parted-3.1.orig/configure.ac	2014-11-29 16:27:49.520560137 +0100
++++ parted-3.1/configure.ac	2014-11-29 16:32:50.799702049 +0100
+@@ -313,16 +313,7 @@
+ AC_SUBST([DL_LIBS])
+ 
+ dnl Check for libuuid
+-UUID_LIBS=""
+-AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
+-	[AC_MSG_ERROR(dnl
+-[GNU Parted requires libuuid - a part of the util-linux-ng package (but
+-usually distributed separately in libuuid-devel, uuid-dev or similar)
+-This can probably be found on your distribution's CD or FTP site or at:
+-    http://userweb.kernel.org/~kzak/util-linux-ng/
+-Note: originally, libuuid was part of the e2fsprogs package.  Later, it
+-moved to util-linux-ng-2.16, and that package is now the preferred source.])])
+-AC_SUBST([UUID_LIBS])
++PKG_CHECK_MODULES([UUID],[uuid])
+ 
+ dnl Check for libdevmapper
+ DM_LIBS=