From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from serv108.segi.ulg.ac.be (serv108.segi.ulg.ac.be [139.165.32.111]) by dpdk.org (Postfix) with ESMTP id 87FA0728E for ; Mon, 19 Feb 2018 10:39:39 +0100 (CET) Received: from mbx12-zne.ulg.ac.be (serv470.segi.ulg.ac.be [139.165.32.199]) by serv108.segi.ulg.ac.be (Postfix) with ESMTP id 70289200E7D3 for ; Mon, 19 Feb 2018 10:39:39 +0100 (CET) Received: from localhost (localhost.localdomain [127.0.0.1]) by mbx12-zne.ulg.ac.be (Postfix) with ESMTP id 65980129E678 for ; Mon, 19 Feb 2018 10:39:39 +0100 (CET) Received: from mbx12-zne.ulg.ac.be ([127.0.0.1]) by localhost (mbx12-zne.ulg.ac.be [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id NqJjwJFxlYnh for ; Mon, 19 Feb 2018 10:39:39 +0100 (CET) Received: from mbx12-zne.ulg.ac.be (mbx12-zne.ulg.ac.be [139.165.32.199]) by mbx12-zne.ulg.ac.be (Postfix) with ESMTP id 522C5129E66E for ; Mon, 19 Feb 2018 10:39:39 +0100 (CET) Date: Mon, 19 Feb 2018 10:39:39 +0100 (CET) From: tom.barbette@uliege.be To: dev@dpdk.org Message-ID: <328301853.77122566.1519033179263.JavaMail.zimbra@uliege.be> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [10.9.168.216] X-Mailer: Zimbra 8.7.1_GA_1670 (ZimbraWebClient - GC64 (Linux)/8.7.1_GA_1670) Thread-Index: cDZbrZ8ST3cpiZhrkxcPt0u8rz6L0w== Thread-Topic: Linking with -ldpdk Subject: [dpdk-dev] Linking with -ldpdk X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2018 09:39:40 -0000 Hi list, I found out that to staticly compile against DPDK using the combined lib, I needed all these options : -I${RTE_SDK}/${RTE_TARGET}/include -L${RTE_SDK}/${RTE_TARGET}/lib -Wl,--whole-archive -ldpdk -Wl,--no-whole-archive -lnuma -ldl -lpthread -lm -lmlx4 -lmlx5 -libverbs The whole-archive makes sense, as we need to embed drivers that wouldn't be found at linking time (failing to include it prevents port discovery). However it leads to missing inclusion. That's why I added all the libs at the end of the line. The mlx4 libs particularly leads me to think that there must be a more programmatic way, portable accross versions of DPDK to find out which libraries referenced in DPDK I should include, right? Morveover if the DPDK user didn't include mlx4, it will fail to compile... What should I use? (the whole rte.extapp.mk DPDK build process is not an option as the build system is rather complex in this project) Or maybe some of these libraries should be included in the dpdk static lib? I use the last git version (but it's the same problem with previous ones). Thanks, Tom