DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] DPDK Windows Build
@ 2020-01-29 18:05 Jeremy Plsek
       [not found] ` <CALDO+SbTP6jsAsPyupHsXy2+qJLg5ndu31GLniQJN84=be2bNg@mail.gmail.com>
  2020-02-04 21:51 ` Thomas Monjalon
  0 siblings, 2 replies; 14+ messages in thread
From: Jeremy Plsek @ 2020-01-29 18:05 UTC (permalink / raw)
  To: dev; +Cc: dmitry.kozliuk

Hi Dmitry,

> There is a bug in Meson: '/OPT:REF' must be prefixed with '-Wl,' when using
> Clang with link.exe, because Clang does not recognize '/OPT:REF' as an
> argument to pass to linker, but treats it as a filename instead.
> A patch is not under review: https://github.com/mesonbuild/meson/pull/6483

Thanks for the suggestion. I applied the patch to meson and the OPT 
error is gone and it now compiles.

Thanks!
-- 
Jeremy Plsek
UNH InterOperability Laboratory

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

* Re: [dpdk-dev] DPDK Windows Build
       [not found] ` <CALDO+SbTP6jsAsPyupHsXy2+qJLg5ndu31GLniQJN84=be2bNg@mail.gmail.com>
@ 2020-02-01 11:43   ` Dmitry Kozliuk
  2020-02-03 19:26     ` William Tu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Kozliuk @ 2020-02-01 11:43 UTC (permalink / raw)
  To: William Tu; +Cc: Jeremy Plsek, dev

Hi William,

> Sanity check compile stderr:
> clang.exe: error: linker command failed with exit code 1104 (use -v to
> see invocation)

Please add '-v' flag to Meson invocation and post the output as plain text.
The exact commands you're using will also help.

> Program cat found: YES (C:\MinGW\msys\1.0\bin\cat.EXE)

I suspect MSYS confuses Meson and it may call 'clang.exe' instead of
'clang-cl.exe'. Try excluding MSYS from your PATH.

-- 
Dmitry Kozlyuk

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-01 11:43   ` Dmitry Kozliuk
@ 2020-02-03 19:26     ` William Tu
  2020-02-03 22:08       ` Dmitry Kozlyuk
  0 siblings, 1 reply; 14+ messages in thread
From: William Tu @ 2020-02-03 19:26 UTC (permalink / raw)
  To: Dmitry Kozliuk; +Cc: Jeremy Plsek, dev

On Sat, Feb 1, 2020 at 3:43 AM Dmitry Kozliuk <dmitry.kozliuk@gmail.com> wrote:
>
> Hi William,
>
> > Sanity check compile stderr:
> > clang.exe: error: linker command failed with exit code 1104 (use -v to
> > see invocation)
>
> Please add '-v' flag to Meson invocation and post the output as plain text.
> The exact commands you're using will also help.
>
> > Program cat found: YES (C:\MinGW\msys\1.0\bin\cat.EXE)
>
> I suspect MSYS confuses Meson and it may call 'clang.exe' instead of
> 'clang-cl.exe'. Try excluding MSYS from your PATH.
>
> --
Hi Dmitry,

Thanks for your help. "meson -v" only shows meson's version.
Am I doing it wrong?

C:\dpdk-draft-windows>set CC=clang

C:\dpdk-draft-windows>meson build
The Meson build system
Version: 0.53.1
Source dir: C:\dpdk-draft-windows
Build dir: C:\dpdk-draft-windows\build
Build type: native build
Program cat found: YES (C:\MinGW\msys\1.0\bin\cat.EXE)
Project name:  [1mDPDK [0m
Project version:  [1m19.05.0-rc4 [0m

meson.build:4:0:  [1;31mERROR: [0m Compiler clang can not compile programs.

A full log can be found at
[1mC:\dpdk-draft-windows\build\meson-logs\meson-log.txt [0m

C:\dpdk-draft-windows>meson -v build
0.53.1

Thanks
William

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 19:26     ` William Tu
@ 2020-02-03 22:08       ` Dmitry Kozlyuk
  2020-02-03 22:25         ` William Tu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Kozlyuk @ 2020-02-03 22:08 UTC (permalink / raw)
  To: William Tu; +Cc: Jeremy Plsek, dev

Hi,

> Thanks for your help. "meson -v" only shows meson's version.
> Am I doing it wrong?

It'm my mistake, pardon me. Ninja has '-v' option, Meson doesn't.

> A full log can be found at
> [1mC:\dpdk-draft-windows\build\meson-logs\meson-log.txt [0m

Please post C:\dpdk-draft-windows\build\meson-logs\meson-log.txt.

--
Dmitry Kozlyuk

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 22:08       ` Dmitry Kozlyuk
@ 2020-02-03 22:25         ` William Tu
  2020-02-03 23:02           ` Dmitry Kozlyuk
  0 siblings, 1 reply; 14+ messages in thread
From: William Tu @ 2020-02-03 22:25 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Jeremy Plsek, dev

On Mon, Feb 3, 2020 at 2:08 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Hi,
>
> > Thanks for your help. "meson -v" only shows meson's version.
> > Am I doing it wrong?
>
> It'm my mistake, pardon me. Ninja has '-v' option, Meson doesn't.
>
> > A full log can be found at
> > [1mC:\dpdk-draft-windows\build\meson-logs\meson-log.txt [0m
>
> Please post C:\dpdk-draft-windows\build\meson-logs\meson-log.txt.
>
> --

Hi Dmitry,

Thanks!
I uninstalled my Visual Studio 2017, and use 2019.
The problem disappeared, but now I hit Jeremy's issue
https://github.com/mesonbuild/meson/pull/6483

From the step in
https://mesonbuild.com/Quick-guide.html#installation-from-source
I tried to compile meson by doing:
$ git clone  https://github.com/mesonbuild/meson.git
$ cd meson
$ meson builddir
 ERROR: Neither directory contains a build file meson.build.

How do I generate a meson.build file?

Thanks
William

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 22:25         ` William Tu
@ 2020-02-03 23:02           ` Dmitry Kozlyuk
  2020-02-03 23:26             ` William Tu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Kozlyuk @ 2020-02-03 23:02 UTC (permalink / raw)
  To: William Tu; +Cc: Jeremy Plsek, dev

> From the step in
> https://mesonbuild.com/Quick-guide.html#installation-from-source
> I tried to compile meson by doing:
> $ git clone  https://github.com/mesonbuild/meson.git
> $ cd meson
> $ meson builddir
>  ERROR: Neither directory contains a build file meson.build.
> 
> How do I generate a meson.build file?

I build Meson from Windows command line (not Git Bash) as pip package:

C:\src\meson> python setup.py install --user

You need write permissions for C:\Python, so use elevated command prompt or
an administrator account. To use the new version, make sure C:\Python\Scripts
is in the beginning of your PATH (assuming C:\Python being your Python 3
installation directory).

Don't forget to apply the patch, it's not in upstream yet. You can instead
clone the fork directly:

git clone -b msvc-linker-arg-prefix https://github.com/PlushBeaver/meson.git

-- 
Dmitry Kozlyuk

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 23:02           ` Dmitry Kozlyuk
@ 2020-02-03 23:26             ` William Tu
  2020-02-03 23:43               ` Dmitry Kozliuk
  0 siblings, 1 reply; 14+ messages in thread
From: William Tu @ 2020-02-03 23:26 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Jeremy Plsek, dev

[-- Attachment #1: Type: text/plain, Size: 2895 bytes --]

On Mon, Feb 3, 2020 at 3:03 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> > From the step in
> > https://mesonbuild.com/Quick-guide.html#installation-from-source
> > I tried to compile meson by doing:
> > $ git clone  https://github.com/mesonbuild/meson.git
> > $ cd meson
> > $ meson builddir
> >  ERROR: Neither directory contains a build file meson.build.
> >
> > How do I generate a meson.build file?
>
> I build Meson from Windows command line (not Git Bash) as pip package:
>
> C:\src\meson> python setup.py install --user
>
> You need write permissions for C:\Python, so use elevated command prompt or
> an administrator account. To use the new version, make sure C:\Python\Scripts
> is in the beginning of your PATH (assuming C:\Python being your Python 3
> installation directory).
>
> Don't forget to apply the patch, it's not in upstream yet. You can instead
> clone the fork directly:
>
> git clone -b msvc-linker-arg-prefix https://github.com/PlushBeaver/meson.git
>
> --
Hi Dmitry,

Thanks! I now passed the issue of "'/OPT:REF"
now with "ninja -v", I got another error saying:
C:\dpdk-draft-windows>meson build9
C:\dpdk-draft-windows>cd build9
C:\dpdk-draft-windows\build9>ninja -v
[1/14] clang @lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.obj.rsp
[2/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_errno.c.obj.rsp
[3/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_launch.c.obj.rsp
[4/14] llvm-ar "csrD" lib/librte_kvargs.a @lib/librte_kvargs.a.rsp
[5/14] clang @lib/librte_kvargs-1.dll.rsp
clang.exe: warning: argument unused during compilation: '-pthread'
[-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_kvargs.dll.a and object lib\librte_kvargs.dll.exp
[6/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_lcore.c.obj.rsp
[7/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_log.c.obj.rsp
[8/14] "C:\Python38\Scripts\meson" --internal symbolextractor
lib/librte_kvargs-1.dll
lib/76b5a35@@rte_kvargs@sha/librte_kvargs-1.dll.symbols
[9/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_lcore.c.obj.rsp
[10/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal.c.obj.rsp
[11/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_debug.c.obj.rsp
[12/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_thread.c.obj.rsp
[13/14] llvm-ar "csrD" lib/librte_eal.a @lib/librte_eal.a.rsp
[14/14] clang @lib/librte_eal-10.dll.rsp
clang.exe: warning: argument unused during compilation: '-pthread'
[-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_eal.dll.a and object lib\librte_eal.dll.exp

Do I mess up some linker's configurations?
I attached the meson log, thanks for your help!
William

[-- Attachment #2: dpdk-windows-build-error.txt --]
[-- Type: text/plain, Size: 13303 bytes --]





=== BUILD9 ===
C:\dpdk-draft-windows>meson build9
C:\dpdk-draft-windows>cd build9
C:\dpdk-draft-windows\build9>ninja -v
[1/14] clang @lib/76b5a35@@rte_kvargs@sta/librte_kvargs_rte_kvargs.c.obj.rsp
[2/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_errno.c.obj.rsp
[3/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_launch.c.obj.rsp
[4/14] llvm-ar "csrD" lib/librte_kvargs.a @lib/librte_kvargs.a.rsp
[5/14] clang @lib/librte_kvargs-1.dll.rsp
clang.exe: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_kvargs.dll.a and object lib\librte_kvargs.dll.exp
[6/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_lcore.c.obj.rsp
[7/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_log.c.obj.rsp
[8/14] "C:\Python38\Scripts\meson" --internal symbolextractor lib/librte_kvargs-1.dll lib/76b5a35@@rte_kvargs@sha/librte_kvargs-1.dll.symbols
[9/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_common_eal_common_lcore.c.obj.rsp
[10/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal.c.obj.rsp
[11/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_debug.c.obj.rsp
[12/14] clang @lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_thread.c.obj.rsp
[13/14] llvm-ar "csrD" lib/librte_eal.a @lib/librte_eal.a.rsp
[14/14] clang @lib/librte_eal-10.dll.rsp
clang.exe: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument]
LINK : warning LNK4044: unrecognized option '/-no-as-needed'; ignored
   Creating library lib\librte_eal.dll.a and object lib\librte_eal.dll.exp

///

Build started at 2020-02-03T15:14:10.888590
Main binary: C:\Python38\python.exe
Build Options: 
Python system: Windows
The Meson build system
Version: 0.53.999
Source dir: C:\dpdk-draft-windows
Build dir: C:\dpdk-draft-windows\build9
Build type: native build
Program cat found: NO
Program more found: YES (C:\WINDOWS\system32\more.COM)
Running command: C:\WINDOWS\system32\more.COM C:\dpdk-draft-windows\VERSION
--- stdout ---
19.05.0-rc4

--- stderr ---


Project name: DPDK
Project version: 19.05.0-rc4
No CFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C compiler: clang
Is cross compiler: False.
Sanity check compiler command line: clang C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.c -o C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.exe -Wl,/MDd -pipe
Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option '/MDd'; ignored

-----
Sanity check compile stderr:

-----
Running test binary command: C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.exe
C compiler for the build machine: clang (clang 7.0.1 "clang version 7.0.1 (tags/RELEASE_701/final)")
C linker for the build machine: clang link 14.24.28316.0
No CFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C compiler: clang
Is cross compiler: False.
Sanity check compiler command line: clang C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.c -o C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.exe -Wl,/MDd -pipe
Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option '/MDd'; ignored

-----
Sanity check compile stderr:

-----
Running test binary command: C:\dpdk-draft-windows\build9\meson-private\sanitycheckc.exe
C compiler for the host machine: clang (clang 7.0.1 "clang version 7.0.1 (tags/RELEASE_701/final)")
C linker for the host machine: clang link 14.24.28316.0
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh C:\dpdk-draft-windows\config\../buildtools/symlink-drivers-solibs.sh)
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmpynfrrx5q
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmpynfrrx5q\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmpynfrrx5q\output.exe -pipe -Wl,/MDd -O0 

Code:
 #include<stdio.h>
        
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored

Compiler stderr:
 
Program stdout:

8

Program stderr:


Checking for size of "void *" : 8
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmpmqg5yx0i
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmpmqg5yx0i\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmpmqg5yx0i\output.exe -pipe -Wl,/MDd -O0 -llibm 

Code:
 int main(void) { return 0; }
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored
LINK : fatal error LNK1181: cannot open input file 'libm.lib'

Compiler stderr:
 clang.exe: error: linker command failed with exit code 1181 (use -v to see invocation)

Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmp6wxb3jn4
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmp6wxb3jn4\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmp6wxb3jn4\output.exe -pipe -Wl,/MDd -O0 

Code:
 #include<stdio.h>
        
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored

Compiler stderr:
 
Program stdout:

8

Program stderr:


Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmprm2pcx_2
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmprm2pcx_2\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmprm2pcx_2\output.obj -pipe -c -O0 --print-search-dirs 

Code:
 
Compiler stdout:
 programs: =C:\LLVM\bin
libraries: =C:\LLVM\lib\clang\7.0.1

Compiler stderr:
 
Library libm found: NO
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmppbheo9sk
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmppbheo9sk\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmppbheo9sk\output.exe -pipe -Wl,/MDd -O0 -lnuma 

Code:
 int main(void) { return 0; }
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored
LINK : fatal error LNK1181: cannot open input file 'numa.lib'

Compiler stderr:
 clang.exe: error: linker command failed with exit code 1181 (use -v to see invocation)

Library numa found: NO
Pkg-config binary for MachineChoice.HOST is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Trying pkg-config binary pkg-config for machine MachineChoice.HOST at [None]
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Pkg-config binary for machine MachineChoice.HOST not found. Giving up.
CMake binary for MachineChoice.HOST is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Trying CMake binary cmake for machine MachineChoice.HOST at [None]
Did not find CMake 'cmake'
Found CMake: NO
No CMake binary for machine MachineChoice.HOST not found. Giving up.
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmph93fxaqm
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmph93fxaqm\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmph93fxaqm\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wsign-compare 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wsign-compare: YES 
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmpqk197ga5
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmpqk197ga5\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmpqk197ga5\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wcast-qual 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wcast-qual: YES 
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmpkc6_66g3
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmpkc6_66g3\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmpkc6_66g3\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wno-address-of-packed-member -Waddress-of-packed-member 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wno-address-of-packed-member: YES 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmpo9i1f3j_
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmpo9i1f3j_\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __SSE4_2__
        # define __SSE4_2__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__SSE4_2__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__SSE4_2__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmppegvgphc
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmppegvgphc\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AES__
        # define __AES__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AES__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AES__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp2zg_besz
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp2zg_besz\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __PCLMUL__
        # define __PCLMUL__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__PCLMUL__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__PCLMUL__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp_ghl6pz0
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp_ghl6pz0\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX__
        # define __AVX__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AVX__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmpqu4axgn6
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmpqu4axgn6\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX2__
        # define __AVX2__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX2__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AVX2__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmpyiek92as
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmpyiek92as\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX512F__
        # define __AVX512F__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX512F__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"

Compiler stderr:
 
Fetching value of define "__AVX512F__" :  
Running compile:
Working directory:  C:\dpdk-draft-windows\build9\meson-private\tmpazv2w9iy
Command line:  clang C:\dpdk-draft-windows\build9\meson-private\tmpazv2w9iy\testfile.c -o C:\dpdk-draft-windows\build9\meson-private\tmpazv2w9iy\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wno-format-truncation -Wformat-truncation 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 error: unknown warning option '-Wno-format-truncation' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wformat-truncation' [-Werror,-Wunknown-warning-option]

Compiler for C supports arguments -Wno-format-truncation: NO 
Program doxygen found: NO
Program sphinx-build found: NO
Configuring rte_build_config.h using configuration
Message: 
=================
Libraries Enabled
=================

libs:
	kvargs, eal, 

Message: 
===============
Drivers Enabled
===============


Build targets in project: 5

Found ninja.EXE-1.9.0 at C:\Meson\ninja.EXE

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 23:26             ` William Tu
@ 2020-02-03 23:43               ` Dmitry Kozliuk
  2020-02-04  0:55                 ` William Tu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Kozliuk @ 2020-02-03 23:43 UTC (permalink / raw)
  To: William Tu; +Cc: Jeremy Plsek, dev

>
> Do I mess up some linker's configurations?
> I attached the meson log, thanks for your help!


Those are not errors, just harmless warnings. You can now build and run an
example program (rerun meson with -Dexamples=helloworld per Windows Getting
Started Guide).

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-03 23:43               ` Dmitry Kozliuk
@ 2020-02-04  0:55                 ` William Tu
  2020-02-04  6:16                   ` Dmitry Kozlyuk
  0 siblings, 1 reply; 14+ messages in thread
From: William Tu @ 2020-02-04  0:55 UTC (permalink / raw)
  To: Dmitry Kozliuk; +Cc: Jeremy Plsek, dev

[-- Attachment #1: Type: text/plain, Size: 2133 bytes --]

On Mon, Feb 3, 2020 at 3:43 PM Dmitry Kozliuk <dmitry.kozliuk@gmail.com> wrote:
>>
>> Do I mess up some linker's configurations?
>> I attached the meson log, thanks for your help!
>
>
> Those are not errors, just harmless warnings. You can now build and run an example program (rerun meson with -Dexamples=helloworld per Windows Getting Started Guide).

Hi Dmitry,

Thanks. However with -Dexamples=helloworld, it shows another error:
C:\dpdk-draft-windows>meson -Dexamples=helloworld build11
The Meson build system
Version: 0.53.999
Source dir: C:\dpdk-draft-windows
Build dir: C:\dpdk-draft-windows\build11
Build type: native build
Program cat found: NO
Program more found: YES (C:\WINDOWS\system32\more.COM)
Project name: DPDK
Project version: 19.05.0-rc4
C compiler for the host machine: clang (clang 7.0.1 "clang version
7.0.1 (tags/RELEASE_701/final)")
C linker for the host machine: clang link 14.24.28316.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh
C:\dpdk-draft-windows\config\../buildtools/symlink-drivers-solibs.sh)
Checking for size of "void *" : 8
Library libm found: NO
Library numa found: NO
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wno-address-of-packed-member: YES
Fetching value of define "__SSE4_2__" : 1
Fetching value of define "__AES__" : 1
Fetching value of define "__PCLMUL__" : 1
Fetching value of define "__AVX__" : 1
Fetching value of define "__AVX2__" : 1
Fetching value of define "__AVX512F__" :
Compiler for C supports arguments -Wno-format-truncation: NO
Program doxygen found: NO
Program sphinx-build found: NO
Library execinfo found: NO

examples\meson.build:11:0: ERROR: Program or command 'sh' not found or
not executable

A full log can be found at
C:\dpdk-draft-windows\build11\meson-logs\meson-log.txt

Do I need to install "sh"?
Thanks
William

[-- Attachment #2: meson-log.txt --]
[-- Type: text/plain, Size: 12020 bytes --]

Build started at 2020-02-03T16:52:14.471565
Main binary: C:\Python38\python.exe
Build Options: -Dexamples=helloworld
Python system: Windows
The Meson build system
Version: 0.53.999
Source dir: C:\dpdk-draft-windows
Build dir: C:\dpdk-draft-windows\build11
Build type: native build
Program cat found: NO
Program more found: YES (C:\WINDOWS\system32\more.COM)
Running command: C:\WINDOWS\system32\more.COM C:\dpdk-draft-windows\VERSION
--- stdout ---
19.05.0-rc4

--- stderr ---


Project name: DPDK
Project version: 19.05.0-rc4
No CFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C compiler: clang
Is cross compiler: False.
Sanity check compiler command line: clang C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.c -o C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.exe -Wl,/MDd -pipe
Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option '/MDd'; ignored

-----
Sanity check compile stderr:

-----
Running test binary command: C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.exe
C compiler for the build machine: clang (clang 7.0.1 "clang version 7.0.1 (tags/RELEASE_701/final)")
C linker for the build machine: clang link 14.24.28316.0
No CFLAGS in the environment, not changing global flags.
No LDFLAGS in the environment, not changing global flags.
No CPPFLAGS in the environment, not changing global flags.
Sanity testing C compiler: clang
Is cross compiler: False.
Sanity check compiler command line: clang C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.c -o C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.exe -Wl,/MDd -pipe
Sanity check compile stdout:
LINK : warning LNK4044: unrecognized option '/MDd'; ignored

-----
Sanity check compile stderr:

-----
Running test binary command: C:\dpdk-draft-windows\build11\meson-private\sanitycheckc.exe
C compiler for the host machine: clang (clang 7.0.1 "clang version 7.0.1 (tags/RELEASE_701/final)")
C linker for the host machine: clang link 14.24.28316.0
Build machine cpu family: x86_64
Build machine cpu: x86_64
Host machine cpu family: x86_64
Host machine cpu: x86_64
Target machine cpu family: x86_64
Target machine cpu: x86_64
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh C:\dpdk-draft-windows\config\../buildtools/symlink-drivers-solibs.sh)
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmpyv_1ax7e
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmpyv_1ax7e\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmpyv_1ax7e\output.exe -pipe -Wl,/MDd -O0 

Code:
 #include<stdio.h>
        
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored

Compiler stderr:
 
Program stdout:

8

Program stderr:


Checking for size of "void *" : 8
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp6hlm9j1v
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp6hlm9j1v\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp6hlm9j1v\output.exe -pipe -Wl,/MDd -O0 -llibm 

Code:
 int main(void) { return 0; }
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored
LINK : fatal error LNK1181: cannot open input file 'libm.lib'

Compiler stderr:
 clang.exe: error: linker command failed with exit code 1181 (use -v to see invocation)

Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmpa7k5ljh3
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmpa7k5ljh3\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmpa7k5ljh3\output.exe -pipe -Wl,/MDd -O0 

Code:
 #include<stdio.h>
        
        int main(void) {
            printf("%ld\n", (long)(sizeof(void *)));
            return 0;
        };
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored

Compiler stderr:
 
Program stdout:

8

Program stderr:


Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp2p5qh20j
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp2p5qh20j\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp2p5qh20j\output.obj -pipe -c -O0 --print-search-dirs 

Code:
 
Compiler stdout:
 programs: =C:\LLVM\bin
libraries: =C:\LLVM\lib\clang\7.0.1

Compiler stderr:
 
Library libm found: NO
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmpewifo72o
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmpewifo72o\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmpewifo72o\output.exe -pipe -Wl,/MDd -O0 -lnuma 

Code:
 int main(void) { return 0; }
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored
LINK : fatal error LNK1181: cannot open input file 'numa.lib'

Compiler stderr:
 clang.exe: error: linker command failed with exit code 1181 (use -v to see invocation)

Library numa found: NO
Pkg-config binary for MachineChoice.HOST is not cached.
Pkg-config binary missing from cross or native file, or env var undefined.
Trying a default Pkg-config fallback at pkg-config
Trying pkg-config binary pkg-config for machine MachineChoice.HOST at [None]
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Pkg-config binary for machine MachineChoice.HOST not found. Giving up.
CMake binary for MachineChoice.HOST is not cached
CMake binary missing from cross or native file, or env var undefined.
Trying a default CMake fallback at cmake
Trying CMake binary cmake for machine MachineChoice.HOST at [None]
Did not find CMake 'cmake'
Found CMake: NO
No CMake binary for machine MachineChoice.HOST not found. Giving up.
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp6q6sp5y0
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp6q6sp5y0\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp6q6sp5y0\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wsign-compare 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wsign-compare: YES 
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmppl9wme13
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmppl9wme13\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmppl9wme13\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wcast-qual 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wcast-qual: YES 
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp7g7vi9yh
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp7g7vi9yh\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp7g7vi9yh\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wno-address-of-packed-member -Waddress-of-packed-member 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 
Compiler for C supports arguments -Wno-address-of-packed-member: YES 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmpon0h4h0r
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmpon0h4h0r\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __SSE4_2__
        # define __SSE4_2__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__SSE4_2__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__SSE4_2__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp6o2cobsj
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp6o2cobsj\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AES__
        # define __AES__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AES__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AES__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmpweagj2i7
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmpweagj2i7\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __PCLMUL__
        # define __PCLMUL__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__PCLMUL__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__PCLMUL__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp4vssyigl
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp4vssyigl\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX__
        # define __AVX__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AVX__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp77itg2qa
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp77itg2qa\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX2__
        # define __AVX2__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX2__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"
1

Compiler stderr:
 
Fetching value of define "__AVX2__" : 1 
Running compile:
Working directory:  C:\Users\CHENGC~1\AppData\Local\Temp\tmp5zymf20g
Command line:  clang C:\Users\CHENGC~1\AppData\Local\Temp\tmp5zymf20g\testfile.c -pipe -E -P -P -O0 -march=native 

Code:
 
        
        #ifndef __AVX512F__
        # define __AVX512F__
        #endif
        "MESON_GET_DEFINE_DELIMITER"
__AVX512F__
Compiler stdout:
 




        "MESON_GET_DEFINE_DELIMITER"

Compiler stderr:
 
Fetching value of define "__AVX512F__" :  
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp0ppxwe3l
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp0ppxwe3l\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp0ppxwe3l\output.obj -pipe -c -O0 -Werror=unknown-warning-option -Werror=unused-command-line-argument -Werror=ignored-optimization-argument -Wno-format-truncation -Wformat-truncation 

Code:
 int i;

Compiler stdout:
 
Compiler stderr:
 error: unknown warning option '-Wno-format-truncation' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wformat-truncation' [-Werror,-Wunknown-warning-option]

Compiler for C supports arguments -Wno-format-truncation: NO 
Program doxygen found: NO
Program sphinx-build found: NO
Running compile:
Working directory:  C:\dpdk-draft-windows\build11\meson-private\tmp9gngcbub
Command line:  clang C:\dpdk-draft-windows\build11\meson-private\tmp9gngcbub\testfile.c -o C:\dpdk-draft-windows\build11\meson-private\tmp9gngcbub\output.exe -pipe -Wl,/MDd -O0 -lexecinfo 

Code:
 int main(void) { return 0; }
Compiler stdout:
 LINK : warning LNK4044: unrecognized option '/MDd'; ignored
LINK : fatal error LNK1181: cannot open input file 'execinfo.lib'

Compiler stderr:
 clang.exe: error: linker command failed with exit code 1181 (use -v to see invocation)

Library execinfo found: NO

examples\meson.build:11:0: ERROR: Program or command 'sh' not found or not executable

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-04  0:55                 ` William Tu
@ 2020-02-04  6:16                   ` Dmitry Kozlyuk
  2020-02-04 20:58                     ` William Tu
  0 siblings, 1 reply; 14+ messages in thread
From: Dmitry Kozlyuk @ 2020-02-04  6:16 UTC (permalink / raw)
  To: William Tu; +Cc: Jeremy Plsek, dev

Hi William,

> examples\meson.build:11:0: ERROR: Program or command 'sh' not found or
> not executable
> 
> A full log can be found at
> C:\dpdk-draft-windows\build11\meson-logs\meson-log.txt
> 
> Do I need to install "sh"?

No, you shouldn't have to, if you're building "master" branch of "dpdk"
repository (https://git.dpdk.org/dpdk/). I noticed your working copy is named
"dpdk-draft-windows", are you trying to build from that repo instead
(https://git.dpdk.org/draft/dpdk-draft-windows/)? If so, its build system
only supports Windows via MSBuild and ICC, according to that repo docs. To
build current DPDK on Windows, you should be using "dpdk" repo.

-- 
Dmitry Kozlyuk

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-02-04  6:16                   ` Dmitry Kozlyuk
@ 2020-02-04 20:58                     ` William Tu
  0 siblings, 0 replies; 14+ messages in thread
From: William Tu @ 2020-02-04 20:58 UTC (permalink / raw)
  To: Dmitry Kozlyuk; +Cc: Jeremy Plsek, dev

On Mon, Feb 3, 2020 at 10:16 PM Dmitry Kozlyuk <dmitry.kozliuk@gmail.com> wrote:
>
> Hi William,
>
> > examples\meson.build:11:0: ERROR: Program or command 'sh' not found or
> > not executable
> >
> > A full log can be found at
> > C:\dpdk-draft-windows\build11\meson-logs\meson-log.txt
> >
> > Do I need to install "sh"?
>
> No, you shouldn't have to, if you're building "master" branch of "dpdk"
> repository (https://git.dpdk.org/dpdk/). I noticed your working copy is named
> "dpdk-draft-windows", are you trying to build from that repo instead
> (https://git.dpdk.org/draft/dpdk-draft-windows/)? If so, its build system
> only supports Windows via MSBuild and ICC, according to that repo docs. To
> build current DPDK on Windows, you should be using "dpdk" repo.
>
Hi  Dmitry,

Thanks for the information. Now I switch to dpdk repo and it works!
c:\dpdk\build2\examples>dpdk-helloworld.exe
EAL: Detected 2 lcore(s)
EAL: Detected 1 NUMA nodes
hello from core 1
hello from core 0

Regards,
William

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

* Re: [dpdk-dev] DPDK Windows Build
  2020-01-29 18:05 [dpdk-dev] DPDK Windows Build Jeremy Plsek
       [not found] ` <CALDO+SbTP6jsAsPyupHsXy2+qJLg5ndu31GLniQJN84=be2bNg@mail.gmail.com>
@ 2020-02-04 21:51 ` Thomas Monjalon
  1 sibling, 0 replies; 14+ messages in thread
From: Thomas Monjalon @ 2020-02-04 21:51 UTC (permalink / raw)
  To: dmitry.kozliuk
  Cc: dev, Jeremy Plsek, pallavi.kadam, ranjit.menon,
	harini.ramakrishnan, Tal Shnaiderman

29/01/2020 19:05, Jeremy Plsek:
> Hi Dmitry,
> 
> > There is a bug in Meson: '/OPT:REF' must be prefixed with '-Wl,' when using
> > Clang with link.exe, because Clang does not recognize '/OPT:REF' as an
> > argument to pass to linker, but treats it as a filename instead.
> > A patch is not under review: https://github.com/mesonbuild/meson/pull/6483
> 
> Thanks for the suggestion. I applied the patch to meson and the OPT 
> error is gone and it now compiles.
> 
> Thanks!

Wonderful, thanks Dmitry for the patch in meson.

Please would you like to add a note with a link to the patch in the DPDK doc?



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

* Re: [dpdk-dev] DPDK Windows Build
  2020-01-28 16:42 Jeremy Plsek
@ 2020-01-28 21:36 ` Dmitry Kozliuk
  0 siblings, 0 replies; 14+ messages in thread
From: Dmitry Kozliuk @ 2020-01-28 21:36 UTC (permalink / raw)
  To: dev

Hello Jeremy,

> clang: error: no such file or directory: '/OPT:REF'

There is a bug in Meson: '/OPT:REF' must be prefixed with '-Wl,' when using
Clang with link.exe, because Clang does not recognize '/OPT:REF' as an
argument to pass to linker, but treats it as a filename instead.
A patch is not under review: https://github.com/mesonbuild/meson/pull/6483
I was able to successfully build DPDK after applying this patch to Meson.

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

* [dpdk-dev] DPDK Windows Build
@ 2020-01-28 16:42 Jeremy Plsek
  2020-01-28 21:36 ` Dmitry Kozliuk
  0 siblings, 1 reply; 14+ messages in thread
From: Jeremy Plsek @ 2020-01-28 16:42 UTC (permalink / raw)
  To: dev; +Cc: dpdklab, harini.ramakrishnan, ocardona, Kadam, Pallavi, Menon, Ranjit

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Hello,

I'm trying to build DPDK on Windows for the DPDK Community Lab CI.

I have a mostly fresh install of Windows Server 2019 and I mostly
followed https://doc.dpdk.org/guides/windows_gsg/build_dpdk.html

But I'm having trouble compiling it.

I've attached logs for both clang 7 and clang 9.

Any help or suggestions would be appreciated.

Thanks
-- 
Jeremy Plsek
UNH InterOperability Laboratory

[-- Attachment #2: windows-clang7.txt --]
[-- Type: text/plain, Size: 5329 bytes --]


builder@WIN-2IEI98HV07T C:\Users\builder\dpdk>meson -Dexamples=helloworld build
The Meson build system
Version: 0.52.1
Source dir: C:\Users\builder\dpdk
Build dir: C:\Users\builder\dpdk\build
Build type: native build
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Project name: DPDK
Project version: 20.02.0-rc1
C compiler for the host machine: clang (clang 7.0.1 "clang version 7.0.1 (tags/RELEASE_701/final)")
C linker for the host machine: link 14.24.28314.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh C:\Users\builder\dpdk\config\../buildtools/symlink-drivers-solibs.sh)
WARNING: No include directory found parsing "clang -xc -E -v -" output
Checking for size of "void *" : 8
Library m found: NO
Library numa found: NO
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
pcap-config found: NO
Run-time dependency pcap found: NO (tried pkgconfig and config-tool)
Compiler for C supports arguments -Wextra: YES
WARNING: Consider using the builtin warning_level option instead of adding warning flags by hand.
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wdeprecated: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-address-of-packed-member: YES
Compiler for C supports arguments -Wno-packed-not-aligned: NO
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Fetching value of define "__SSE4_2__" : 1
Fetching value of define "__AES__" : 1
Fetching value of define "__PCLMUL__" : 1
Fetching value of define "__AVX__" : 1
Fetching value of define "__AVX2__" :
Fetching value of define "__AVX512F__" :
Fetching value of define "__RDRND__" : 1
Fetching value of define "__RDSEED__" :
Program gen-pmdinfo-cfile.sh found: YES (sh C:\Users\builder\dpdk\buildtools\gen-pmdinfo-cfile.sh)
Program check-experimental-syms.sh found: YES (sh C:\Users\builder\dpdk\buildtools\check-experimental-syms.sh)
Program python3 found: YES (C:\Program Files\Meson\meson.exe runpython)
Program grep found: NO
Program findstr found: YES (C:\Windows\system32\findstr.EXE)
Compiler for C supports arguments -Wno-format-truncation: NO
Message: lib/librte_kvargs: Defining dependency "kvargs"
Checking for function "getentropy" : NO
Message: lib/librte_eal: Defining dependency "eal"
Program doxygen found: NO
Program sphinx-build found: NO
Library execinfo found: NO
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Configuring rte_build_config.h using configuration
Message:
=================
Libraries Enabled
=================

libs:
        kvargs, eal,

Message:
===============
Drivers Enabled
===============


Message:
=================
Content Skipped
=================

libs:

drivers:


Build targets in project: 8
Found ninja.EXE-1.9.0 at "C:\Program Files\Meson\ninja.EXE"

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk>cd build

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk\build>ninja
[3/18] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_debug.c.obj.
../lib/librte_eal/windows/eal/eal_debug.c:16:42: warning: format string is not a string literal [-Wformat-nonliteral]
        rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);
                                                ^~~~~~
../lib/librte_eal/windows/eal/eal_debug.c:10:1: warning: no previous prototype for function '__rte_panic' [-Wmissing-prototypes]
__rte_panic(const char *funcname, const char *format, ...)
^
2 warnings generated.
[10/18] Linking target lib/librte_kvargs-0.200.dll.
FAILED: lib/librte_kvargs-0.200.dll
clang @lib/librte_kvargs-0.200.dll.rsp
clang.exe: error: no such file or directory: '/OPT:REF'
[13/18] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_lcore.c.obj.
../lib/librte_eal/windows/eal/eal_lcore.c:79:1: warning: no previous prototype for function 'eal_cpu_detected' [-Wmissing-prototypes]
eal_cpu_detected(unsigned int lcore_id)
^
../lib/librte_eal/windows/eal/eal_lcore.c:88:1: warning: no previous prototype for function 'eal_cpu_socket_id' [-Wmissing-prototypes]
eal_cpu_socket_id(unsigned int lcore_id)
^
../lib/librte_eal/windows/eal/eal_lcore.c:97:1: warning: no previous prototype for function 'eal_cpu_core_id' [-Wmissing-prototypes]
eal_cpu_core_id(unsigned int lcore_id)
^
3 warnings generated.
[14/18] Compiling C object examples/c590b3c@@dpdk-helloworld@exe/helloworld_main.c.obj.
ninja: build stopped: subcommand failed.

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk\build>

[-- Attachment #3: windows-clang9.txt --]
[-- Type: text/plain, Size: 5974 bytes --]


builder@WIN-2IEI98HV07T C:\Users\builder\dpdk>meson -Dexamples=helloworld build
The Meson build system
Version: 0.52.1
Source dir: C:\Users\builder\dpdk
Build dir: C:\Users\builder\dpdk\build
Build type: native build
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Project name: DPDK
Project version: 20.02.0-rc1
C compiler for the host machine: clang (clang 9.0.0 "clang version 9.0.0 (tags/RELEASE_900/final)")
C linker for the host machine: link 14.24.28314.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program cat found: NO
Program more found: YES (C:\Windows\system32\more.COM)
Program ../buildtools/symlink-drivers-solibs.sh found: YES (sh C:\Users\builder\dpdk\config\../buildtools/symlink-drivers-solibs.sh)
WARNING: No include directory found parsing "clang -xc -E -v -" output
Checking for size of "void *" : 8
Library m found: NO
Library numa found: NO
Did not find pkg-config by name 'pkg-config'
Found Pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency libbsd found: NO (tried pkgconfig and cmake)
pcap-config found: NO
Run-time dependency pcap found: NO (tried pkgconfig and config-tool)
Compiler for C supports arguments -Wextra: YES
WARNING: Consider using the builtin warning_level option instead of adding warning flags by hand.
Compiler for C supports arguments -Wcast-qual: YES
Compiler for C supports arguments -Wdeprecated: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-declarations: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wwrite-strings: YES
Compiler for C supports arguments -Wno-address-of-packed-member: YES
Compiler for C supports arguments -Wno-packed-not-aligned: NO
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Fetching value of define "__SSE4_2__" : 1
Fetching value of define "__AES__" : 1
Fetching value of define "__PCLMUL__" : 1
Fetching value of define "__AVX__" : 1
Fetching value of define "__AVX2__" :
Fetching value of define "__AVX512F__" :
Fetching value of define "__RDRND__" : 1
Fetching value of define "__RDSEED__" :
Program gen-pmdinfo-cfile.sh found: YES (sh C:\Users\builder\dpdk\buildtools\gen-pmdinfo-cfile.sh)
Program check-experimental-syms.sh found: YES (sh C:\Users\builder\dpdk\buildtools\check-experimental-syms.sh)
Program python3 found: YES (C:\Program Files\Meson\meson.exe runpython)
Program grep found: NO
Program findstr found: YES (C:\Windows\system32\findstr.EXE)
Compiler for C supports arguments -Wno-format-truncation: NO
Message: lib/librte_kvargs: Defining dependency "kvargs"
Checking for function "getentropy" : NO
Message: lib/librte_eal: Defining dependency "eal"
Program doxygen found: NO
Program sphinx-build found: NO
Library execinfo found: NO
Compiler for C supports arguments -Wno-format-truncation: NO (cached)
Configuring rte_build_config.h using configuration
Message:
=================
Libraries Enabled
=================

libs:
        kvargs, eal,

Message:
===============
Drivers Enabled
===============


Message:
=================
Content Skipped
=================

libs:

drivers:


Build targets in project: 8
Found ninja.EXE-1.9.0 at "C:\Program Files\Meson\ninja.EXE"

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk>cd build

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk\build>ninja
[2/18] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_debug.c.obj.
../lib/librte_eal/windows/eal/eal_debug.c:16:42: warning: format string is not a string literal [-Wformat-nonliteral]
        rte_vlog(RTE_LOG_CRIT, RTE_LOGTYPE_EAL, format, ap);
                                                ^~~~~~
../lib/librte_eal/windows/eal/eal_debug.c:10:1: warning: no previous prototype for function '__rte_panic' [-Wmissing-prototypes]
__rte_panic(const char *funcname, const char *format, ...)
^
../lib/librte_eal/windows/eal/eal_debug.c:9:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void
^
static
2 warnings generated.
[9/18] Linking target lib/librte_kvargs-0.200.dll.
FAILED: lib/librte_kvargs-0.200.dll
clang @lib/librte_kvargs-0.200.dll.rsp
clang: error: no such file or directory: '/OPT:REF'
[13/18] Compiling C object lib/76b5a35@@rte_eal@sta/librte_eal_windows_eal_eal_lcore.c.obj.
../lib/librte_eal/windows/eal/eal_lcore.c:79:1: warning: no previous prototype for function 'eal_cpu_detected' [-Wmissing-prototypes]
eal_cpu_detected(unsigned int lcore_id)
^
../lib/librte_eal/windows/eal/eal_lcore.c:78:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int
^
static
../lib/librte_eal/windows/eal/eal_lcore.c:88:1: warning: no previous prototype for function 'eal_cpu_socket_id' [-Wmissing-prototypes]
eal_cpu_socket_id(unsigned int lcore_id)
^
../lib/librte_eal/windows/eal/eal_lcore.c:87:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned
^
static
../lib/librte_eal/windows/eal/eal_lcore.c:97:1: warning: no previous prototype for function 'eal_cpu_core_id' [-Wmissing-prototypes]
eal_cpu_core_id(unsigned int lcore_id)
^
../lib/librte_eal/windows/eal/eal_lcore.c:96:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned
^
static
3 warnings generated.
[14/18] Compiling C object examples/c590b3c@@dpdk-helloworld@exe/helloworld_main.c.obj.
ninja: build stopped: subcommand failed.

builder@WIN-2IEI98HV07T C:\Users\builder\dpdk\build>

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

end of thread, other threads:[~2020-02-04 21:51 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 18:05 [dpdk-dev] DPDK Windows Build Jeremy Plsek
     [not found] ` <CALDO+SbTP6jsAsPyupHsXy2+qJLg5ndu31GLniQJN84=be2bNg@mail.gmail.com>
2020-02-01 11:43   ` Dmitry Kozliuk
2020-02-03 19:26     ` William Tu
2020-02-03 22:08       ` Dmitry Kozlyuk
2020-02-03 22:25         ` William Tu
2020-02-03 23:02           ` Dmitry Kozlyuk
2020-02-03 23:26             ` William Tu
2020-02-03 23:43               ` Dmitry Kozliuk
2020-02-04  0:55                 ` William Tu
2020-02-04  6:16                   ` Dmitry Kozlyuk
2020-02-04 20:58                     ` William Tu
2020-02-04 21:51 ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2020-01-28 16:42 Jeremy Plsek
2020-01-28 21:36 ` Dmitry Kozliuk

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).