Skip to contentSkip to conversation

configure.ac: pthread-stubs not present on OpenBSD

PATCH In review Jonathan Gray 3 participants 7 messages Feb 20, 2018 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure.ac: pthread-stubs not present on OpenBSD

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index 35378b33..d024fcd8 100644
@@ -65,10 +65,10 @@ AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
-dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
+dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
-linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*)
     pthread_stubs_possible="no"
     ;;
 * )
Signature · 6 lines
2.16.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -2
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []

---->8----

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

Quoted 26 lines
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +2 -2
index 35378b33..d024fcd8 100644
@@ -65,10 +65,10 @@ AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
-dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
+dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
-linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*)
     pthread_stubs_possible="no"
     ;;
 * )
Signature · 1 line
2.16.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
Quoted 25 lines · Eric Engestrom
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -3
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []
---->8----
Quoted 3 lines

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

An almost identical patch was sent to the Mesa list. I don't have commit access to either repository so if you could push it that would be great.

We can't take a build dependency on python for the xserver and related parts in OpenBSD so I have no interest in meson and very much hope autoconf remains otherwise it is back to writing custom makefiles for everything. The meson patch at least reads fine but I have not tried it.

Quoted 15 lines
Quoted 15 lines
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +0 -0
index 35378b33..d024fcd8 100644
@@ -65,10 +65,10 @@ AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
Quoted 12 lines
Quoted 12 lines
configure.ac +2 -2
-dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
+dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
-linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*)
     pthread_stubs_possible="no"
     ;;
 * )
Signature · 1 line
2.16.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 26 lines · Jonathan Gray
Quoted 25 lines · Eric Engestrom
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -3
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []
---->8----
Quoted 7 lines
Quoted 3 lines

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

An almost identical patch was sent to the Mesa list. I don't have commit access to either repository so if you could push it that would be great.

Saw it and it is also r-b'ed; I'll push them later today :)

Quoted 5 lines

We can't take a build dependency on python for the xserver and related parts in OpenBSD so I have no interest in meson and very much hope autoconf remains otherwise it is back to writing custom makefiles for everything.

Hmm, the idea was to get rid of autotools when the meson.build files have been tested enough, which sounds like it will be an issue for you.

What exactly is the blocker to using Meson on your side? Is it something that just needs a bit of work, or something that can't be done because of external factors (eg. some "scripting languages are not allowed" rule)? You mention python, would a Meson implementation in an other language be better for you guys?

Quoted 17 lines

The meson patch at least reads fine but I have not tried it.

Quoted 15 lines
Quoted 15 lines
---
 configure.ac | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
configure.ac +0 -0
index 35378b33..d024fcd8 100644
@@ -65,10 +65,10 @@ AC_CHECK_HEADERS([sys/sysctl.h sys/select.h])
 LT_PREREQ([2.2])
 LT_INIT([disable-static])
 
Quoted 12 lines
Quoted 4 lines
Quoted 4 lines
configure.ac +1 -1
-dnl pthread-stubs is mandatory on BSD platforms, due to the nature of the
+dnl pthread-stubs is mandatory on some BSD platforms, due to the nature of the
 dnl project. Even then there's a notable issue as described in the project README
 case "$host_os" in
Quoted 8 lines
Quoted 8 lines
configure.ac +1 -1
-linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu*)
+linux* | cygwin* | darwin* | solaris* | *-gnu* | gnu* | openbsd*)
     pthread_stubs_possible="no"
     ;;
 * )
Signature · 1 line
2.16.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw
Quoted 43 lines · Eric Engestrom
Quoted 26 lines · Jonathan Gray
Quoted 25 lines · Eric Engestrom
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -3
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []
---->8----
Quoted 7 lines
Quoted 3 lines

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

An almost identical patch was sent to the Mesa list. I don't have commit access to either repository so if you could push it that would be great.

Saw it and it is also r-b'ed; I'll push them later today :)

Quoted 5 lines

We can't take a build dependency on python for the xserver and related parts in OpenBSD so I have no interest in meson and very much hope autoconf remains otherwise it is back to writing custom makefiles for everything.

Quoted 8 lines

Hmm, the idea was to get rid of autotools when the meson.build files have been tested enough, which sounds like it will be an issue for you.

What exactly is the blocker to using Meson on your side? Is it something that just needs a bit of work, or something that can't be done because of external factors (eg. some "scripting languages are not allowed" rule)? You mention python, would a Meson implementation in an other language be better for you guys?

It has been mentioned in several places at various times by Matthieu Herrb, Mark Kettenis and myself.

ie
https://lists.x.org/archives/xorg-devel/2018-February/055807.html
https://lists.x.org/archives/xorg-devel/2017-March/053195.html
https://lists.freedesktop.org/archives/dri-devel/2017-March/135935.html

The OpenBSD src and xenocara trees need to be self-contained. For autotools we can regenerate files after import and not have a build time dependency on gnu tools or ports.

Even if there was a C or perl implementation of meson under a suitable license (not apache 2.0) it would still have to be integrated into a make based build.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by
#5 lore raw
In reply to Eric Engestrom
Quoted 25 lines · Eric Engestrom
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -3
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []
---->8----
Quoted 4 lines

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

Both patches from Jon + the meson amendment are

-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
Quoted 26 lines · Emil Velikov
Quoted 25 lines · Eric Engestrom
Quoted 2 lines · Jonathan Gray

pthread-stubs is no longer required on OpenBSD and has been removed. libpthread parts involved moved to libc.

Great news!

Note that meson needs the same change:
----8<----

meson.build +1 -3
index d600a906948c0e680885..bd00cdc2cae9f0749180 100644
@@ -35,8 +35,7 @@ with_install_tests = get_option('install-test-programs')
 
 config = configuration_data()
 
-# TODO: openbsd is guess, the others are correct
-if ['freebsd', 'dragonfly', 'netbsd', 'openbsd'].contains(host_machine.system())
+if ['freebsd', 'dragonfly', 'netbsd'].contains(host_machine.system())
   dep_pthread_stubs = dependency('pthread-stubs', version : '>= 0.4')
 else
   dep_pthread_stubs = []
---->8----
Quoted 6 lines
Quoted 4 lines

Do you have commit access, or do you want me to push this for you? No need to send a v2, I'll add the meson bit when I push it, or you can add it if you push it yourself.

Both patches from Jon + the meson amendment are

... and pushed both, thanks :)

Quoted 2 lines

-Emil

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel