* [PATCH] makefile: fail to compile if there are more than one exported symbols.
@ 2015-06-12 7:33 Lidong Zhong
2015-06-12 15:51 ` Zdenek Kabelac
0 siblings, 1 reply; 7+ messages in thread
From: Lidong Zhong @ 2015-06-12 7:33 UTC (permalink / raw)
To: lvm-devel
---
make.tmpl.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/make.tmpl.in b/make.tmpl.in
index 731dab7..60ddd01 100644
--- a/make.tmpl.in
+++ b/make.tmpl.in
@@ -499,7 +499,7 @@ ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
echo " local:"; echo " *;"; echo "};") > $@
else
set -e;\
- R=$$(sort $^ | uniq -u);\
+ 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:";\
--
1.8.1.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
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
0 siblings, 1 reply; 7+ messages in thread
From: Zdenek Kabelac @ 2015-06-12 15:51 UTC (permalink / raw)
To: lvm-devel
Dne 12.6.2015 v 09:33 Lidong Zhong napsal(a):
> ---
> make.tmpl.in | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/make.tmpl.in b/make.tmpl.in
> index 731dab7..60ddd01 100644
> --- a/make.tmpl.in
> +++ b/make.tmpl.in
> @@ -499,7 +499,7 @@ ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
> echo " local:"; echo " *;"; echo "};") > $@
> else
> set -e;\
> - R=$$(sort $^ | uniq -u);\
> + 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:";\
Hi
Do you have some example where it fails without "" ?
Bash normally should assign $VARS directly.
Zdenek
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
2015-06-12 15:51 ` Zdenek Kabelac
@ 2015-06-15 2:58 ` Lidong Zhong
2015-06-15 9:12 ` Zdenek Kabelac
0 siblings, 1 reply; 7+ messages in thread
From: Lidong Zhong @ 2015-06-15 2:58 UTC (permalink / raw)
To: lvm-devel
>>> On 6/12/2015 at 11:51 PM, in message <557B001F.30804@redhat.com>, Zdenek
Kabelac <zkabelac@redhat.com> wrote:
> Dne 12.6.2015 v 09:33 Lidong Zhong napsal(a):
> > ---
> > make.tmpl.in | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/make.tmpl.in b/make.tmpl.in
> > index 731dab7..60ddd01 100644
> > --- a/make.tmpl.in
> > +++ b/make.tmpl.in
> > @@ -499,7 +499,7 @@ ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
> > echo " local:"; echo " *;"; echo "};") > $@
> > else
> > set -e;\
> > - R=$$(sort $^ | uniq -u);\
> > + 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:";\
>
> Hi
>
> Do you have some example where it fails without "" ?
> Bash normally should assign $VARS directly.
Hi Zdenek,
As the `echo` outputs, if there are more symbols got from `sort $^ | uniq -u`, there will be
an bash error.
I found this exactly because I forgot to add these symbols to .exported_symbols.* files.
Regards,
Lidong
>
> Zdenek
>
>
>
>
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
2015-06-15 2:58 ` Lidong Zhong
@ 2015-06-15 9:12 ` Zdenek Kabelac
2015-06-15 9:26 ` Lidong Zhong
0 siblings, 1 reply; 7+ messages in thread
From: Zdenek Kabelac @ 2015-06-15 9:12 UTC (permalink / raw)
To: lvm-devel
Dne 15.6.2015 v 04:58 Lidong Zhong napsal(a):
>>>> On 6/12/2015 at 11:51 PM, in message <557B001F.30804@redhat.com>, Zdenek
> Kabelac <zkabelac@redhat.com> wrote:
>> Dne 12.6.2015 v 09:33 Lidong Zhong napsal(a):
>>> ---
>>> make.tmpl.in | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/make.tmpl.in b/make.tmpl.in
>>> index 731dab7..60ddd01 100644
>>> --- a/make.tmpl.in
>>> +++ b/make.tmpl.in
>>> @@ -499,7 +499,7 @@ ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
>>> echo " local:"; echo " *;"; echo "};") > $@
>>> else
>>> set -e;\
>>> - R=$$(sort $^ | uniq -u);\
>>> + 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:";\
>>
>> Hi
>>
>> Do you have some example where it fails without "" ?
>> Bash normally should assign $VARS directly.
> Hi Zdenek,
>
> As the `echo` outputs, if there are more symbols got from `sort $^ | uniq -u`, there will be
> an bash error.
> I found this exactly because I forgot to add these symbols to .exported_symbols.* files.
But the bash error here is wanted when symbols are missing - it's the purpose
to stop compilation. So please specify more closely the example where it fails
because of missing "".
This output is wanted:
Mismatch between symbols in shared library and lists in .exported_symbols.*
files: dm_tree_node_set_XXXX
dm_tree_node_set_YYYY
../make.tmpl:501: recipe for target '.export.sym' failed
make: *** [.export.sym] Error 1
If the dm_tree_node_set_XXXX|YYYY is not defined in any .exported_symbols*
Zdenek
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
2015-06-15 9:12 ` Zdenek Kabelac
@ 2015-06-15 9:26 ` Lidong Zhong
2015-06-15 9:43 ` Zdenek Kabelac
0 siblings, 1 reply; 7+ messages in thread
From: Lidong Zhong @ 2015-06-15 9:26 UTC (permalink / raw)
To: lvm-devel
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
Regards,
Lidong
> > Hi Zdenek,
> >
> > As the `echo` outputs, if there are more symbols got from `sort $^ | uniq
> -u`, there will be
> > an bash error.
> > I found this exactly because I forgot to add these symbols to
> .exported_symbols.* files.
>
> But the bash error here is wanted when symbols are missing - it's the purpose
>
> to stop compilation. So please specify more closely the example where it
> fails
> because of missing "".
>
> This output is wanted:
>
> Mismatch between symbols in shared library and lists in .exported_symbols.*
> files: dm_tree_node_set_XXXX
> dm_tree_node_set_YYYY
> ../make.tmpl:501: recipe for target '.export.sym' failed
> make: *** [.export.sym] Error 1
>
> If the dm_tree_node_set_XXXX|YYYY is not defined in any .exported_symbols*
>
> Zdenek
>
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
2015-06-15 9:26 ` Lidong Zhong
@ 2015-06-15 9:43 ` Zdenek Kabelac
2015-06-16 2:24 ` Lidong Zhong
0 siblings, 1 reply; 7+ messages in thread
From: Zdenek Kabelac @ 2015-06-15 9:43 UTC (permalink / raw)
To: lvm-devel
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] makefile: fail to compile if there are more than one exported symbols.
2015-06-15 9:43 ` Zdenek Kabelac
@ 2015-06-16 2:24 ` Lidong Zhong
0 siblings, 0 replies; 7+ messages in thread
From: Lidong Zhong @ 2015-06-16 2:24 UTC (permalink / raw)
To: lvm-devel
Hi Zdenek,
Sorry I forgot to check the latest source, and this has been fixed in your latest commit of make.tmpl.in.
Sorry for the noise :(
Regards,
Lidong
>>> On 6/15/2015 at 05:43 PM, in message <557E9E4A.6060001@redhat.com>, Zdenek
Kabelac <zkabelac@redhat.com> wrote:
> 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
>
> --
> lvm-devel mailing list
> lvm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/lvm-devel
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-16 2:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2015-06-16 2:24 ` Lidong Zhong
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.