DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt
@ 2016-03-22  8:09 Daniel Mrzyglod
  2016-03-22  8:55 ` Thomas Monjalon
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Daniel Mrzyglod @ 2016-03-22  8:09 UTC (permalink / raw)
  To: dev

For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).

Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 app/test/Makefile                    | 1 +
 lib/librte_eal/linuxapp/eal/Makefile | 1 +
 2 files changed, 2 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 00e4df2..707930f 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
 
 ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
+LDFLAGS += -lrt
 SRCS-y += test_red.c
 SRCS-y += test_sched.c
 endif
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 25b3a8e..1860739 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -52,6 +52,7 @@ CFLAGS += $(WERROR_FLAGS) -O3
 LDLIBS += -ldl
 LDLIBS += -lpthread
 LDLIBS += -lgcc_s
+LDLIBS += -lrt
 
 # specific to linuxapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) := eal.c
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt
  2016-03-22  8:09 [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt Daniel Mrzyglod
@ 2016-03-22  8:55 ` Thomas Monjalon
  2016-03-22  9:25   ` Mrzyglod, DanielX T
  2016-03-22  9:58 ` [dpdk-dev] [PATCH v2] " Daniel Mrzyglod
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Thomas Monjalon @ 2016-03-22  8:55 UTC (permalink / raw)
  To: Daniel Mrzyglod; +Cc: dev

2016-03-22 09:09, Daniel Mrzyglod:
> For GLIBC < 2.17 it is necessery to add -lrt for linker
> from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
> available directly in the main C library. This affect Ubuntu 12.04 in i686
> and other older Linux Distros).
[...]
> --- a/app/test/Makefile
> +++ b/app/test/Makefile
> @@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
>  SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
>  
>  ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
> +LDFLAGS += -lrt

Why are you adding it only for librte_sched?
Is it needed by librte_sched or by some functions testing librte_sched?

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

* Re: [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt
  2016-03-22  8:55 ` Thomas Monjalon
@ 2016-03-22  9:25   ` Mrzyglod, DanielX T
  0 siblings, 0 replies; 8+ messages in thread
From: Mrzyglod, DanielX T @ 2016-03-22  9:25 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

>-----Original Message-----
>From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
>Sent: Tuesday, March 22, 2016 9:55 AM
>To: Mrzyglod, DanielX T <danielx.t.mrzyglod@intel.com>
>Cc: dev@dpdk.org
>Subject: Re: [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt
>
>2016-03-22 09:09, Daniel Mrzyglod:
>> For GLIBC < 2.17 it is necessery to add -lrt for linker
>> from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
>> available directly in the main C library. This affect Ubuntu 12.04 in i686
>> and other older Linux Distros).
>[...]
>> --- a/app/test/Makefile
>> +++ b/app/test/Makefile
>> @@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) +=
>test_cmdline_string.c
>>  SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
>>
>>  ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
>> +LDFLAGS += -lrt
>
>Why are you adding it only for librte_sched?
>Is it needed by librte_sched or by some functions testing librte_sched?

Every clock_gettime() needs -lrt for >=GLIBC2.17. For glibc2.17 and above  `clock_*' suite of functions (declared in <time.h>) is now available
directly in the main C library.
In test it's only in test_red.c and I see that I missed it in ptpclient example probably. So I will send Patch v2

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

* [dpdk-dev] [PATCH v2] mk: fix eal shared library dependencies -lrt
  2016-03-22  8:09 [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt Daniel Mrzyglod
  2016-03-22  8:55 ` Thomas Monjalon
@ 2016-03-22  9:58 ` Daniel Mrzyglod
  2016-03-22 12:18   ` Panu Matilainen
  2016-03-22 12:49 ` Daniel Mrzyglod
  2016-03-22 12:51 ` [dpdk-dev] [PATCH v3] " Daniel Mrzyglod
  3 siblings, 1 reply; 8+ messages in thread
From: Daniel Mrzyglod @ 2016-03-22  9:58 UTC (permalink / raw)
  To: dev

For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).

Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 app/test/Makefile                    | 1 +
 examples/ptpclient/Makefile          | 1 +
 lib/librte_eal/linuxapp/eal/Makefile | 1 +
 3 files changed, 3 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 00e4df2..707930f 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
 
 ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
+LDFLAGS += -lrt
 SRCS-y += test_red.c
 SRCS-y += test_sched.c
 endif
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index b77cf71..082c690 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -46,6 +46,7 @@ SRCS-y := ptpclient.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDFLAGS += -lrt
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 25b3a8e..1860739 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -52,6 +52,7 @@ CFLAGS += $(WERROR_FLAGS) -O3
 LDLIBS += -ldl
 LDLIBS += -lpthread
 LDLIBS += -lgcc_s
+LDLIBS += -lrt
 
 # specific to linuxapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) := eal.c
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v2] mk: fix eal shared library dependencies -lrt
  2016-03-22  9:58 ` [dpdk-dev] [PATCH v2] " Daniel Mrzyglod
@ 2016-03-22 12:18   ` Panu Matilainen
  0 siblings, 0 replies; 8+ messages in thread
From: Panu Matilainen @ 2016-03-22 12:18 UTC (permalink / raw)
  To: Daniel Mrzyglod, dev

On 03/22/2016 11:58 AM, Daniel Mrzyglod wrote:
> For GLIBC < 2.17 it is necessery to add -lrt for linker
> from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
> available directly in the main C library. This affect Ubuntu 12.04 in i686
> and other older Linux Distros).
>
> Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")
>
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
> ---
>   app/test/Makefile                    | 1 +
>   examples/ptpclient/Makefile          | 1 +
>   lib/librte_eal/linuxapp/eal/Makefile | 1 +
>   3 files changed, 3 insertions(+)
>
> diff --git a/app/test/Makefile b/app/test/Makefile
> index 00e4df2..707930f 100644
> --- a/app/test/Makefile
> +++ b/app/test/Makefile
> @@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
>   SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
>
>   ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
> +LDFLAGS += -lrt
>   SRCS-y += test_red.c
>   SRCS-y += test_sched.c
>   endif
> diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
> index b77cf71..082c690 100644
> --- a/examples/ptpclient/Makefile
> +++ b/examples/ptpclient/Makefile
> @@ -46,6 +46,7 @@ SRCS-y := ptpclient.c
>
>   CFLAGS += -O3
>   CFLAGS += $(WERROR_FLAGS)
> +LDFLAGS += -lrt

These two should be LDLIBS instead. LDFLAGS is for passing in other 
arguments to the linker, such as path, LDLIBS exists solely for passing 
in the actual libraries.

	- Panu -

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

* [dpdk-dev] [PATCH v2] mk: fix eal shared library dependencies -lrt
  2016-03-22  8:09 [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt Daniel Mrzyglod
  2016-03-22  8:55 ` Thomas Monjalon
  2016-03-22  9:58 ` [dpdk-dev] [PATCH v2] " Daniel Mrzyglod
@ 2016-03-22 12:49 ` Daniel Mrzyglod
  2016-03-22 12:51 ` [dpdk-dev] [PATCH v3] " Daniel Mrzyglod
  3 siblings, 0 replies; 8+ messages in thread
From: Daniel Mrzyglod @ 2016-03-22 12:49 UTC (permalink / raw)
  To: dev

For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).

v3: change LDFLAGS to LDLIBS
v2: Add missed example
v1: Initial revision


Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 app/test/Makefile                    | 1 +
 examples/ptpclient/Makefile          | 1 +
 lib/librte_eal/linuxapp/eal/Makefile | 1 +
 3 files changed, 3 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 00e4df2..707930f 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
 
 ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
+LDLIBS += -lrt
 SRCS-y += test_red.c
 SRCS-y += test_sched.c
 endif
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index b77cf71..082c690 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -46,6 +46,7 @@ SRCS-y := ptpclient.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lrt
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 25b3a8e..1860739 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -52,6 +52,7 @@ CFLAGS += $(WERROR_FLAGS) -O3
 LDLIBS += -ldl
 LDLIBS += -lpthread
 LDLIBS += -lgcc_s
+LDLIBS += -lrt
 
 # specific to linuxapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) := eal.c
-- 
2.5.5

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

* [dpdk-dev] [PATCH v3] mk: fix eal shared library dependencies -lrt
  2016-03-22  8:09 [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt Daniel Mrzyglod
                   ` (2 preceding siblings ...)
  2016-03-22 12:49 ` Daniel Mrzyglod
@ 2016-03-22 12:51 ` Daniel Mrzyglod
  2016-03-22 19:47   ` Thomas Monjalon
  3 siblings, 1 reply; 8+ messages in thread
From: Daniel Mrzyglod @ 2016-03-22 12:51 UTC (permalink / raw)
  To: dev

For GLIBC < 2.17 it is necessery to add -lrt for linker
from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
available directly in the main C library. This affect Ubuntu 12.04 in i686
and other older Linux Distros).

v3: change LDFLAGS to LDLIBS
v2: Add missed example
v1: Initial revision


Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
---
 app/test/Makefile                    | 1 +
 examples/ptpclient/Makefile          | 1 +
 lib/librte_eal/linuxapp/eal/Makefile | 1 +
 3 files changed, 3 insertions(+)

diff --git a/app/test/Makefile b/app/test/Makefile
index 00e4df2..707930f 100644
--- a/app/test/Makefile
+++ b/app/test/Makefile
@@ -114,6 +114,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c
 SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c
 
 ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y)
+LDLIBS += -lrt
 SRCS-y += test_red.c
 SRCS-y += test_sched.c
 endif
diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile
index b77cf71..082c690 100644
--- a/examples/ptpclient/Makefile
+++ b/examples/ptpclient/Makefile
@@ -46,6 +46,7 @@ SRCS-y := ptpclient.c
 
 CFLAGS += -O3
 CFLAGS += $(WERROR_FLAGS)
+LDLIBS += -lrt
 
 # workaround for a gcc bug with noreturn attribute
 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603
diff --git a/lib/librte_eal/linuxapp/eal/Makefile b/lib/librte_eal/linuxapp/eal/Makefile
index 25b3a8e..1860739 100644
--- a/lib/librte_eal/linuxapp/eal/Makefile
+++ b/lib/librte_eal/linuxapp/eal/Makefile
@@ -52,6 +52,7 @@ CFLAGS += $(WERROR_FLAGS) -O3
 LDLIBS += -ldl
 LDLIBS += -lpthread
 LDLIBS += -lgcc_s
+LDLIBS += -lrt
 
 # specific to linuxapp exec-env
 SRCS-$(CONFIG_RTE_EXEC_ENV_LINUXAPP) := eal.c
-- 
2.5.5

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

* Re: [dpdk-dev] [PATCH v3] mk: fix eal shared library dependencies -lrt
  2016-03-22 12:51 ` [dpdk-dev] [PATCH v3] " Daniel Mrzyglod
@ 2016-03-22 19:47   ` Thomas Monjalon
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Monjalon @ 2016-03-22 19:47 UTC (permalink / raw)
  To: Daniel Mrzyglod; +Cc: dev

2016-03-22 13:51, Daniel Mrzyglod:
> For GLIBC < 2.17 it is necessery to add -lrt for linker
> from glibc > 2.17 The `clock_*' suite of functions (declared in <time.h>) is now
> available directly in the main C library. This affect Ubuntu 12.04 in i686
> and other older Linux Distros).
> 
> v3: change LDFLAGS to LDLIBS
> v2: Add missed example
> v1: Initial revision
> 
> 
> Fixes: 4758404a3084 ("mk: fix eal shared library dependencies")
> 
> Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>

Applied, thanks

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

end of thread, other threads:[~2016-03-22 19:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-22  8:09 [dpdk-dev] [PATCH] mk: fix eal shared library dependencies -lrt Daniel Mrzyglod
2016-03-22  8:55 ` Thomas Monjalon
2016-03-22  9:25   ` Mrzyglod, DanielX T
2016-03-22  9:58 ` [dpdk-dev] [PATCH v2] " Daniel Mrzyglod
2016-03-22 12:18   ` Panu Matilainen
2016-03-22 12:49 ` Daniel Mrzyglod
2016-03-22 12:51 ` [dpdk-dev] [PATCH v3] " Daniel Mrzyglod
2016-03-22 19:47   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).