DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Raslan Darawsheh <rasland@mellanox.com>
Cc: dev@dpdk.org, Christian Ehrhardt <christian.ehrhardt@canonical.com>
Subject: Re: [dpdk-dev] Compiling DPDK is not working on Red Hat 6.7
Date: Tue, 12 Jul 2016 14:15:39 +0200	[thread overview]
Message-ID: <2175995.EOO7pnvdQg@xps13> (raw)
In-Reply-To: <HE1PR05MB15785A52D56C3BBC9A981FC5C2300@HE1PR05MB1578.eurprd05.prod.outlook.com>

Hi,

2016-07-12 11:35, Raslan Darawsheh:
> I think the option is there as you see:
> 
[...]
> -Wl,--as-needed  -Wl,-lrt -Wl,-lm |...] -Wl,-lrte_eal
[...]
> eal_timer.c:(.text+0x152): undefined reference to `clock_gettime'

I suspect we need -lrt after -lrte_eal.

Please could you try the following patch?


--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -176,6 +176,8 @@ ifeq ($(RTE_DEVEL_BUILD)$(CONFIG_RTE_BUILD_SHARED_LIB),yy)
 LDFLAGS += -rpath=$(RTE_SDK_BIN)/lib
 endif
 
+MAPFLAGS = -Map=$@.map --cref
+
 .PHONY: all
 all: install
 
@@ -190,15 +192,13 @@ build: _postbuild
 exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
 
 ifeq ($(LINK_USING_CC),1)
-override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
-O_TO_EXE = $(CC) $(CFLAGS) \
-	$(call linkerprefix,$(LDLIBS)) \
-	$(call linkerprefix,$(LDFLAGS)) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
-	-Wl,-Map=$(@).map,--cref -o $@ $(OBJS-y)
+O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \
+	$(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
+	$(MAPFLAGS))
 else
-O_TO_EXE = $(LD) $(LDLIBS) \
-	$(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
-	-Map=$(@).map --cref -o $@ $(OBJS-y)
+O_TO_EXE = $(LD) -o $@ $(OBJS-y)
+	$(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \
+	$(MAPFLAGS)
 endif
 O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight
 O_TO_EXE_DISP = $(if $(V),"$(O_TO_EXE_STR)","  LD $(@)")

  reply	other threads:[~2016-07-12 12:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 10:02 Raslan Darawsheh
2016-07-12 10:09 ` Christian Ehrhardt
2016-07-12 11:35   ` Raslan Darawsheh
2016-07-12 12:15     ` Thomas Monjalon [this message]
2016-07-13  6:01       ` Raslan Darawsheh
2016-07-13  7:45         ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2175995.EOO7pnvdQg@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=christian.ehrhardt@canonical.com \
    --cc=dev@dpdk.org \
    --cc=rasland@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).