diff mbox series

nfsref: switch the way libraries are linked.

Message ID 20181211190944.71940-1-steved@redhat.com (mailing list archive)
State New, archived
Headers show
Series nfsref: switch the way libraries are linked. | expand

Commit Message

Steve Dickson Dec. 11, 2018, 7:09 p.m. UTC
Link the static libs before the dynamic libs allowing
the routines in the static libs to be defined
by the dynamic libs

Signed-off-by: Steve Dickson <steved@redhat.com>
---
 utils/nfsref/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Chuck Lever Dec. 11, 2018, 7:12 p.m. UTC | #1
> On Dec 11, 2018, at 2:09 PM, Steve Dickson <steved@redhat.com> wrote:
> 
> Link the static libs before the dynamic libs allowing
> the routines in the static libs to be defined
> by the dynamic libs

Hi Steve, Why is this change necessary? Is there a bug report?


> Signed-off-by: Steve Dickson <steved@redhat.com>
> ---
> utils/nfsref/Makefile.am | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
> index 44edc83..2409dd0 100644
> --- a/utils/nfsref/Makefile.am
> +++ b/utils/nfsref/Makefile.am
> @@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
> 
> sbin_PROGRAMS		= nfsref
> nfsref_SOURCES		= add.c lookup.c nfsref.c remove.c
> -LDADD			= $(LIBXML2) $(LIBCAP) \
> -			  ../../support/nfs/libnfs.la \
> -			  ../../support/junction/libjunction.la
> +LDADD			= ../../support/nfs/libnfs.la \
> +			  ../../support/junction/libjunction.la \
> +			  $(LIBXML2) $(LIBCAP)
> 
> man8_MANS		= nfsref.man
> 
> -- 
> 2.19.2
> 

--
Chuck Lever
Steve Dickson Dec. 11, 2018, 10:27 p.m. UTC | #2
On 12/11/18 2:12 PM, Chuck Lever wrote:
> 
>> On Dec 11, 2018, at 2:09 PM, Steve Dickson <steved@redhat.com> wrote:
>>
>> Link the static libs before the dynamic libs allowing
>> the routines in the static libs to be defined
>> by the dynamic libs
> 
> Hi Steve, Why is this change necessary? Is there a bug report?
No... when I enabled junctions in the Fedora rawhide (F30) I got
a bunch of xml undefined routines 
   https://koji.fedoraproject.org/koji/getfile?taskID=31408933&volume=DEFAULT&name=build.log&offset=-4000

It compiled fine on f29 but not on rawhide

After asking if the XML api changed, people suggested I simply
change the order of how the static and dynamic libs are linked,
which worked

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/VK2XPHV2MELV6IRKBG2ITI6GKUBMMRQW/

steved.

> 
> 
>> Signed-off-by: Steve Dickson <steved@redhat.com>
>> ---
>> utils/nfsref/Makefile.am | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
>> index 44edc83..2409dd0 100644
>> --- a/utils/nfsref/Makefile.am
>> +++ b/utils/nfsref/Makefile.am
>> @@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
>>
>> sbin_PROGRAMS		= nfsref
>> nfsref_SOURCES		= add.c lookup.c nfsref.c remove.c
>> -LDADD			= $(LIBXML2) $(LIBCAP) \
>> -			  ../../support/nfs/libnfs.la \
>> -			  ../../support/junction/libjunction.la
>> +LDADD			= ../../support/nfs/libnfs.la \
>> +			  ../../support/junction/libjunction.la \
>> +			  $(LIBXML2) $(LIBCAP)
>>
>> man8_MANS		= nfsref.man
>>
>> -- 
>> 2.19.2
>>
> 
> --
> Chuck Lever
> 
> 
>
Chuck Lever Dec. 12, 2018, 3:54 p.m. UTC | #3
> On Dec 11, 2018, at 5:27 PM, Steve Dickson <SteveD@redhat.com> wrote:
> 
> 
> 
> On 12/11/18 2:12 PM, Chuck Lever wrote:
>> 
>>> On Dec 11, 2018, at 2:09 PM, Steve Dickson <steved@redhat.com> wrote:
>>> 
>>> Link the static libs before the dynamic libs allowing
>>> the routines in the static libs to be defined
>>> by the dynamic libs
>> 
>> Hi Steve, Why is this change necessary? Is there a bug report?
> No... when I enabled junctions in the Fedora rawhide (F30) I got
> a bunch of xml undefined routines 
>   https://koji.fedoraproject.org/koji/getfile?taskID=31408933&volume=DEFAULT&name=build.log&offset=-4000
> 
> It compiled fine on f29 but not on rawhide
> 
> After asking if the XML api changed, people suggested I simply
> change the order of how the static and dynamic libs are linked,
> which worked
> 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/
> 
> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/VK2XPHV2MELV6IRKBG2ITI6GKUBMMRQW/

OK. See also:

http://git.linux-nfs.org/?p=cel/fedfs-utils.git;a=commit;h=05d6450023265e15bdc6e6bd24c05b1586e87d1d

which is a similar change, but it hits other Makefiles as well.
I wonder why only nfsref/Makefile.am is affected for you.


> steved.
> 
>> 
>> 
>>> Signed-off-by: Steve Dickson <steved@redhat.com>
>>> ---
>>> utils/nfsref/Makefile.am | 6 +++---
>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>> 
>>> diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
>>> index 44edc83..2409dd0 100644
>>> --- a/utils/nfsref/Makefile.am
>>> +++ b/utils/nfsref/Makefile.am
>>> @@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
>>> 
>>> sbin_PROGRAMS		= nfsref
>>> nfsref_SOURCES		= add.c lookup.c nfsref.c remove.c
>>> -LDADD			= $(LIBXML2) $(LIBCAP) \
>>> -			  ../../support/nfs/libnfs.la \
>>> -			  ../../support/junction/libjunction.la
>>> +LDADD			= ../../support/nfs/libnfs.la \
>>> +			  ../../support/junction/libjunction.la \
>>> +			  $(LIBXML2) $(LIBCAP)
>>> 
>>> man8_MANS		= nfsref.man
>>> 
>>> -- 
>>> 2.19.2
>>> 
>> 
>> --
>> Chuck Lever
>> 
>> 
>> 

--
Chuck Lever
Steve Dickson Dec. 12, 2018, 4:17 p.m. UTC | #4
On 12/12/18 10:54 AM, Chuck Lever wrote:
> 
> 
>> On Dec 11, 2018, at 5:27 PM, Steve Dickson <SteveD@redhat.com> wrote:
>>
>>
>>
>> On 12/11/18 2:12 PM, Chuck Lever wrote:
>>>
>>>> On Dec 11, 2018, at 2:09 PM, Steve Dickson <steved@redhat.com> wrote:
>>>>
>>>> Link the static libs before the dynamic libs allowing
>>>> the routines in the static libs to be defined
>>>> by the dynamic libs
>>>
>>> Hi Steve, Why is this change necessary? Is there a bug report?
>> No... when I enabled junctions in the Fedora rawhide (F30) I got
>> a bunch of xml undefined routines 
>>   https://koji.fedoraproject.org/koji/getfile?taskID=31408933&volume=DEFAULT&name=build.log&offset=-4000
>>
>> It compiled fine on f29 but not on rawhide
>>
>> After asking if the XML api changed, people suggested I simply
>> change the order of how the static and dynamic libs are linked,
>> which worked
>>
>> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/
>>
>> https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/VK2XPHV2MELV6IRKBG2ITI6GKUBMMRQW/
> 
> OK. See also:
> 
> http://git.linux-nfs.org/?p=cel/fedfs-utils.git;a=commit;h=05d6450023265e15bdc6e6bd24c05b1586e87d1d
> 
> which is a similar change, but it hits other Makefiles as well.
> I wonder why only nfsref/Makefile.am is affected for you.
Well taking a quick look at the utils/*/Makefile.am files,
in general with two exceptions, the static libs are always defined 
be for the dynamic libs... 

And why it compiled on Fedora 29 and not Fedora 30 (rawhide)...
Well... I have no idea... its going down as one of those 
the gcc/ld mysteries ;-) 

Committed!

steved.

> 
> 
>> steved.
>>
>>>
>>>
>>>> Signed-off-by: Steve Dickson <steved@redhat.com>
>>>> ---
>>>> utils/nfsref/Makefile.am | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
>>>> index 44edc83..2409dd0 100644
>>>> --- a/utils/nfsref/Makefile.am
>>>> +++ b/utils/nfsref/Makefile.am
>>>> @@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
>>>>
>>>> sbin_PROGRAMS		= nfsref
>>>> nfsref_SOURCES		= add.c lookup.c nfsref.c remove.c
>>>> -LDADD			= $(LIBXML2) $(LIBCAP) \
>>>> -			  ../../support/nfs/libnfs.la \
>>>> -			  ../../support/junction/libjunction.la
>>>> +LDADD			= ../../support/nfs/libnfs.la \
>>>> +			  ../../support/junction/libjunction.la \
>>>> +			  $(LIBXML2) $(LIBCAP)
>>>>
>>>> man8_MANS		= nfsref.man
>>>>
>>>> -- 
>>>> 2.19.2
>>>>
>>>
>>> --
>>> Chuck Lever
>>>
>>>
>>>
> 
> --
> Chuck Lever
> 
> 
>
diff mbox series

Patch

diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am
index 44edc83..2409dd0 100644
--- a/utils/nfsref/Makefile.am
+++ b/utils/nfsref/Makefile.am
@@ -27,9 +27,9 @@  noinst_HEADERS		= nfsref.h
 
 sbin_PROGRAMS		= nfsref
 nfsref_SOURCES		= add.c lookup.c nfsref.c remove.c
-LDADD			= $(LIBXML2) $(LIBCAP) \
-			  ../../support/nfs/libnfs.la \
-			  ../../support/junction/libjunction.la
+LDADD			= ../../support/nfs/libnfs.la \
+			  ../../support/junction/libjunction.la \
+			  $(LIBXML2) $(LIBCAP)
 
 man8_MANS		= nfsref.man