All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] multipath-tools: arrange compilation options for binaries
@ 2017-03-17 22:40 Xose Vazquez Perez
  2017-03-23  8:34 ` Christophe Varoqui
  0 siblings, 1 reply; 6+ messages in thread
From: Xose Vazquez Perez @ 2017-03-17 22:40 UTC (permalink / raw)
  Cc: device-mapper development, Xose Vazquez Perez

Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@redhat.com>
Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
---
 kpartx/Makefile       | 2 +-
 mpathpersist/Makefile | 2 +-
 multipath/Makefile    | 2 +-
 multipathd/Makefile   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/kpartx/Makefile b/kpartx/Makefile
index 9441a2b..2e81284 100644
--- a/kpartx/Makefile
+++ b/kpartx/Makefile
@@ -19,7 +19,7 @@ EXEC = kpartx
 all: $(EXEC)
 
 $(EXEC): $(OBJS)
-	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
 
 install: $(EXEC) $(EXEC).8
diff --git a/mpathpersist/Makefile b/mpathpersist/Makefile
index 47043bb..27e921e 100644
--- a/mpathpersist/Makefile
+++ b/mpathpersist/Makefile
@@ -12,7 +12,7 @@ OBJS = main.o
 all: $(EXEC)
 
 $(EXEC): $(OBJS)
-	$(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
 
 install:
diff --git a/multipath/Makefile b/multipath/Makefile
index cad34bf..421490c 100644
--- a/multipath/Makefile
+++ b/multipath/Makefile
@@ -15,7 +15,7 @@ OBJS = main.o
 all: $(EXEC)
 
 $(EXEC): $(OBJS)
-	$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
 	$(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
 
diff --git a/multipathd/Makefile b/multipathd/Makefile
index d57f6d5..a3fad61 100644
--- a/multipathd/Makefile
+++ b/multipathd/Makefile
@@ -29,7 +29,7 @@ EXEC = multipathd
 all : $(EXEC)
 
 $(EXEC): $(OBJS)
-	$(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS)
+	$(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
 	$(GZIP) $(EXEC).8 > $(EXEC).8.gz
 
 install:
-- 
2.12.0

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] multipath-tools: arrange compilation options for binaries
  2017-03-17 22:40 [PATCH] multipath-tools: arrange compilation options for binaries Xose Vazquez Perez
@ 2017-03-23  8:34 ` Christophe Varoqui
  2017-03-23  9:09   ` Christophe Varoqui
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Varoqui @ 2017-03-23  8:34 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 2167 bytes --]

Merged,
Thanks.

On Fri, Mar 17, 2017 at 11:40 PM, Xose Vazquez Perez <xose.vazquez@gmail.com
> wrote:

> Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
> Cc: device-mapper development <dm-devel@redhat.com>
> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
> ---
>  kpartx/Makefile       | 2 +-
>  mpathpersist/Makefile | 2 +-
>  multipath/Makefile    | 2 +-
>  multipathd/Makefile   | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/kpartx/Makefile b/kpartx/Makefile
> index 9441a2b..2e81284 100644
> --- a/kpartx/Makefile
> +++ b/kpartx/Makefile
> @@ -19,7 +19,7 @@ EXEC = kpartx
>  all: $(EXEC)
>
>  $(EXEC): $(OBJS)
> -       $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>
>  install: $(EXEC) $(EXEC).8
> diff --git a/mpathpersist/Makefile b/mpathpersist/Makefile
> index 47043bb..27e921e 100644
> --- a/mpathpersist/Makefile
> +++ b/mpathpersist/Makefile
> @@ -12,7 +12,7 @@ OBJS = main.o
>  all: $(EXEC)
>
>  $(EXEC): $(OBJS)
> -       $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS)
> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>
>  install:
> diff --git a/multipath/Makefile b/multipath/Makefile
> index cad34bf..421490c 100644
> --- a/multipath/Makefile
> +++ b/multipath/Makefile
> @@ -15,7 +15,7 @@ OBJS = main.o
>  all: $(EXEC)
>
>  $(EXEC): $(OBJS)
> -       $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>         $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
>
> diff --git a/multipathd/Makefile b/multipathd/Makefile
> index d57f6d5..a3fad61 100644
> --- a/multipathd/Makefile
> +++ b/multipathd/Makefile
> @@ -29,7 +29,7 @@ EXEC = multipathd
>  all : $(EXEC)
>
>  $(EXEC): $(OBJS)
> -       $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS)
> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>
>  install:
> --
> 2.12.0
>
>

[-- Attachment #1.2: Type: text/html, Size: 2984 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] multipath-tools: arrange compilation options for binaries
  2017-03-23  8:34 ` Christophe Varoqui
@ 2017-03-23  9:09   ` Christophe Varoqui
  2017-03-23 14:02     ` Xose Vazquez Perez
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Varoqui @ 2017-03-23  9:09 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 2579 bytes --]

And reverted:

From http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking
:

If object or library AA needs a symbol from library BB, then AA should come
*before* library BB in the command-line invocation of the linker.



On Thu, Mar 23, 2017 at 9:34 AM, Christophe Varoqui <
christophe.varoqui@opensvc.com> wrote:

> Merged,
> Thanks.
>
> On Fri, Mar 17, 2017 at 11:40 PM, Xose Vazquez Perez <
> xose.vazquez@gmail.com> wrote:
>
>> Cc: Christophe Varoqui <christophe.varoqui@opensvc.com>
>> Cc: device-mapper development <dm-devel@redhat.com>
>> Signed-off-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
>> ---
>>  kpartx/Makefile       | 2 +-
>>  mpathpersist/Makefile | 2 +-
>>  multipath/Makefile    | 2 +-
>>  multipathd/Makefile   | 2 +-
>>  4 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/kpartx/Makefile b/kpartx/Makefile
>> index 9441a2b..2e81284 100644
>> --- a/kpartx/Makefile
>> +++ b/kpartx/Makefile
>> @@ -19,7 +19,7 @@ EXEC = kpartx
>>  all: $(EXEC)
>>
>>  $(EXEC): $(OBJS)
>> -       $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
>> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>>
>>  install: $(EXEC) $(EXEC).8
>> diff --git a/mpathpersist/Makefile b/mpathpersist/Makefile
>> index 47043bb..27e921e 100644
>> --- a/mpathpersist/Makefile
>> +++ b/mpathpersist/Makefile
>> @@ -12,7 +12,7 @@ OBJS = main.o
>>  all: $(EXEC)
>>
>>  $(EXEC): $(OBJS)
>> -       $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS)
>> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>>
>>  install:
>> diff --git a/multipath/Makefile b/multipath/Makefile
>> index cad34bf..421490c 100644
>> --- a/multipath/Makefile
>> +++ b/multipath/Makefile
>> @@ -15,7 +15,7 @@ OBJS = main.o
>>  all: $(EXEC)
>>
>>  $(EXEC): $(OBJS)
>> -       $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
>> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>>         $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
>>
>> diff --git a/multipathd/Makefile b/multipathd/Makefile
>> index d57f6d5..a3fad61 100644
>> --- a/multipathd/Makefile
>> +++ b/multipathd/Makefile
>> @@ -29,7 +29,7 @@ EXEC = multipathd
>>  all : $(EXEC)
>>
>>  $(EXEC): $(OBJS)
>> -       $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS)
>> +       $(CC) $(CFLAGS) $(LDFLAGS) $(LIBDEPS) $(OBJS) -o $(EXEC)
>>         $(GZIP) $(EXEC).8 > $(EXEC).8.gz
>>
>>  install:
>> --
>> 2.12.0
>>
>>
>

[-- Attachment #1.2: Type: text/html, Size: 4406 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] multipath-tools: arrange compilation options for binaries
  2017-03-23  9:09   ` Christophe Varoqui
@ 2017-03-23 14:02     ` Xose Vazquez Perez
  2017-03-23 14:55       ` Christophe Varoqui
  0 siblings, 1 reply; 6+ messages in thread
From: Xose Vazquez Perez @ 2017-03-23 14:02 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development

On 03/23/2017 10:09 AM, Christophe Varoqui wrote:

> And reverted:
> hh
> From http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking:
> 
>     If object or library AA needs a symbol from library BB, then AA should
>     come /before/ library BB in the command-line invocation of the linker.

Did you get a toolchain error?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] multipath-tools: arrange compilation options for binaries
  2017-03-23 14:02     ` Xose Vazquez Perez
@ 2017-03-23 14:55       ` Christophe Varoqui
  2017-03-24 13:52         ` Xose Vazquez Perez
  0 siblings, 1 reply; 6+ messages in thread
From: Christophe Varoqui @ 2017-03-23 14:55 UTC (permalink / raw)
  To: Xose Vazquez Perez; +Cc: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 1970 bytes --]

Yes indeed, the build really failed on my box.

Toolchain versions :
* gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2)
* GNU ld (GNU Binutils for Ubuntu) 2.26.1

make log :

cc -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int
-Werror=implicit-function-declaration -Werror=format-security
-Wno-sign-compare -Wno-unused-parameter -Wno-clobbered
-Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4
-fPIC -DLIB_STRING=\"lib64\" -DRUN_DIR=\"run\" -I../libmultipath
-I../libmpathcmd  -lpthread -ldevmapper -ldl -L../libmultipath -lmultipath
-ludev -L../libmpathcmd -lmpathcmd main.o -o multipath
main.o: In function `get_dm_mpvec':
/home/cvaroqui/multipath-tools/multipath/main.c:209: undefined reference to
`dm_get_maps'
/home/cvaroqui/multipath-tools/multipath/main.c:228: undefined reference to
`dm_get_map'
/home/cvaroqui/multipath-tools/multipath/main.c:229: undefined reference to
`dlog'
/home/cvaroqui/multipath-tools/multipath/main.c:230: undefined reference to
`dm_get_status'
/home/cvaroqui/multipath-tools/multipath/main.c:231: undefined reference to
`dlog'
/home/cvaroqui/multipath-tools/multipath/main.c:233: undefined reference to
`disassemble_map'
...
<snip: many more reference errors>
...
collect2: error: ld returned 1 exit status
Makefile:18: recipe for target 'multipath' failed
make[1]: *** [multipath] Error 1
make[1]: Leaving directory '/home/cvaroqui/multipath-tools/multipath'
Makefile:46: recipe for target 'recurse' failed
make: *** [recurse] Error 2


On Thu, Mar 23, 2017 at 3:02 PM, Xose Vazquez Perez <xose.vazquez@gmail.com>
wrote:

> On 03/23/2017 10:09 AM, Christophe Varoqui wrote:
>
> > And reverted:
> > hh
> > From http://eli.thegreenplace.net/2013/07/09/library-order-in-
> static-linking:
> >
> >     If object or library AA needs a symbol from library BB, then AA
> should
> >     come /before/ library BB in the command-line invocation of the
> linker.
>
> Did you get a toolchain error?
>

[-- Attachment #1.2: Type: text/html, Size: 2849 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] multipath-tools: arrange compilation options for binaries
  2017-03-23 14:55       ` Christophe Varoqui
@ 2017-03-24 13:52         ` Xose Vazquez Perez
  0 siblings, 0 replies; 6+ messages in thread
From: Xose Vazquez Perez @ 2017-03-24 13:52 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development

On 03/23/2017 03:55 PM, Christophe Varoqui wrote:

> Yes indeed, the build really failed on my box.
> 
> Toolchain versions :
> * gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 
> * GNU ld (GNU Binutils for Ubuntu) 2.26.1

In Fedora 25, with these packages, it's built flawlessly:
kernel-4.10.5
binutils-2.26.1
glibc-2.24
make-4.1
gcc-6.3.1
clang-3.9.1

>> And reverted:
>> hh
>> From http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking <http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking>:
>>
>>     If object or library AA needs a symbol from library BB, then AA should
>>     come /before/ library BB in the command-line invocation of the linker.
>

Maybe this limitation was fixed in newer releases.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-03-24 13:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 22:40 [PATCH] multipath-tools: arrange compilation options for binaries Xose Vazquez Perez
2017-03-23  8:34 ` Christophe Varoqui
2017-03-23  9:09   ` Christophe Varoqui
2017-03-23 14:02     ` Xose Vazquez Perez
2017-03-23 14:55       ` Christophe Varoqui
2017-03-24 13:52         ` Xose Vazquez Perez

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.