Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-12 Thread Emil Velikov
On 5 February 2018 at 22:14, kallisti5  wrote:
> On 2018-02-05 15:39, Dylan Baker wrote:
>>
>> Quoting kallisti5 (2018-02-05 12:58:30)
>>>
>>> On 2017-10-24 11:47, Emil Velikov wrote:
>>> > Hi Jerome,
>>> >
>>> > On 23 October 2017 at 16:58, Jerome Duval 
>>> > wrote:
>>> >> * configure.ac:
>>> >>   -pthread is not available on Haiku.
>>> >>   Haiku doesn't require --enable-dri
>>> >>   build hgl on Haiku
>>> >> * egl/Makefile.am: define backendfiles for Haiku
>>> >> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
>>> >> targets/haiku-softpipe on Haiku.
>>> >> * src/gallium/targets/haiku-softpipe: add Makefile.am
>>> >> * src/gallium/state_trackers/hgl: add Makefile.am
>>> >> * winsys/sw/hgl: add Makefile.am
>>> >> * src/hgl/Makefile.am: add Makefile.am
>>> >> ---
>>> > Thanks for the patch. I think Eric has a point regarding splitting this
>>> > up.
>>> > Here is one way to handle it:
>>> >  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
>>> >  - 2 - src/egl
>>> >  - 3 - src/hgl
>>> >  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
>>> >  - 5 toggle - configure.ac + src/Makefile.am
>>>
>>> Hm, it looks like Jerome never got back to work on these changes... let
>>> me try to
>>> pick up the ball and run with it.
>>>
>>> > Couple of small suggestions:
>>> >  - keep all the sources and headers in the sources lists in
>>> > Makefile.sources
>>> >  - how do you guys manage pthreads - please mention that in the commit
>>> > message.
>>> >
>>> > If I'm reading this correctly, you strip out -pthread and there's no
>>> > pthread-stubs on Haiku.
>>>
>>> Haiku (and BeOS for that matter) has pthread support built into its core
>>> libroot.so.
>>>
>>> No need for -lpthread, all applications can assume its presence. Things
>>> that link -lpthread actually fail due to a non-existant libpthread...
>>> *however* as i'm typing this i'm being told we recently implemented a
>>> dummy static libpthread.a to try and appease assumptions about -lpthread
>>> existence so i'll remove the pthread checks :-)
>>>

Seems like an extra L was added where it's not needed. Namely I
mentioned pthread (notice the lack of L)
For a while gcc/clang has worked on unifying all the pthread platform
specifics behind the -pthread toggle.

Some specifics include: presence/lack of a separate library, -D_REENTRANT,

>>>   -- Alex
>>
>>
>> Hi Alex,
>>
>> I have a branch for building haiku with meson, when I was trying to
>> compile
>> neither the scons build nor the autotools build seemed to compile on a
>> Haiku VM
>> instance (x86_64), that was a few months ago though, so maybe its fixed.
>>
>> Our plan is to remove autotools from mesa, probably this year. I'm
>> thinking if
>> things look pretty good through the 18.0 release cycle I'll probably
>> propose
>> marking autotools as deprecated for 18.1 and propose removal in 18.2.
>
>
> Ah. crap.  I just got autoconfig working :-).  Historically I have only used
> SCons for our builds.  I always preferred the SCons build since autotools
> always
> ends up looking like spaghetti.  Here is what our current build does:
>
> https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52
>
> It looks like Jerome hacked in a patch for autotools... but i've heard some
> reports
> of instability with the resulting artifacts.
>
AFAICT Jerome's work was fine, modulo the "let's do everything at
once" which tends to bite us all.
Can you please send that over, even if there's a meson support in the works.

Two is better than none ;-)

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-06 Thread Dylan Baker
Quoting Dylan Baker (2018-02-06 15:19:48)
> Quoting kallisti5 (2018-02-05 20:24:20)
> > On 2018-02-05 18:13, Dylan Baker wrote:
> > > 
> > > Pretty close. I lied, apparently the pthreads fix is in 0.44
> > > 
> > > https://github.com/mesonbuild/meson/commit/fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f
> > > 
> > > Here's my branch, but it needs rebase pretty bad, there's also a patch 
> > > to use
> > > shared glapi that I added trying to see if that would get the build 
> > > working that
> > > needs to be removed:
> > > 
> > > https://github.com/dcbaker/mesa/tree/wip/meson-haiku
> > > 
> > 
> > Ok. I went over and got Haiku building with menson with the following 
> > change:
> > 
> > https://github.com/kallisti5/mesa/commit/e33dfab54d99edacdf1d24c402d29f50818631b3
> > 
> > Any feedback welcome. I need to review your branch now and see if I can 
> > make improvements
> > based on your changes.
> > 
> >   Thanks!
> > 
> >   -- Alex
> 
> I pushed the non-shared glapi fixes I had queued, and rebased on my branch 
> just
> now on master, including a few fixups for things that have changed since I 
> wrote
> that (like landing support for the BSDs). Hopefully that helps you.
> 
> Dylan
> 

One thing I just realized I didn't do, but you'll probably want to, is make sure
any new meson.build files (like hgl and gallium/*) get added to the EXTRA_DIST
values in autotools so they go into the tarballs.

Dylan


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-06 Thread Dylan Baker
Quoting kallisti5 (2018-02-05 20:24:20)
> On 2018-02-05 18:13, Dylan Baker wrote:
> > 
> > Pretty close. I lied, apparently the pthreads fix is in 0.44
> > 
> > https://github.com/mesonbuild/meson/commit/fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f
> > 
> > Here's my branch, but it needs rebase pretty bad, there's also a patch 
> > to use
> > shared glapi that I added trying to see if that would get the build 
> > working that
> > needs to be removed:
> > 
> > https://github.com/dcbaker/mesa/tree/wip/meson-haiku
> > 
> 
> Ok. I went over and got Haiku building with menson with the following 
> change:
> 
> https://github.com/kallisti5/mesa/commit/e33dfab54d99edacdf1d24c402d29f50818631b3
> 
> Any feedback welcome. I need to review your branch now and see if I can 
> make improvements
> based on your changes.
> 
>   Thanks!
> 
>   -- Alex

I pushed the non-shared glapi fixes I had queued, and rebased on my branch just
now on master, including a few fixups for things that have changed since I wrote
that (like landing support for the BSDs). Hopefully that helps you.

Dylan


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread kallisti5

On 2018-02-05 18:13, Dylan Baker wrote:


Pretty close. I lied, apparently the pthreads fix is in 0.44

https://github.com/mesonbuild/meson/commit/fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f

Here's my branch, but it needs rebase pretty bad, there's also a patch 
to use
shared glapi that I added trying to see if that would get the build 
working that

needs to be removed:

https://github.com/dcbaker/mesa/tree/wip/meson-haiku



Ok. I went over and got Haiku building with menson with the following 
change:


https://github.com/kallisti5/mesa/commit/e33dfab54d99edacdf1d24c402d29f50818631b3

Any feedback welcome. I need to review your branch now and see if I can 
make improvements

based on your changes.

 Thanks!

 -- Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread kallisti5

On 2018-02-05 18:13, Dylan Baker wrote:

Quoting kallisti5 (2018-02-05 15:36:06)

On 2018-02-05 16:14, kallisti5 wrote:
> On 2018-02-05 15:39, Dylan Baker wrote:
>> Quoting kallisti5 (2018-02-05 12:58:30)
>>> On 2017-10-24 11:47, Emil Velikov wrote:
>>> > Hi Jerome,
>>> >
>>> > On 23 October 2017 at 16:58, Jerome Duval 
>>> > wrote:
>>> >> * configure.ac:
>>> >>   -pthread is not available on Haiku.
>>> >>   Haiku doesn't require --enable-dri
>>> >>   build hgl on Haiku
>>> >> * egl/Makefile.am: define backendfiles for Haiku
>>> >> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
>>> >> targets/haiku-softpipe on Haiku.
>>> >> * src/gallium/targets/haiku-softpipe: add Makefile.am
>>> >> * src/gallium/state_trackers/hgl: add Makefile.am
>>> >> * winsys/sw/hgl: add Makefile.am
>>> >> * src/hgl/Makefile.am: add Makefile.am
>>> >> ---
>>> > Thanks for the patch. I think Eric has a point regarding splitting this
>>> > up.
>>> > Here is one way to handle it:
>>> >  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
>>> >  - 2 - src/egl
>>> >  - 3 - src/hgl
>>> >  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
>>> >  - 5 toggle - configure.ac + src/Makefile.am
>>>
>>> Hm, it looks like Jerome never got back to work on these changes...
>>> let
>>> me try to
>>> pick up the ball and run with it.
>>>
>>> > Couple of small suggestions:
>>> >  - keep all the sources and headers in the sources lists in
>>> > Makefile.sources
>>> >  - how do you guys manage pthreads - please mention that in the commit
>>> > message.
>>> >
>>> > If I'm reading this correctly, you strip out -pthread and there's no
>>> > pthread-stubs on Haiku.
>>>
>>> Haiku (and BeOS for that matter) has pthread support built into its
>>> core
>>> libroot.so.
>>>
>>> No need for -lpthread, all applications can assume its presence.
>>> Things
>>> that link -lpthread actually fail due to a non-existant libpthread...
>>> *however* as i'm typing this i'm being told we recently implemented a
>>> dummy static libpthread.a to try and appease assumptions about
>>> -lpthread
>>> existence so i'll remove the pthread checks :-)
>>>
>>>   -- Alex
>>
>> Hi Alex,
>>
>> I have a branch for building haiku with meson, when I was trying to
>> compile
>> neither the scons build nor the autotools build seemed to compile on a
>> Haiku VM
>> instance (x86_64), that was a few months ago though, so maybe its
>> fixed.
>>
>> Our plan is to remove autotools from mesa, probably this year. I'm
>> thinking if
>> things look pretty good through the 18.0 release cycle I'll probably
>> propose
>> marking autotools as deprecated for 18.1 and propose removal in 18.2.
>
> Ah. crap.  I just got autoconfig working :-).  Historically I have only
> used
> SCons for our builds.  I always preferred the SCons build since
> autotools always
> ends up looking like spaghetti.  Here is what our current build does:
>
> 
https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52
>
> It looks like Jerome hacked in a patch for autotools... but i've heard
> some reports
> of instability with the resulting artifacts.
>
>> I'm not going to block you guys using autotools or NAK anything, I
>> just want
>> you to be aware that we're trying to consolidate down to just meson
>> and
>> android.mk files. I can respin the haiku patches and CC you if you're
>> interested in
>> looking at them.
>
> If Meson is the future, i'm definitely down helping (or even taking
> over) that branch
> if it is just incomplete Haiku work.
>
> I'm going to try and do better maintenance on Haiku Mesa in 2018. I've
> been only around
> minimally in 2017 am a little out of date.
>
>> You might also want to see if you guys can update your meson, at least
>> last time
>> I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that
>> -pthread
>> and -lpthread are never added by meson.
>
> I just installed meson on Haiku and we are currently at 0.43.0

I took a quick crack at meson on Haiku. Getting stuck with a -pthread
getting injected
somewhere around glapi gen.

Lets see if my modifications are close to yours sight unseen :-)

https://gist.github.com/kallisti5/eb43162dd4c9e61b5740444d20955118

  -- Alex


Pretty close. I lied, apparently the pthreads fix is in 0.44

https://github.com/mesonbuild/meson/commit/fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f

Here's my branch, but it needs rebase pretty bad, there's also a patch 
to use
shared glapi that I added trying to see if that would get the build 
working that

needs to be removed:

https://github.com/dcbaker/mesa/tree/wip/meson-haiku


I went ahead and made a recipe for 0.44.0. Our repos should have it 
soon.

I can confirm the pthread issue is solved via that change.

Do you mind if I take the work in your branch and try to rebase/complete 
it and upstream it?  If we can get Meson working, I think Haiku is one 
of the last SCons consumers... maybe everyone will be on-board dropping 
SCons sooner than autotools/

Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread Dylan Baker
Quoting kallisti5 (2018-02-05 15:36:06)
> On 2018-02-05 16:14, kallisti5 wrote:
> > On 2018-02-05 15:39, Dylan Baker wrote:
> >> Quoting kallisti5 (2018-02-05 12:58:30)
> >>> On 2017-10-24 11:47, Emil Velikov wrote:
> >>> > Hi Jerome,
> >>> >
> >>> > On 23 October 2017 at 16:58, Jerome Duval 
> >>> > wrote:
> >>> >> * configure.ac:
> >>> >>   -pthread is not available on Haiku.
> >>> >>   Haiku doesn't require --enable-dri
> >>> >>   build hgl on Haiku
> >>> >> * egl/Makefile.am: define backendfiles for Haiku
> >>> >> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
> >>> >> targets/haiku-softpipe on Haiku.
> >>> >> * src/gallium/targets/haiku-softpipe: add Makefile.am
> >>> >> * src/gallium/state_trackers/hgl: add Makefile.am
> >>> >> * winsys/sw/hgl: add Makefile.am
> >>> >> * src/hgl/Makefile.am: add Makefile.am
> >>> >> ---
> >>> > Thanks for the patch. I think Eric has a point regarding splitting this
> >>> > up.
> >>> > Here is one way to handle it:
> >>> >  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
> >>> >  - 2 - src/egl
> >>> >  - 3 - src/hgl
> >>> >  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
> >>> >  - 5 toggle - configure.ac + src/Makefile.am
> >>> 
> >>> Hm, it looks like Jerome never got back to work on these changes... 
> >>> let
> >>> me try to
> >>> pick up the ball and run with it.
> >>> 
> >>> > Couple of small suggestions:
> >>> >  - keep all the sources and headers in the sources lists in
> >>> > Makefile.sources
> >>> >  - how do you guys manage pthreads - please mention that in the commit
> >>> > message.
> >>> >
> >>> > If I'm reading this correctly, you strip out -pthread and there's no
> >>> > pthread-stubs on Haiku.
> >>> 
> >>> Haiku (and BeOS for that matter) has pthread support built into its 
> >>> core
> >>> libroot.so.
> >>> 
> >>> No need for -lpthread, all applications can assume its presence. 
> >>> Things
> >>> that link -lpthread actually fail due to a non-existant libpthread...
> >>> *however* as i'm typing this i'm being told we recently implemented a
> >>> dummy static libpthread.a to try and appease assumptions about 
> >>> -lpthread
> >>> existence so i'll remove the pthread checks :-)
> >>> 
> >>>   -- Alex
> >> 
> >> Hi Alex,
> >> 
> >> I have a branch for building haiku with meson, when I was trying to 
> >> compile
> >> neither the scons build nor the autotools build seemed to compile on a 
> >> Haiku VM
> >> instance (x86_64), that was a few months ago though, so maybe its 
> >> fixed.
> >> 
> >> Our plan is to remove autotools from mesa, probably this year. I'm 
> >> thinking if
> >> things look pretty good through the 18.0 release cycle I'll probably 
> >> propose
> >> marking autotools as deprecated for 18.1 and propose removal in 18.2.
> > 
> > Ah. crap.  I just got autoconfig working :-).  Historically I have only 
> > used
> > SCons for our builds.  I always preferred the SCons build since 
> > autotools always
> > ends up looking like spaghetti.  Here is what our current build does:
> > 
> > https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52
> > 
> > It looks like Jerome hacked in a patch for autotools... but i've heard
> > some reports
> > of instability with the resulting artifacts.
> > 
> >> I'm not going to block you guys using autotools or NAK anything, I 
> >> just want
> >> you to be aware that we're trying to consolidate down to just meson 
> >> and
> >> android.mk files. I can respin the haiku patches and CC you if you're 
> >> interested in
> >> looking at them.
> > 
> > If Meson is the future, i'm definitely down helping (or even taking
> > over) that branch
> > if it is just incomplete Haiku work.
> > 
> > I'm going to try and do better maintenance on Haiku Mesa in 2018. I've
> > been only around
> > minimally in 2017 am a little out of date.
> > 
> >> You might also want to see if you guys can update your meson, at least 
> >> last time
> >> I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that 
> >> -pthread
> >> and -lpthread are never added by meson.
> > 
> > I just installed meson on Haiku and we are currently at 0.43.0
> 
> I took a quick crack at meson on Haiku. Getting stuck with a -pthread 
> getting injected
> somewhere around glapi gen.
> 
> Lets see if my modifications are close to yours sight unseen :-)
> 
> https://gist.github.com/kallisti5/eb43162dd4c9e61b5740444d20955118
> 
>   -- Alex

Pretty close. I lied, apparently the pthreads fix is in 0.44

https://github.com/mesonbuild/meson/commit/fc547ad05e5a8e650ae5bc2ecc7d40e4dbcc9f0f

Here's my branch, but it needs rebase pretty bad, there's also a patch to use
shared glapi that I added trying to see if that would get the build working that
needs to be removed:

https://github.com/dcbaker/mesa/tree/wip/meson-haiku

Dylan


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freed

Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread Dylan Baker
Quoting kallisti5 (2018-02-05 14:14:42)
> On 2018-02-05 15:39, Dylan Baker wrote:
> > Quoting kallisti5 (2018-02-05 12:58:30)
> >> On 2017-10-24 11:47, Emil Velikov wrote:
> >> > Hi Jerome,
> >> >
> >> > On 23 October 2017 at 16:58, Jerome Duval 
> >> > wrote:
> >> >> * configure.ac:
> >> >>   -pthread is not available on Haiku.
> >> >>   Haiku doesn't require --enable-dri
> >> >>   build hgl on Haiku
> >> >> * egl/Makefile.am: define backendfiles for Haiku
> >> >> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
> >> >> targets/haiku-softpipe on Haiku.
> >> >> * src/gallium/targets/haiku-softpipe: add Makefile.am
> >> >> * src/gallium/state_trackers/hgl: add Makefile.am
> >> >> * winsys/sw/hgl: add Makefile.am
> >> >> * src/hgl/Makefile.am: add Makefile.am
> >> >> ---
> >> > Thanks for the patch. I think Eric has a point regarding splitting this
> >> > up.
> >> > Here is one way to handle it:
> >> >  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
> >> >  - 2 - src/egl
> >> >  - 3 - src/hgl
> >> >  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
> >> >  - 5 toggle - configure.ac + src/Makefile.am
> >> 
> >> Hm, it looks like Jerome never got back to work on these changes... 
> >> let
> >> me try to
> >> pick up the ball and run with it.
> >> 
> >> > Couple of small suggestions:
> >> >  - keep all the sources and headers in the sources lists in
> >> > Makefile.sources
> >> >  - how do you guys manage pthreads - please mention that in the commit
> >> > message.
> >> >
> >> > If I'm reading this correctly, you strip out -pthread and there's no
> >> > pthread-stubs on Haiku.
> >> 
> >> Haiku (and BeOS for that matter) has pthread support built into its 
> >> core
> >> libroot.so.
> >> 
> >> No need for -lpthread, all applications can assume its presence. 
> >> Things
> >> that link -lpthread actually fail due to a non-existant libpthread...
> >> *however* as i'm typing this i'm being told we recently implemented a
> >> dummy static libpthread.a to try and appease assumptions about 
> >> -lpthread
> >> existence so i'll remove the pthread checks :-)
> >> 
> >>   -- Alex
> > 
> > Hi Alex,
> > 
> > I have a branch for building haiku with meson, when I was trying to 
> > compile
> > neither the scons build nor the autotools build seemed to compile on a 
> > Haiku VM
> > instance (x86_64), that was a few months ago though, so maybe its 
> > fixed.
> > 
> > Our plan is to remove autotools from mesa, probably this year. I'm 
> > thinking if
> > things look pretty good through the 18.0 release cycle I'll probably 
> > propose
> > marking autotools as deprecated for 18.1 and propose removal in 18.2.
> 
> Ah. crap.  I just got autoconfig working :-).  Historically I have only 
> used
> SCons for our builds.  I always preferred the SCons build since 
> autotools always
> ends up looking like spaghetti.  Here is what our current build does:

Sorry, I've meant to get on this a little faster, but the meson conversion has
been a lot more time consuming than I predicted it would be, lol.

> 
> https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52

Meson should make that a little simpler, since it has an install target, and we
should be able to make that work for you guys as well.

> 
> It looks like Jerome hacked in a patch for autotools... but i've heard 
> some reports
> of instability with the resulting artifacts.
> 
> > I'm not going to block you guys using autotools or NAK anything, I just 
> > want
> > you to be aware that we're trying to consolidate down to just meson and
> > android.mk files. I can respin the haiku patches and CC you if you're 
> > interested in
> > looking at them.
> 
> If Meson is the future, i'm definitely down helping (or even taking 
> over) that branch
> if it is just incomplete Haiku work.

I think it's pretty close to being ready for review. It's based on a branch to
fix static-glapi with meson that never landed, but I think I have that all
sorted now so I'm going to push that today, and that should make the haiku build
pretty simple (it's just one patch after that I think).

> 
> I'm going to try and do better maintenance on Haiku Mesa in 2018. I've 
> been only around
> minimally in 2017 am a little out of date.
> 
> > You might also want to see if you guys can update your meson, at least 
> > last time
> > I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that 
> > -pthread
> > and -lpthread are never added by meson.
> 
> I just installed meson on Haiku and we are currently at 0.43.0
> 
Awesome, that makes things a lot easier with meson.

You can have a look at the build in general, I think meson is syntactically
pretty nice, it's like a minimal python or ruby, and the builds are much faster
(that's just because ninja is really smart).

Dylan


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesk

Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread kallisti5

On 2018-02-05 16:14, kallisti5 wrote:

On 2018-02-05 15:39, Dylan Baker wrote:

Quoting kallisti5 (2018-02-05 12:58:30)

On 2017-10-24 11:47, Emil Velikov wrote:
> Hi Jerome,
>
> On 23 October 2017 at 16:58, Jerome Duval 
> wrote:
>> * configure.ac:
>>   -pthread is not available on Haiku.
>>   Haiku doesn't require --enable-dri
>>   build hgl on Haiku
>> * egl/Makefile.am: define backendfiles for Haiku
>> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
>> targets/haiku-softpipe on Haiku.
>> * src/gallium/targets/haiku-softpipe: add Makefile.am
>> * src/gallium/state_trackers/hgl: add Makefile.am
>> * winsys/sw/hgl: add Makefile.am
>> * src/hgl/Makefile.am: add Makefile.am
>> ---
> Thanks for the patch. I think Eric has a point regarding splitting this
> up.
> Here is one way to handle it:
>  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
>  - 2 - src/egl
>  - 3 - src/hgl
>  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
>  - 5 toggle - configure.ac + src/Makefile.am

Hm, it looks like Jerome never got back to work on these changes... 
let

me try to
pick up the ball and run with it.

> Couple of small suggestions:
>  - keep all the sources and headers in the sources lists in
> Makefile.sources
>  - how do you guys manage pthreads - please mention that in the commit
> message.
>
> If I'm reading this correctly, you strip out -pthread and there's no
> pthread-stubs on Haiku.

Haiku (and BeOS for that matter) has pthread support built into its 
core

libroot.so.

No need for -lpthread, all applications can assume its presence. 
Things

that link -lpthread actually fail due to a non-existant libpthread...
*however* as i'm typing this i'm being told we recently implemented a
dummy static libpthread.a to try and appease assumptions about 
-lpthread

existence so i'll remove the pthread checks :-)

  -- Alex


Hi Alex,

I have a branch for building haiku with meson, when I was trying to 
compile
neither the scons build nor the autotools build seemed to compile on a 
Haiku VM
instance (x86_64), that was a few months ago though, so maybe its 
fixed.


Our plan is to remove autotools from mesa, probably this year. I'm 
thinking if
things look pretty good through the 18.0 release cycle I'll probably 
propose

marking autotools as deprecated for 18.1 and propose removal in 18.2.


Ah. crap.  I just got autoconfig working :-).  Historically I have only 
used
SCons for our builds.  I always preferred the SCons build since 
autotools always

ends up looking like spaghetti.  Here is what our current build does:

https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52

It looks like Jerome hacked in a patch for autotools... but i've heard
some reports
of instability with the resulting artifacts.

I'm not going to block you guys using autotools or NAK anything, I 
just want
you to be aware that we're trying to consolidate down to just meson 
and
android.mk files. I can respin the haiku patches and CC you if you're 
interested in

looking at them.


If Meson is the future, i'm definitely down helping (or even taking
over) that branch
if it is just incomplete Haiku work.

I'm going to try and do better maintenance on Haiku Mesa in 2018. I've
been only around
minimally in 2017 am a little out of date.

You might also want to see if you guys can update your meson, at least 
last time
I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that 
-pthread

and -lpthread are never added by meson.


I just installed meson on Haiku and we are currently at 0.43.0


I took a quick crack at meson on Haiku. Getting stuck with a -pthread 
getting injected

somewhere around glapi gen.

Lets see if my modifications are close to yours sight unseen :-)

https://gist.github.com/kallisti5/eb43162dd4c9e61b5740444d20955118

 -- Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread kallisti5

On 2018-02-05 15:39, Dylan Baker wrote:

Quoting kallisti5 (2018-02-05 12:58:30)

On 2017-10-24 11:47, Emil Velikov wrote:
> Hi Jerome,
>
> On 23 October 2017 at 16:58, Jerome Duval 
> wrote:
>> * configure.ac:
>>   -pthread is not available on Haiku.
>>   Haiku doesn't require --enable-dri
>>   build hgl on Haiku
>> * egl/Makefile.am: define backendfiles for Haiku
>> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
>> targets/haiku-softpipe on Haiku.
>> * src/gallium/targets/haiku-softpipe: add Makefile.am
>> * src/gallium/state_trackers/hgl: add Makefile.am
>> * winsys/sw/hgl: add Makefile.am
>> * src/hgl/Makefile.am: add Makefile.am
>> ---
> Thanks for the patch. I think Eric has a point regarding splitting this
> up.
> Here is one way to handle it:
>  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
>  - 2 - src/egl
>  - 3 - src/hgl
>  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
>  - 5 toggle - configure.ac + src/Makefile.am

Hm, it looks like Jerome never got back to work on these changes... 
let

me try to
pick up the ball and run with it.

> Couple of small suggestions:
>  - keep all the sources and headers in the sources lists in
> Makefile.sources
>  - how do you guys manage pthreads - please mention that in the commit
> message.
>
> If I'm reading this correctly, you strip out -pthread and there's no
> pthread-stubs on Haiku.

Haiku (and BeOS for that matter) has pthread support built into its 
core

libroot.so.

No need for -lpthread, all applications can assume its presence. 
Things

that link -lpthread actually fail due to a non-existant libpthread...
*however* as i'm typing this i'm being told we recently implemented a
dummy static libpthread.a to try and appease assumptions about 
-lpthread

existence so i'll remove the pthread checks :-)

  -- Alex


Hi Alex,

I have a branch for building haiku with meson, when I was trying to 
compile
neither the scons build nor the autotools build seemed to compile on a 
Haiku VM
instance (x86_64), that was a few months ago though, so maybe its 
fixed.


Our plan is to remove autotools from mesa, probably this year. I'm 
thinking if
things look pretty good through the 18.0 release cycle I'll probably 
propose

marking autotools as deprecated for 18.1 and propose removal in 18.2.


Ah. crap.  I just got autoconfig working :-).  Historically I have only 
used
SCons for our builds.  I always preferred the SCons build since 
autotools always

ends up looking like spaghetti.  Here is what our current build does:

https://github.com/haikuports/haikuports/blob/master/sys-libs/mesa/mesa-17.1.4.recipe#L52

It looks like Jerome hacked in a patch for autotools... but i've heard 
some reports

of instability with the resulting artifacts.

I'm not going to block you guys using autotools or NAK anything, I just 
want

you to be aware that we're trying to consolidate down to just meson and
android.mk files. I can respin the haiku patches and CC you if you're 
interested in

looking at them.


If Meson is the future, i'm definitely down helping (or even taking 
over) that branch

if it is just incomplete Haiku work.

I'm going to try and do better maintenance on Haiku Mesa in 2018. I've 
been only around

minimally in 2017 am a little out of date.

You might also want to see if you guys can update your meson, at least 
last time
I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that 
-pthread

and -lpthread are never added by meson.


I just installed meson on Haiku and we are currently at 0.43.0

 -- Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread Dylan Baker
Quoting kallisti5 (2018-02-05 12:58:30)
> On 2017-10-24 11:47, Emil Velikov wrote:
> > Hi Jerome,
> > 
> > On 23 October 2017 at 16:58, Jerome Duval  
> > wrote:
> >> * configure.ac:
> >>   -pthread is not available on Haiku.
> >>   Haiku doesn't require --enable-dri
> >>   build hgl on Haiku
> >> * egl/Makefile.am: define backendfiles for Haiku
> >> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
> >> targets/haiku-softpipe on Haiku.
> >> * src/gallium/targets/haiku-softpipe: add Makefile.am
> >> * src/gallium/state_trackers/hgl: add Makefile.am
> >> * winsys/sw/hgl: add Makefile.am
> >> * src/hgl/Makefile.am: add Makefile.am
> >> ---
> > Thanks for the patch. I think Eric has a point regarding splitting this 
> > up.
> > Here is one way to handle it:
> >  - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
> >  - 2 - src/egl
> >  - 3 - src/hgl
> >  - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
> >  - 5 toggle - configure.ac + src/Makefile.am
> 
> Hm, it looks like Jerome never got back to work on these changes... let 
> me try to
> pick up the ball and run with it.
> 
> > Couple of small suggestions:
> >  - keep all the sources and headers in the sources lists in 
> > Makefile.sources
> >  - how do you guys manage pthreads - please mention that in the commit 
> > message.
> > 
> > If I'm reading this correctly, you strip out -pthread and there's no
> > pthread-stubs on Haiku.
> 
> Haiku (and BeOS for that matter) has pthread support built into its core 
> libroot.so.
> 
> No need for -lpthread, all applications can assume its presence. Things 
> that link -lpthread actually fail due to a non-existant libpthread...  
> *however* as i'm typing this i'm being told we recently implemented a 
> dummy static libpthread.a to try and appease assumptions about -lpthread 
> existence so i'll remove the pthread checks :-)
> 
>   -- Alex

Hi Alex,

I have a branch for building haiku with meson, when I was trying to compile
neither the scons build nor the autotools build seemed to compile on a Haiku VM
instance (x86_64), that was a few months ago though, so maybe its fixed.

Our plan is to remove autotools from mesa, probably this year. I'm thinking if
things look pretty good through the 18.0 release cycle I'll probably propose
marking autotools as deprecated for 18.1 and propose removal in 18.2. I'm not
going to block you guys using autotools or NAK anything, I just want you to be
aware that we're trying to consolidate down to just meson and android.mk files.
I can respin the haiku patches and CC you if you're interested in looking at
them.

You might also want to see if you guys can update your meson, at least last time
I checked it was 0.42, and I fixed the pthreads stuff in 0.43 so that -pthread
and -lpthread are never added by meson.

Dylan


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2018-02-05 Thread kallisti5

On 2017-10-24 11:47, Emil Velikov wrote:

Hi Jerome,

On 23 October 2017 at 16:58, Jerome Duval  
wrote:

* configure.ac:
  -pthread is not available on Haiku.
  Haiku doesn't require --enable-dri
  build hgl on Haiku
* egl/Makefile.am: define backendfiles for Haiku
* src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
targets/haiku-softpipe on Haiku.
* src/gallium/targets/haiku-softpipe: add Makefile.am
* src/gallium/state_trackers/hgl: add Makefile.am
* winsys/sw/hgl: add Makefile.am
* src/hgl/Makefile.am: add Makefile.am
---
Thanks for the patch. I think Eric has a point regarding splitting this 
up.

Here is one way to handle it:
 - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
 - 2 - src/egl
 - 3 - src/hgl
 - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
 - 5 toggle - configure.ac + src/Makefile.am


Hm, it looks like Jerome never got back to work on these changes... let 
me try to

pick up the ball and run with it.


Couple of small suggestions:
 - keep all the sources and headers in the sources lists in 
Makefile.sources
 - how do you guys manage pthreads - please mention that in the commit 
message.


If I'm reading this correctly, you strip out -pthread and there's no
pthread-stubs on Haiku.


Haiku (and BeOS for that matter) has pthread support built into its core 
libroot.so.


No need for -lpthread, all applications can assume its presence. Things 
that link -lpthread actually fail due to a non-existant libpthread...  
*however* as i'm typing this i'm being told we recently implemented a 
dummy static libpthread.a to try and appease assumptions about -lpthread 
existence so i'll remove the pthread checks :-)


 -- Alex
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2017-10-24 Thread Emil Velikov
Hi Jerome,

On 23 October 2017 at 16:58, Jerome Duval  wrote:
> * configure.ac:
>   -pthread is not available on Haiku.
>   Haiku doesn't require --enable-dri
>   build hgl on Haiku
> * egl/Makefile.am: define backendfiles for Haiku
> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
> targets/haiku-softpipe on Haiku.
> * src/gallium/targets/haiku-softpipe: add Makefile.am
> * src/gallium/state_trackers/hgl: add Makefile.am
> * winsys/sw/hgl: add Makefile.am
> * src/hgl/Makefile.am: add Makefile.am
> ---
Thanks for the patch. I think Eric has a point regarding splitting this up.
Here is one way to handle it:
 - patch 1 - the driver, aka st/hgl + sw/hgl + targets/haiku
 - 2 - src/egl
 - 3 - src/hgl
 - 4 misc fixes (the SoftwareRenderer.cpp hunk?)
 - 5 toggle - configure.ac + src/Makefile.am

Couple of small suggestions:
 - keep all the sources and headers in the sources lists in Makefile.sources
 - how do you guys manage pthreads - please mention that in the commit message.
If I'm reading this correctly, you strip out -pthread and there's no
pthread-stubs on Haiku.

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2017-10-24 Thread Jérôme Duval
Hi,

2017-10-24 14:46 GMT+02:00 Eric Engestrom :
> I had a quick glance, but there's too much at once.
>
> On Monday, 2017-10-23 17:58:46 +0200, Jerome Duval wrote:
>> * configure.ac:
>>   -pthread is not available on Haiku.
>>   Haiku doesn't require --enable-dri
>>   build hgl on Haiku
>> * egl/Makefile.am: define backendfiles for Haiku
>> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
>> targets/haiku-softpipe on Haiku.
>> * src/gallium/targets/haiku-softpipe: add Makefile.am
>> * src/gallium/state_trackers/hgl: add Makefile.am
>> * winsys/sw/hgl: add Makefile.am
>> * src/hgl/Makefile.am: add Makefile.am
>
> This list should be a hint: you're doing many things at once :P
> Please split this into a series, roughly one patch per item in your
> list.

Well that's a patch for a platform, which usually enable components
all over the place.

>
> When doing that, please pay attention to the order of your patches, so
> that you don't break anything in the middle (configure.ac probably needs
> to be the last patch for instance).

I resent as v2. Please consider reviewing.

>
> Side note: is Meson supported on Haiku? If it is, can you also wire it
> up? Or would you be willing to test patches that do?

Meson is supported on Haiku (ATM 0.42.1), not my area of expertise though.
But sure, I can test patches for Meson.

Bye
Jerome
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] Haiku: convert to autotools

2017-10-24 Thread Eric Engestrom
Hi,

I had a quick glance, but there's too much at once.

On Monday, 2017-10-23 17:58:46 +0200, Jerome Duval wrote:
> * configure.ac:
>   -pthread is not available on Haiku.
>   Haiku doesn't require --enable-dri
>   build hgl on Haiku
> * egl/Makefile.am: define backendfiles for Haiku
> * src/gallium/Makefile.am: build winsys/sw/hgl, state_trackers/hgl and
> targets/haiku-softpipe on Haiku.
> * src/gallium/targets/haiku-softpipe: add Makefile.am
> * src/gallium/state_trackers/hgl: add Makefile.am
> * winsys/sw/hgl: add Makefile.am
> * src/hgl/Makefile.am: add Makefile.am

This list should be a hint: you're doing many things at once :P
Please split this into a series, roughly one patch per item in your
list.

When doing that, please pay attention to the order of your patches, so
that you don't break anything in the middle (configure.ac probably needs
to be the last patch for instance).

Side note: is Meson supported on Haiku? If it is, can you also wire it
up? Or would you be willing to test patches that do?

> ---
>  configure.ac   | 30 +-
>  src/Makefile.am|  4 ++
>  src/egl/Makefile.am| 20 ++-
>  src/gallium/Makefile.am|  9 ++-
>  src/gallium/state_trackers/hgl/Makefile.am | 39 
>  src/gallium/state_trackers/hgl/Makefile.sources|  3 +
>  src/gallium/targets/haiku-softpipe/Makefile.am | 69 
> ++
>  .../targets/haiku-softpipe/SoftwareRenderer.cpp|  2 +
>  src/gallium/winsys/sw/hgl/Makefile.am  | 34 +++
>  src/gallium/winsys/sw/hgl/Makefile.sources |  3 +
>  src/hgl/Makefile.am| 50 
>  src/hgl/Makefile.sources   |  8 +++
>  src/hgl/gl.pc.in   | 11 
>  13 files changed, 277 insertions(+), 5 deletions(-)
>  create mode 100644 src/gallium/state_trackers/hgl/Makefile.am
>  create mode 100644 src/gallium/state_trackers/hgl/Makefile.sources
>  create mode 100644 src/gallium/targets/haiku-softpipe/Makefile.am
>  create mode 100644 src/gallium/winsys/sw/hgl/Makefile.am
>  create mode 100644 src/gallium/winsys/sw/hgl/Makefile.sources
>  create mode 100644 src/hgl/Makefile.am
>  create mode 100644 src/hgl/Makefile.sources
>  create mode 100644 src/hgl/gl.pc.in
> 
> diff --git a/configure.ac b/configure.ac
> index add3830..1d8efc5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -272,6 +272,9 @@ case "$host_os" in
>  *-android*)
>  android=yes
>  ;;
> +*haiku)
> +haiku=yes
> +;;
>  linux*|*-gnu*|gnu*|cygwin*)
>  DEFINES="$DEFINES -D_GNU_SOURCE"
>  ;;
> @@ -281,6 +284,7 @@ solaris*)
>  esac
>  
>  AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)
> +AM_CONDITIONAL(HAVE_HAIKU, test "x$haiku" = xyes)
>  
>  dnl
>  dnl Check compiler flags
> @@ -863,12 +867,18 @@ dnl According to the manual when using pthreads, one 
> should add -pthread to
>  dnl both compile and link-time arguments.
>  dnl In practise that should be sufficient for all platforms, since any
>  dnl platforms build with GCC and Clang support the flag.
> -PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
> +case "$host_os" in
> +haiku*)
> +;;
> +* )
> +PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
> +;;
> +esac
>  
>  dnl pthread-stubs is mandatory on 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* | haiku*)
>  pthread_stubs_possible="no"
>  ;;
>  * )
> @@ -1518,7 +1528,12 @@ require_dri_shared_libs_and_glapi() {
>  if test "x$enable_dri" != xyes; then
>  # There is only a single backend which won't be build/used otherwise.
>  # XXX: Revisit this as the egl/haiku is a thing.
> -AC_MSG_ERROR([$1 requires --enable-dri])
> +case "$host_os" in
> +haiku*)
> +;;
> +*)
> +AC_MSG_ERROR([$1 requires --enable-dri]) ;;
> + esac
>  fi
>  
>  if test "x$enable_shared_glapi" != xyes; then
> @@ -1748,6 +1763,10 @@ for plat in $platforms; do
>  DEFINES="$DEFINES -DHAVE_ANDROID_PLATFORM"
>  ;;
>  
> +haiku)
> +DEFINES="$DEFINES -DHAVE_HAIKU_PLATFORM"
> +;;
> +
>  *)
>  AC_MSG_ERROR([platform '$plat' does not exist])
>  ;;
> @@ -2891,6 +2910,7 @@ AC_CONFIG_FILES([Makefile
>   src/gallium/state_trackers/clover/Makefile
>   src/gallium/state_trackers/dri/Makefile
>   src/gallium/state_trackers/glx/xlib/Makefile
> + src/gallium/state_trackers/hgl/Makefile
>   src/gallium/state_trackers/nine/Makefile
>   src/gallium/state_trackers/omx_bellagio/Makefile
>