All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] makefile: fail to compile if there are more than one exported symbols.
Date: Mon, 15 Jun 2015 11:43:38 +0200	[thread overview]
Message-ID: <557E9E4A.6060001@redhat.com> (raw)
In-Reply-To: <557F0AB3020000E1000109DF@relay2.provo.novell.com>

Dne 15.6.2015 v 11:26 Lidong Zhong napsal(a):
> Hi ,
>
> Without this patch, I would get the following error:
>
> set -e;\
> R=dm_lv_simple_resume dm_lv_simple_suspend dm_replace_mirror_table;\
> test -z "$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $R"; false; } ;\
> (for i in ./.exported_symbols.Base ./.exported_symbols.DM_1_02_97 ; do\
> 	echo "${i##*.} {"; echo "	global:";\
> 	/usr/bin/sed "s/^/		/;s/$/;/" < $i;\
> 	test "$i" = Base && { echo "	local:"; echo "		*;"; };\
> 	echo "};";\
> done ) > .export.sym
> /bin/sh: line 1: dm_lv_simple_suspend: command not found
> ../make.tmpl:508: recipe for target '.export.sym' failed
> make[1]: *** [.export.sym] Error 127
> make[1]: Leaving directory '/home/lwang/LVM2.2.02.120/libdm'
> make.tmpl:323: recipe for target 'libdm.device-mapper' failed
> make: *** [libdm.device-mapper] Error 2

Hmmm interesting - in my case I get:

---
set -e;\
R=$(sort .exported_symbols_generated .exported_symbols.Base 
.exported_symbols.DM_1_02_98 .exported_symbols.DM_1_02_97 | uniq -u);\
test -z "$R" || { echo "Mismatch between symbols in shared library and lists 
in .exported_symbols.* files: $R"; false; } ;\
---

While you get directly assigned result.

So how is possible that in your case you get already 'translated' string,
while in my case I get regular  shell evaluation  R=$(sort....) which should 
not need "".

Are you testing against latest 'git' HEAD ?

Do you this in make.tmpl.in?

.export.sym: .exported_symbols_generated $(EXPORTED_SYMBOLS)
ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
	set -e; (echo "Base {"; echo "	global:";\
		 $(SED) "s/^/		/;s/$$/;/" $<;\
		 echo "	local:"; echo "		*;"; echo "};") > $@
else
	set -e;\
	R=$$(sort $^ | uniq -u);\
	test -z "$$R" || { echo "Mismatch between symbols in shared library and lists 
in .exported_symbols.* files: $$R"; false; } ;\
	for i in $(EXPORTED_SYMBOLS); do\
		echo "$${i##*.} {"; echo "	global:";\
		$(SED) "s/^/		/;s/$$/;/" $$i;\
		test "$$i" = Base && { echo "	local:"; echo "		*;"; };\
		echo "};";\
	done > $@
endif


Zdenek



  reply	other threads:[~2015-06-15  9:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-12  7:33 [PATCH] makefile: fail to compile if there are more than one exported symbols Lidong Zhong
2015-06-12 15:51 ` Zdenek Kabelac
2015-06-15  2:58   ` Lidong Zhong
2015-06-15  9:12     ` Zdenek Kabelac
2015-06-15  9:26       ` Lidong Zhong
2015-06-15  9:43         ` Zdenek Kabelac [this message]
2015-06-16  2:24           ` Lidong Zhong

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=557E9E4A.6060001@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lvm-devel@redhat.com \
    /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.