Skip to contentSkip to conversation

nfsref: switch the way libraries are linked.

PATCH In review Steve Dickson 2 participants 5 messages Dec 11, 2018 – Dec 12, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsref: switch the way libraries are linked.

Link the static libs before the dynamic libs allowing the routines in the static libs to be defined by the dynamic libs

---
 utils/nfsref/Makefile.am | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
utils/nfsref/Makefile.am +3 -3
index 44edc83..2409dd0 100644
@@ -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
 
Signature · 1 line
2.19.2
#1 lore raw
Quoted 6 lines · Steve Dickson

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?

Quoted 20 lines

---
utils/nfsref/Makefile.am | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
utils/nfsref/Makefile.am +0 -0
index 44edc83..2409dd0 100644
@@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
 

sbin_PROGRAMS = nfsref
nfsref_SOURCES = add.c lookup.c nfsref.c remove.c

utils/nfsref/Makefile.am +3 -3
-LDADD			= $(LIBXML2) $(LIBCAP) \
-			  ../../support/nfs/libnfs.la \
-			  ../../support/junction/libjunction.la
+LDADD			= ../../support/nfs/libnfs.la \
+			  ../../support/junction/libjunction.la \
+			  $(LIBXML2) $(LIBCAP)
Quoted 5 lines

man8_MANS = nfsref.man

Signature · 1 line
2.19.2

--
Chuck Lever

#2 lore raw
Quoted 8 lines · Chuck Lever
Quoted 6 lines · Steve Dickson

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/[email protected]/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/

https://lists.fedoraproject.org/archives/list/[email protected]/message/VK2XPHV2MELV6IRKBG2ITI6GKUBMMRQW/

steved.

Quoted 33 lines
Quoted 22 lines

---
utils/nfsref/Makefile.am | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
utils/nfsref/Makefile.am +0 -0
index 44edc83..2409dd0 100644
@@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
 

sbin_PROGRAMS = nfsref
nfsref_SOURCES = add.c lookup.c nfsref.c remove.c

utils/nfsref/Makefile.am +3 -3
-LDADD			= $(LIBXML2) $(LIBCAP) \
-			  ../../support/nfs/libnfs.la \
-			  ../../support/junction/libjunction.la
+LDADD			= ../../support/nfs/libnfs.la \
+			  ../../support/junction/libjunction.la \
+			  $(LIBXML2) $(LIBCAP)
Quoted 5 lines

man8_MANS = nfsref.man

Signature · 1 line
2.19.2

--
Chuck Lever

#3 lore raw
Quoted 21 lines · Steve Dickson
Quoted 8 lines · Chuck Lever
Quoted 6 lines · Steve Dickson

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

Quoted 7 lines

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/[email protected]/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/

https://lists.fedoraproject.org/archives/list/[email protected]/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.

Quoted 35 lines

steved.

Quoted 33 lines
Quoted 22 lines

---
utils/nfsref/Makefile.am | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
utils/nfsref/Makefile.am +0 -0
index 44edc83..2409dd0 100644
@@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
 

sbin_PROGRAMS = nfsref
nfsref_SOURCES = add.c lookup.c nfsref.c remove.c

utils/nfsref/Makefile.am +3 -3
-LDADD			= $(LIBXML2) $(LIBCAP) \
-			  ../../support/nfs/libnfs.la \
-			  ../../support/junction/libjunction.la
+LDADD			= ../../support/nfs/libnfs.la \
+			  ../../support/junction/libjunction.la \
+			  $(LIBXML2) $(LIBCAP)
Quoted 5 lines

man8_MANS = nfsref.man

Signature · 1 line
2.19.2

--
Chuck Lever

--
Chuck Lever

#4 lore raw
Quoted 27 lines · Chuck Lever
Quoted 27 lines · Steve Dickson
Quoted 8 lines · Chuck Lever
Quoted 6 lines · Steve Dickson

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/[email protected]/message/6UIAF47S73QFLCJDWEWXKQHZTOMB5JXQ/

Quoted 8 lines
Quoted 1 line

https://lists.fedoraproject.org/archives/list/[email protected]/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.

Quoted 43 lines
Quoted 37 lines

steved.

Quoted 33 lines
Quoted 22 lines

---
utils/nfsref/Makefile.am | 6 +++---

1 file changed, 3 insertions(+), 3 deletions(-)
utils/nfsref/Makefile.am +0 -0
index 44edc83..2409dd0 100644
@@ -27,9 +27,9 @@ noinst_HEADERS		= nfsref.h
 

sbin_PROGRAMS = nfsref
nfsref_SOURCES = add.c lookup.c nfsref.c remove.c

utils/nfsref/Makefile.am +3 -3
-LDADD			= $(LIBXML2) $(LIBCAP) \
-			  ../../support/nfs/libnfs.la \
-			  ../../support/junction/libjunction.la
+LDADD			= ../../support/nfs/libnfs.la \
+			  ../../support/junction/libjunction.la \
+			  $(LIBXML2) $(LIBCAP)
Quoted 5 lines

man8_MANS = nfsref.man

Signature · 1 line
2.19.2

--
Chuck Lever

--
Chuck Lever