Skip to contentSkip to conversation

build: fix libm detection in meson

PATCH In review David Marchand 3 participants 7 messages Jan 9, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 build: fix libm detection in meson

Using version 0.47.1, meson is unable to find the math library in Travis for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.

Switching to 0.48.0, the problem disappears.

But we should pass 'm' to find_library instead of 'libm' anyway.

Fixes 98edcbb5ab2f ("eal/windows: introduce Windows support")
---
 config/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
config/meson.build +1 -1
index 01911ecf9..28a57f56f 100644
@@ -115,7 +115,7 @@ add_project_link_arguments('-pthread', language: 'c')
 dpdk_extra_ldflags += '-pthread'
 
 # on some OS, maths functions are in a separate library
-if cc.find_library('libm', required : false).found()
+if cc.find_library('m', required : false).found()
 	# some libs depend on maths lib
 	add_project_link_arguments('-lm', language: 'c')
 	dpdk_extra_ldflags += '-lm'
Signature · 1 line
2.23.0
#1 lore raw

PATCH 2/2 ci: use meson 0.47.1

meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04.
On the other hand, the minimal version supported in dpdk is 0.47.1.

Stick to this version to avoid getting hit by regressions in meson latest shiny release.

1: https://github.com/mesonbuild/meson/issues/6427

---
 .ci/linux-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.ci/linux-setup.sh +1 -1
index dfb9d4a20..38bb88e15 100755
@@ -1,7 +1,7 @@
 #!/bin/sh -xe
 
 # need to install as 'root' since some of the unit tests won't run without it
-sudo python3 -m pip install --upgrade meson
+sudo python3 -m pip install --upgrade 'meson==0.47.1'
 
 # setup hugepages
 cat /proc/meminfo
Signature · 1 line
2.23.0
Acked-by on v1 2/2
#2 lore raw

Re: [dpdk-dev] [PATCH 2/2] ci: use meson 0.47.1

Quoted 21 lines · David Marchand

meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04.
On the other hand, the minimal version supported in dpdk is 0.47.1.

Stick to this version to avoid getting hit by regressions in meson latest shiny release.

1: https://github.com/mesonbuild/meson/issues/6427

---
 .ci/linux-setup.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.ci/linux-setup.sh +0 -0
index dfb9d4a20..38bb88e15 100755

.ci/linux-setup.sh line 5

Quoted 6 lines
.ci/linux-setup.sh +1 -1
@@ -1,7 +1,7 @@
 #!/bin/sh -xe
 
 # need to install as 'root' since some of the unit tests won't run without it
-sudo python3 -m pip install --upgrade meson
+sudo python3 -m pip install --upgrade 'meson==0.47.1'
 
Acked-by on v1 2/2
#3 lore raw

Re: [dpdk-dev] [PATCH 2/2] ci: use meson 0.47.1

In reply to David Marchand
Quoted 7 lines · David Marchand

meson 0.53.0 has a compatibility issue [1] with the python 3.5.2 that comes in Ubuntu 16.04.
On the other hand, the minimal version supported in dpdk is 0.47.1.

Stick to this version to avoid getting hit by regressions in meson latest shiny release.

Quoted 6 lines

1: https://github.com/mesonbuild/meson/issues/6427

---

Acked-by on v1 1/2
#4 lore raw
In reply to David Marchand
Quoted 31 lines · David Marchand

Using version 0.47.1, meson is unable to find the math library in Travis for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.

Switching to 0.48.0, the problem disappears.

But we should pass 'm' to find_library instead of 'libm' anyway.

Fixes 98edcbb5ab2f ("eal/windows: introduce Windows support")
---
 config/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
config/meson.build +1 -1
index 01911ecf9..28a57f56f 100644
@@ -115,7 +115,7 @@ add_project_link_arguments('-pthread', language: 'c')
 dpdk_extra_ldflags += '-pthread'
 
 # on some OS, maths functions are in a separate library
-if cc.find_library('libm', required : false).found()
+if cc.find_library('m', required : false).found()
 	# some libs depend on maths lib
 	add_project_link_arguments('-lm', language: 'c')
 	dpdk_extra_ldflags += '-lm'
Signature · 1 line
2.23.0
#5 lore raw
Quoted 25 lines · Bruce Richardson
Quoted 23 lines · David Marchand

Using version 0.47.1, meson is unable to find the math library in Travis for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.

Switching to 0.48.0, the problem disappears.

But we should pass 'm' to find_library instead of 'libm' anyway.

Fixes 98edcbb5ab2f ("eal/windows: introduce Windows support")
---
 config/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
config/meson.build +0 -0
index 01911ecf9..28a57f56f 100644
@@ -115,7 +115,7 @@ add_project_link_arguments('-pthread', language: 'c')
 dpdk_extra_ldflags += '-pthread'
 
Quoted 9 lines
Quoted 8 lines
config/meson.build +1 -2
 # on some OS, maths functions are in a separate library
-if cc.find_library('libm', required : false).found()
+if cc.find_library('m', required : false).found()
      # some libs depend on maths lib
      add_project_link_arguments('-lm', language: 'c')
      dpdk_extra_ldflags += '-lm'
--

2.23.0

Series applied.

Signature · 1 line
David Marchand
Acked-by on v1 1/2
#6 lore raw
In reply to David Marchand
Quoted 6 lines · David Marchand

Using version 0.47.1, meson is unable to find the math library in Travis for the 32bits job.
Quite surprisingly, this problem is not seen with the 64bits jobs.

Switching to 0.48.0, the problem disappears.

Quoted 7 lines

But we should pass 'm' to find_library instead of 'libm' anyway.

Fixes 98edcbb5ab2f ("eal/windows: introduce Windows support")

---