From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 69584A04DD; Sat, 21 Nov 2020 00:43:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C21D7DED; Sat, 21 Nov 2020 00:43:38 +0100 (CET) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by dpdk.org (Postfix) with ESMTP id 920E6160 for ; Sat, 21 Nov 2020 00:43:37 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id h21so12030515wmb.2 for ; Fri, 20 Nov 2020 15:43:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mayadata-io.20150623.gappssmtp.com; s=20150623; h=from:subject:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language; bh=xNkTyfmqE5bYeG7tKjp2GLADZLVwf1loDXQBX0emS0I=; b=F2D+wrJH9j/qFsigJR71PHIXO3SJMnTfg28bcsgJvOngk16J5/nZHKNgfQCTAsr6mh srB38TV+LviJj3JDFPy8UGJemijugyJn+hQae54Sj254rcs0HgQLmOig6n+CiZzzqXd0 OzV+3AanGXOw/g6a68iHte+DCHSz4/YS5X010dER2RvRU9E08wzxE7eMf9QVhJAUIDwS frR7+9La8z8sVGff0hvrmUqG712bnIfqEiMJRjbv0zJ1oHyZ4650a9hxeuQrGluJxkr/ WMXGLl55WHVsvOP2FiwXBjOsXXXx5w26NwcPthzzHGO69v+DSZyab5byRGEcGh+pdj1L OIgg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=xNkTyfmqE5bYeG7tKjp2GLADZLVwf1loDXQBX0emS0I=; b=balhNJk/aUcJgBQuWa3yeBzWbWTVA2G9VOaoZ8pcVSLkdUXmkTf/2jwCPpxtKU3ZUM otGKN1ayUz/YyOmVIPMPSfdU6nLD4h0H50hn8HoFT8YhefBLaPe+wmuNcJiF0w7/eswU 9avZHT22y4ULucwalvjQEHI6rhlhiMTz0abcJGYeA22Kq3lEG1lo/tWQhoaCrNssFs3G UYT3xkMTUhIzrAW4aRSRe7z5tUugTVtm/IOklgbdtTCIx0yaqbDJxkGZMHC7XlDwqlb7 FXJUjGrXeeTH3jaFPPod3aAiT215xEOeNjc8NmXzdwyitzlocyrhgdilI4DxUy7Ft/HL SIBA== X-Gm-Message-State: AOAM531x8CxQ6QijBJ7H66dFFpiEE8ckTDqlmWdP7JiqIR5zFQqOhs0Q 7KKNjP7guDxwixuVgVL8uAlFoiFcT1zHn4hx X-Google-Smtp-Source: ABdhPJw7ci7/FlfKDyFybRylArKI4QAtLORj+C34h3waSLwbg9S0FjtNBDbqd2vX4isDCPJSA2o98g== X-Received: by 2002:a1c:9a12:: with SMTP id c18mr12199789wme.22.1605915815717; Fri, 20 Nov 2020 15:43:35 -0800 (PST) Received: from [192.168.0.33] (cpc98320-croy25-2-0-cust77.19-2.cable.virginm.net. [80.235.134.78]) by smtp.gmail.com with ESMTPSA id d15sm7031734wrx.93.2020.11.20.15.43.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 20 Nov 2020 15:43:35 -0800 (PST) From: Nick Connolly X-Google-Original-From: Nick Connolly To: Tal Shnaiderman , Dmitry Kozlyuk , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam , Tal Shnaiderman Cc: "dev@dpdk.org" References: <20201120211255.24803-1-nick.connolly@mayadata.io> Message-ID: Date: Fri, 20 Nov 2020 23:43:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-GB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] eal/windows: fix link error with MinGW 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > I can't seem to reproduce the link error you've mentioned (I'm building hello_world on master). > can you share more information on how to reproduce it? (MinGW version, build env variables, build OS). > > Thanks, > > Tal. Hi Tal, Sure - latest MinGW-w64 (v8.0.0 I believe, but the versioning isn't too clear to me!).  gcc -v reports: > C:\Users\Nick>c:\MinGW\mingw64\bin\gcc -v > Using built-in specs. > COLLECT_GCC=c:\MinGW\mingw64\bin\gcc > COLLECT_LTO_WRAPPER=c:/MinGW/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/8.1.0/lto-wrapper.exe > Target: x86_64-w64-mingw32 > Configured with: ../../../src/gcc-8.1.0/configure > --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 > --target=x86_64-w64-mingw32 --prefix=/mingw64 > --with-sysroot=/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64 > --enable-shared --enable-static --disable-multilib > --enable-languages=c,c++,fortran,lto --enable-libstdcxx-time=yes > --enable-threads=win32 --enable-libgomp --enable-libatomic > --enable-lto --enable-graphite --enable-checking=release > --enable-fully-dynamic-string --enable-version-specific-runtime-libs > --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-bootstrap > --disable-rpath --disable-win32-registry --disable-nls > --disable-werror --disable-symvers --with-gnu-as --with-gnu-ld > --with-arch=nocona --with-tune=core2 --with-libiconv > --with-system-zlib > --with-gmp=/c/mingw810/prerequisites/x86_64-w64-mingw32-static > --with-mpfr=/c/mingw810/prerequisites/x86_64-w64-mingw32-static > --with-mpc=/c/mingw810/prerequisites/x86_64-w64-mingw32-static > --with-isl=/c/mingw810/prerequisites/x86_64-w64-mingw32-static > --with-pkgversion='x86_64-win32-seh-rev0, Built by MinGW-W64 project' > --with-bugurl=https://sourceforge.net/projects/mingw-w64 CFLAGS='-O2 > -pipe -fno-ident > -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include > -I/c/mingw810/prerequisites/x86_64-zlib-static/include > -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' > CXXFLAGS='-O2 -pipe -fno-ident > -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include > -I/c/mingw810/prerequisites/x86_64-zlib-static/include > -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' > CPPFLAGS=' > -I/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/include > -I/c/mingw810/prerequisites/x86_64-zlib-static/include > -I/c/mingw810/prerequisites/x86_64-w64-mingw32-static/include' > LDFLAGS='-pipe -fno-ident > -L/c/mingw810/x86_64-810-win32-seh-rt_v6-rev0/mingw64/opt/lib > -L/c/mingw810/prerequisites/x86_64-zlib-static/lib > -L/c/mingw810/prerequisites/x86_64-w64-mingw32-static/lib ' > Thread model: win32 > gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project) No special build args, just Meson (0.55.3) with --buildtype==debug -Dexamples=helloworld DPDK builds just fine with both MinGW and Clang, but when I try and use it to build the SPDK the linking fails with MinGW (but works fine with Clang).  The error message is: > CC app/trace_record/trace_record.o >   LINK spdk_trace_record.exe > C:/Users/Nick/Repos/upstream/build/lib/librte_bus_pci.a(bus_pci_windows_pci.c.obj):pci.c:(.rdata$.refptr.GUID_DEVCLASS_NET[.refptr.GUID_DEVCLASS_NET]+0x0): > undefined reference to `GUID_DEVCLASS_NET' As far as I can see this is because the GUID_DEVCLASS_NET structure has not been created within the DPDK object files - it requires INITGUID to be set when devguid.h is included in order to create a 'select any' initialised structure.  Moving devguid.h after defining INITGUID resolves the issue.  Arguably, it would perhaps be better to define INITGUID in the source files that use the guids instead of in a shared header, but I think this can safely be left until after 20.11 is finalized - if there's any impact on the code produced it will be negligible. I haven't worked it through but I suspect the reason it's ok with clang is because of a difference between the Microsoft headers and those shipped with MinGW. Regards, Nick