Re: [Mesa-dev] [PATCH 1/3] Add meson build system

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Wed, 2018-01-03 at 13:31 -0800, Dylan Baker wrote:
> This patch adds a complete meson build system, including tests and
> install. It has the necessary hooks to allow it be used as a subproject
> for other meson based builds such as mesa.

It is failing to build with (autofoo-based builds fine):

[25/109] cc  -Iamdgpu/drm_amdgpu@sha -Iamdgpu -I../amdgpu -I. -I../
- -I../include/drm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64
- -std=gnu99 -DHAVE_CONFIG_H -O2 -g -Wall -Werror=format-security -Wp,-
D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-
size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
- -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fPIC -Wall
- -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith
- -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
- -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-
aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-
style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-
missing-field-initializers '-DAMDGPU_ASIC_ID_TABLE="share/amdgpu.ids"' -MMD -MQ
'amdgpu/drm_amdgpu@sha/amdgpu_asic_id.c.o' -MF 'amdgpu/drm_amdgpu@sha/amdgpu_as
ic_id.c.o.d' -o 'amdgpu/drm_amdgpu@sha/amdgpu_asic_id.c.o' -c
../amdgpu/amdgpu_asic_id.c
FAILED: amdgpu/drm_amdgpu@sha/amdgpu_asic_id.c.o 
cc  -Iamdgpu/drm_amdgpu@sha -Iamdgpu -I../amdgpu -I. -I../ -I../include/drm
- -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=gnu99
- -DHAVE_CONFIG_H -O2 -g -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
- -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-
switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
- -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fPIC -Wall
- -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith
- -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations 
- -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-
aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-
style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-
missing-field-initializers '-DAMDGPU_ASIC_ID_TABLE="share/amdgpu.ids"' -MMD -MQ
'amdgpu/drm_amdgpu@sha/amdgpu_asic_id.c.o' -MF 'amdgpu/drm_amdgpu@sha/amdgpu_as
ic_id.c.o.d' -o 'amdgpu/drm_amdgpu@sha/amdgpu_asic_id.c.o' -c
../amdgpu/amdgpu_asic_id.c
../amdgpu/amdgpu_asic_id.c: In function ‘amdgpu_parse_asic_ids’:
../amdgpu/amdgpu_asic_id.c:122:26: error: ‘AMDGPU_ASIC_ID_TABLE_NUM_ENTRIES’
undeclared (first use in this function); did you mean
‘AMDGPU_VCE_CLOCK_TABLE_ENTRIES’?
  size_t table_max_size = AMDGPU_ASIC_ID_TABLE_NUM_ENTRIES;
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                          AMDGPU_VCE_CLOCK_TABLE_ENTRIES
../amdgpu/amdgpu_asic_id.c:122:26: note: each undeclared identifier is reported
only once for each function it appears in

[...]

> diff --git a/freedreno/meson.build b/freedreno/meson.build
> new file mode 100644
> index 0000000..47d6e44
> --- /dev/null
> +++ b/freedreno/meson.build
> @@ -0,0 +1,82 @@
> [...]
> +if with_freedreno_kgsl != 'false'

Booleans should not compare with strings, so do just `if with_freedreno_kgsl`.

Submitted meson RFE to warn: https://github.com/mesonbuild/meson/issues/2870.

> +  files_freedreno += files(
> +    'kgsl/kgsl_bo.c',
> +    'kgsl/kgsl_device.c',
> +    'kgsl/kgsl_drm.h',
> +    'kgsl/kgsl_pipe.c',
> +    'kgsl/kgsl_priv.h',
> +    'kgsl/kgsl_ringbuffer.c',
> +    'kgsl/msm_kgsl.h',
> +  )
> +endif

[...]

> diff --git a/meson_options.txt b/meson_options.txt
> new file mode 100644
> index 0000000..7c2fa4f
> --- /dev/null
> +++ b/meson_options.txt
> @@ -0,0 +1,38 @@
> [...]
> +option('libkms',      type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('intel',       type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('radeon',      type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('amdgpu',      type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('nouveau',     type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('vmwgfx',      type : 'combo', value : 'true',  choices : ['true',
> 'false', 'auto'])
> +option('omap',        type : 'combo', value : 'false', choices : ['true',
> 'false', 'auto'])
> +option('exynos',      type : 'combo', value : 'false', choices : ['true',
> 'false', 'auto'])
> +option('freedreno',   type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('tegra',       type : 'combo', value : 'false', choices : ['true',
> 'false', 'auto'])
> +option('vc4',         type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('etnaviv',     type : 'combo', value : 'false', choices : ['true',
> 'false', 'auto'])
> +option('cairo_tests', type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('man_pages',   type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('valgrind',    type : 'combo', value : 'auto',  choices : ['true',
> 'false', 'auto'])
> +option('freedreno-kgls',        type : 'boolean', value : false)

Probably using `_` would be better for consistency..

Also, option should be named kgsl, not kgls (note sl vs ls).

> +option('install_test_programs', type : 'boolean', value : false)
> +option('udev',                  type : 'boolean', value : false)

Having description on all those options would be extremely useful 😉

[...]

Still testing it, once will have more results -- will come back.
- -- 
- -Igor Gnatenko
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlpNZbwACgkQaVcUvRu8
X0xuQRAAulgnkHdNb2LCq6R+4A+IwEbyVD3uNIBv0eF0X/k/8w7IT7PcNwdS8VN3
XBrSLqFTxHTsghtMXSDXDW6LqA3Zv8VCkWZb3G/bek4w6iwwHmEVLGawiO1jVlHY
uX7bQEf/bdrM/UnXY1PnBmzmfhIcu6LhAry+pPS0iYxJWgcv6XbFil5fYu+N9T1H
vdlj8WJtZA9u4VhHdqFaf8JN8OwuBC2+87mNvuZMwKF1d4BD9r77WRuhDnyRWzJs
NoxufXz9JPx2YRbg6V8V5V4fsCV5oFpSpkpnTqIasjWlyJXo2Dhatt6oCbtu+ip4
Vf5Nr7WzIbXhT8WAYnLPc8E2mtWK5HG8NhrLJnqY4kdyiJ+w7X0PXKYeBPXRN1NG
zrF+h7Kd4LJvPwh0KMl1idGiGa5Mmr/vF/apIKrMBMvJ++E9zs+sPCNbSjnI3aWe
47LIqTkVxCLjwHIpQqDWZ+bUNanpwFaWtVWm9xvlPcpZ35pP2PqeyZ6abpqykP8b
OSQK9fN0PpiZsfVT25K8SaGvFzUy37lFSs/3cvTFQ+rmKo7xYxj1qbd4xvml0CU8
4IcPcFKRZRMFIE1cecqg7lNxlgfcA7bdrOSbvjHpKNlEUpRZOtNDPjgkx8RWlA3J
x1u8mcARzI5m837isa0eOatVgYXy+Eg86zWxiIy1jGliWaJTvN0=
=Rikj
-----END PGP SIGNATURE-----

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux