Skip to contentSkip to conversation

cryptsetup: Link against -lrt for clock_gettime

PATCH New Vicente Olivert Riera 4 participants 7 messages Jan 7, 2014 – Jan 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

Applying an upstream patch to fix clock_gettime undefined reference errors.

Upstream patch URL:
https://code.google.com/p/cryptsetup/source/detail?r=3ba95a822f70ff1e8141230bc2830ae46346486b

Fixes:
http://autobuild.buildroot.net/results/bed/bed37fac9bc54d3dbe956e4af632a044a5829acd/

---
 .../cryptsetup-0001-clock-gettime-fix.patch        |   23 ++++++++++++++++++++
 package/cryptsetup/cryptsetup.mk                   |    1 +
 2 files changed, 24 insertions(+), 0 deletions(-)
 create mode 100644 package/cryptsetup/cryptsetup-0001-clock-gettime-fix.patch
package/cryptsetup/cryptsetup-0001-clock-gettime-fix.patch new file +23 -0
new file mode 100644
index 0000000..933cbc8
@@ -0,0 +1,23 @@
+Link against -lrt for clock_gettime
+
+Fix undefined reference to `clock_gettime' error.
+This is required since commit f3e398afc549 "Rewrite cipher benchmark loop.".
+
+Below is the build error report:
+http://autobuild.buildroot.net/results/9ca/9cad1cf49ee6b5c58d8260ee33beef2e6c1ad
+a4d/build-end.log
+
+Signed-off-by: Axel Lin <[email protected]>
+Signed-off-by: Vicente Olivert Riera <[email protected]>
+--- cryptsetup-1.6.3/configure.ac.orig	2014-01-07 16:56:18.732323597 +0000
++++ cryptsetup-1.6.3/configure.ac	2014-01-07 16:56:46.314759741 +0000
+@@ -49,7 +49,8 @@ AC_CHECK_LIB(uuid, uuid_clear, ,[AC_MSG_
+ AC_SUBST(UUID_LIBS, $LIBS)
+ LIBS=$saved_LIBS
+ 
+-AC_CHECK_FUNCS([posix_memalign])
++AC_SEARCH_LIBS([clock_gettime],[rt posix4])
++AC_CHECK_FUNCS([posix_memalign clock_gettime])
+ 
+ if test "x$enable_largefile" = "xno" ; then
+   AC_MSG_ERROR([Building with --disable-largefile is not supported, it can cause data corruption.])
package/cryptsetup/cryptsetup.mk +1 -0
index 6ea3aae..6a54527 100644
@@ -12,6 +12,7 @@ CRYPTSETUP_DEPENDENCIES = lvm2 popt e2fsprogs libgcrypt host-pkgconf \
 	$(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
 CRYPTSETUP_LICENSE = GPLv2+ (programs), LGPLv2.1+ (library)
 CRYPTSETUP_LICENSE_FILES = COPYING COPYING.LGPL
+CRYPTSETUP_AUTORECONF = YES
 
 ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
 CRYPTSETUP_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -lintl"
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

Vincent,

buildroot-bounces at busybox.net wrote on 01/07/2014 11:24:11 AM:

Quoted 11 lines

Applying an upstream patch to fix clock_gettime undefined reference errors.

Upstream patch URL:
https://code.google.com/p/cryptsetup/source/detail?
r=3ba95a822f70ff1e8141230bc2830ae46346486b

Fixes:
http://autobuild.buildroot.net/results/bed/
bed37fac9bc54d3dbe956e4af632a044a5829acd/

I tried your patch but the build errored with the following lines.

Making install in po /home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share
make[3]: execvp:
/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share:
Permission denied
make[3]: *** [install-data-yes] Error 127
make[2]: *** [install-recursive] Error 1
make[1]: *** [/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/build/cryptsetup-1.6.3/.stamp_target_installed] Error 2
make: *** [_all] Error 2

This seems to be the same error that Axel Lin reported on 12/19 but I am not sure how to fix it. The issue is related to MKDIR_P not being defined properly (should be defined as "/bin/mkdir -p")when the install step is called for the po folder. The MKDIR_P variable is being found properly accoring to the config.log. I did a little digging but I was unable to find a solution. I am not an autoconf expert by any means but there may be someone else who has seen this issue before.

Thanks,
Clayton

#2 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

Quoted 38 lines · Clayton Shotwell

Vincent,

buildroot-bounces at busybox.net wrote on 01/07/2014 11:24:11 AM:

Quoted 11 lines

Applying an upstream patch to fix clock_gettime undefined reference errors.

Upstream patch URL:
https://code.google.com/p/cryptsetup/source/detail?
r=3ba95a822f70ff1e8141230bc2830ae46346486b

Fixes:
http://autobuild.buildroot.net/results/bed/
bed37fac9bc54d3dbe956e4af632a044a5829acd/

I tried your patch but the build errored with the following lines.

Making install in po /home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share
make[3]: execvp:
/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share:
Permission denied
make[3]: *** [install-data-yes] Error 127
make[2]: *** [install-recursive] Error 1
make[1]: *** [/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/build/cryptsetup-1.6.3/.stamp_target_installed] Error 2
make: *** [_all] Error 2

This seems to be the same error that Axel Lin reported on 12/19 but I am not sure how to fix it. The issue is related to MKDIR_P not being defined properly (should be defined as "/bin/mkdir -p")when the install step is called for the po folder. The MKDIR_P variable is being found properly accoring to the config.log. I did a little digging but I was unable to find a solution. I am not an autoconf expert by any means but there may be someone else who has seen this issue before.

Quoted 3 lines

Thanks,
Clayton

Hello Clayton,

first of all, that patch is not mine, is an upstream patch. I just proposed it for Buildroot.

Second, I think the problem you are having is not related to that patch. The patch only modifies the configure.ac to make sure that -lrt is passed for linking. Your failure is at the install phase, so the autoreconf, configure, compilation and linkage worked correctly.

Signature · 1 line
Vincent
#3 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

In reply to Clayton Shotwell
Quoted 30 lines · Clayton Shotwell

Vincent,

buildroot-bounces at busybox.net wrote on 01/07/2014 11:24:11 AM:

Quoted 11 lines

Applying an upstream patch to fix clock_gettime undefined reference errors.

Upstream patch URL:
https://code.google.com/p/cryptsetup/source/detail?
r=3ba95a822f70ff1e8141230bc2830ae46346486b

Fixes:
http://autobuild.buildroot.net/results/bed/
bed37fac9bc54d3dbe956e4af632a044a5829acd/

I tried your patch but the build errored with the following lines.

Making install in po /home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share
make[3]: execvp:
/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/target/usr/share:
Permission denied
make[3]: *** [install-data-yes] Error 127
make[2]: *** [install-recursive] Error 1
make[1]: *** [/home/test/outputs/b5e/b5ef439aed8bce6c43381daa69bce690131d2934/output/build/cryptsetup-1.6.3/.stamp_target_installed] Error 2
make: *** [_all] Error 2

Quoted 7 lines

This seems to be the same error that Axel Lin reported on 12/19 but I am not sure how to fix it. The issue is related to MKDIR_P not being defined properly (should be defined as "/bin/mkdir -p")when the install step is called for the po folder. The MKDIR_P variable is being found properly accoring to the config.log. I did a little digging but I was unable to find a solution. I am not an autoconf expert by any means but there may be someone else who has seen this issue before.

Hi, take a look at packages/linux-pam/linux-pam-04-mkdir.patch maybe it's the same problem? (very old bundled gettext). Regards.

#4 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

Gustavo,

Gustavo Zacarias <[email protected]> wrote on 01/08/2014 10:22:58 AM:

Quoted 3 lines

Hi, take a look at packages/linux-pam/linux-pam-04-mkdir.patch maybe it's the same problem? (very old bundled gettext). Regards.

That is the same problem exactly. Thanks for pointing that out.

Vicente,

Would you be able to incorporate that patch into your submission for fixing cryptsetup?

Thanks,
Clayton

Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com

#5 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

2014/1/9 Clayton Shotwell <[email protected]>:

Quoted 9 lines

Gustavo,

Gustavo Zacarias <[email protected]> wrote on 01/08/2014 10:22:58 AM:

Quoted 3 lines

Hi, take a look at packages/linux-pam/linux-pam-04-mkdir.patch maybe it's the same problem? (very old bundled gettext). Regards.

Quoted 6 lines

That is the same problem exactly. Thanks for pointing that out.

Vicente,

Would you be able to incorporate that patch into your submission for fixing cryptsetup?

Hi,

I can send a fix for this now.
I tried to fix it a few days ago, but then got interrupted by my real job. Sorry for the delay.
And thanks for providing the fix to address po make error.

Regards,
Axel

#6 lore raw

PATCH 1/1 cryptsetup: Link against -lrt for clock_gettime

In reply to Clayton Shotwell
Quoted 17 lines · Clayton Shotwell

Gustavo,

Gustavo Zacarias <[email protected]> wrote on 01/08/2014 10:22:58 AM:

Quoted 3 lines

Hi, take a look at packages/linux-pam/linux-pam-04-mkdir.patch maybe it's the same problem? (very old bundled gettext). Regards.

That is the same problem exactly. Thanks for pointing that out.

Vicente,

Would you be able to incorporate that patch into your submission for fixing cryptsetup?

Quoted 8 lines

Thanks,
Clayton

Clayton Shotwell
Software Engineer
clshotwe at rockwellcollins.com
www.rockwellcollins.com

I think Axel Lin already did it.

http://patchwork.ozlabs.org/patch/308492/

Signature · 1 line
Vincent