All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [meta-oe][PATCH] libutempter: Fix compile error on arm
Date: Thu, 8 Jan 2015 12:17:35 +0100	[thread overview]
Message-ID: <20150108111735.GD3972@jama> (raw)
In-Reply-To: <1420709147-9784-1-git-send-email-qianl.fnst@cn.fujitsu.com>

[-- Attachment #1: Type: text/plain, Size: 5563 bytes --]

On Thu, Jan 08, 2015 at 05:25:47PM +0800, Qian Lei wrote:
> | iface.c: In function 'utempter_add_record':
> | <command-line>:0:12: error: expected expression before '/' token
> | iface.c:46:35: note: in expansion of macro 'LIBEXECDIR'
> |  #define UTEMPTER_DEFAULT_PATHNAME LIBEXECDIR "/utempter/utempter"

The issue exists on all architectures so drop "on arm"

> Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
> ---
>  .../libutempter/0001-Modify-macro.patch            | 28 ++++++++++++++++++++++
>  .../libutempter/libutempter-pierelro.patch         | 23 ++++++++++++++++++
>  .../libutempter/libutempter_1.1.6.bb               | 11 ++++-----
>  3 files changed, 56 insertions(+), 6 deletions(-)
>  create mode 100644 meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
>  create mode 100644 meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
> 
> diff --git a/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch b/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
> new file mode 100644
> index 0000000..b5c518f
> --- /dev/null
> +++ b/meta-oe/recipes-support/libutempter/libutempter/0001-Modify-macro.patch
> @@ -0,0 +1,28 @@
> +From fe0721e3f533b54ed2f916365c0458aa2069c924 Mon Sep 17 00:00:00 2001
> +From: Qian Lei <qianl.fnst@cn.fujitsu.com>
> +Date: Thu, 8 Jan 2015 16:34:09 +0900
> +Subject: [PATCH] Remove macro and use hardcode.
> +
> +Upstream-Status: Pending
> +Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
> +
> +---
> + iface.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/iface.c b/iface.c
> +index 5951d81..928ebfd 100644
> +--- a/iface.c
> ++++ b/iface.c
> +@@ -43,7 +43,7 @@
> +        __result; }))
> + #endif
> + 
> +-#define	UTEMPTER_DEFAULT_PATHNAME	LIBEXECDIR "/utempter/utempter"
> ++#define	UTEMPTER_DEFAULT_PATHNAME	"/usr/lib/libutempter/utempter/utempter"

This hardcodes /usr/lib which won't work for people with different
layout.

> + static const char *utempter_pathname;
> + static int saved_fd = -1;
> +-- 
> +1.8.4.2
> +
> diff --git a/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch b/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
> new file mode 100644
> index 0000000..c30a92d
> --- /dev/null
> +++ b/meta-oe/recipes-support/libutempter/libutempter/libutempter-pierelro.patch
> @@ -0,0 +1,23 @@
> +Port from fedora20
> +
> +Upstream-Status: Pending
> +Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
> +
> +diff -up libutempter-1.1.6/Makefile.pierelro libutempter-1.1.6/Makefile
> +--- libutempter-1.1.6/Makefile.pierelro	2010-11-04 18:14:53.000000000 +0100
> ++++ libutempter-1.1.6/Makefile	2013-01-24 15:58:06.241865564 +0100
> +@@ -52,11 +52,12 @@ all: $(TARGETS)
> + 	$(COMPILE.c) -fPIC $< $(OUTPUT_OPTION)
> + 
> + $(PROJECT): utempter.c
> +-	$(LINK.c) -Wl,-z,now,-stats $(LDLIBS) $< $(OUTPUT_OPTION)
> ++	$(LINK.c) -pie -fPIE -Wl,-z,relro,-z,now,-stats $(LDLIBS) \
> ++		$< $(OUTPUT_OPTION)
> + 
> + $(SHAREDLIB): iface.os $(MAP)
> + 	$(LINK.o) -shared \
> +-		-Wl,-soname,$(SONAME),--version-script=$(MAP),-z,defs,-stats \
> ++		-Wl,-soname,$(SONAME),--version-script=$(MAP),-z,relro,-z,defs,-stats \
> + 		-lc $< $(OUTPUT_OPTION)
> + 
> + $(STATICLIB): iface.o
> diff --git a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> index e1dccd6..6df0f19 100644
> --- a/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> +++ b/meta-oe/recipes-support/libutempter/libutempter_1.1.6.bb
> @@ -4,15 +4,15 @@ This library provides interface for terminal emulators such as \
>  screen and xterm to record user sessions to utmp and wtmp files."
>  HOMEPAGE = "ftp://ftp.altlinux.org/pub/people/ldv/utempter"
>  SECTION = "System Environment/Libraries"
> -LICENSE = "GPLv2 GPLv2+ LGPLv2 MIT"
> +LICENSE = "GPLv2 & GPLv2+ & LGPLv2 & MIT"

This was already applied in master a while ago with:

commit ba3105e6055cce009e6f54c01885768ef72d81c5
Author: Otavio Salvador <otavio@ossystems.com.br>
Date:   Fri Dec 26 17:21:34 2014 -0200

    libutempter: Fix license format QA error


>  LIC_FILES_CHKSUM = "file://COPYING;md5=2d5025d4aa3495befef8f17206a5b0a1"
>  
> -SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2"
> +SRC_URI = "ftp://ftp.altlinux.org/pub/people/ldv/utempter/${BP}.tar.bz2 \
> +           file://0001-Modify-macro.patch \
> +           file://libutempter-pierelro.patch"
>  SRC_URI[md5sum] = "b43827806923903aba2bc7cd3a2d45b7"
>  SRC_URI[sha256sum] = "b898565f31ced7e5c1fa0a2eaa0f6ff0ed862b5fe375d26375b64bfbdfeac397"
>  
> -CFLAGS += "-DLIBEXECDIR=$(libexecdir)"
> -
>  do_compile() {
>      oe_runmake                      \
>          libdir=${libdir}            \
> @@ -27,10 +27,9 @@ do_install() {
>          includedir=${includedir}    \
>          mandir=${mandir}
>  
> -        rm -f ${D}${libdir}/*.a
> +    rm -f ${D}${libdir}/*.a
>  }
>  
>  FILES_${PN} = "${libdir}/*.so.*"
>  FILES_${PN} += "${libexecdir}/utempter/utempter"
> -
>  FILES_${PN}-dbg += "${libexecdir}/utempter/.debug/utempter"
> -- 
> 1.8.3.1
> 
> -- 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

  reply	other threads:[~2015-01-08 11:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04  2:13 [meta-oe][PATCH] libutempter: Add new recipe Qian Lei
2015-01-07 11:53 ` Martin Jansa
2015-01-08  9:25   ` [meta-oe][PATCH] libutempter: Fix compile error on arm Qian Lei
2015-01-08 11:17     ` Martin Jansa [this message]
2015-01-09  3:01       ` [meta-oe][PATCH v2] libutempter: Fix compile error Qian Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150108111735.GD3972@jama \
    --to=martin.jansa@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.