Re: [RFC]: More robust build sys for UMR
On 06/02/17 12:16 AM, StDenis, Tom wrote: > > $ pkg-config libdrm --cflags > -I/usr/include/libdrm > > So we could in theory include "drm.h" and then just add that to the head > of our CFLAGS. Make that , but yes, that's the correct way, not just in theory. :) -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [RFC]: More robust build sys for UMR
Hi Andres, Thanks for the feedback. I've decided to push Edward's patches to master since it's in the projects best interest to minimize build/package friction going forward. Of course now I have to rebase our NPI branches internally since they're based on the older makefile ... That's more of an AMD problem though. If someone could review my patch that detects the libdrm path I'd like to get that in sooner than later so the package is more buildable by time people get to work on Monday :-) Tom From: Andres Rodriguez <andre...@gmail.com> Sent: Sunday, February 5, 2017 11:11 To: StDenis, Tom; Edward O'Callaghan; amd-gfx@lists.freedesktop.org Subject: Re: [RFC]: More robust build sys for UMR Hey Tom, It's great to see umr make it to the public. I've given it a quick spin and it is pretty awesome, although I don't have much time this weekend to play with it. Wanted to weigh in my 2c regarding cmake. Some of the things I like about cmake: * Compatible with out of tree builds by default - Super simple *guaranteed* make clean equivalent with rm -f build/ - Simple gitignore files - Both of these reasons result in sidestepping some common and very annoying bugs in makefiles * Easy packaging for release with cpack * Removes a lot of the boilerplate (specially for libraries) * Good compatibility across distros - Without a lot of the "horrible" things from automake * There is a good community around cmake that has some cool modules available for it Some of the things I don't like about cmake: * The syntax is horrible * I think ctest is overly complicated compared to other frameworks like gtest. - Doing basic things like attaching a debugger are not straightforward Weighing the above I tend to side on pro-cmake. Again, thanks for the work on the great tool. I might have a bit more feedback once I start using it more heavily next week. Regards, Andres On 2/5/2017 9:52 AM, StDenis, Tom wrote: > Hi Edward, > > > Sounds good to me. I'm sure our build-team folks would actually be in > favour of something that could help make deb/rpm packages. > > > I typically only run Fedora and Ubuntu so if others who run > Arch/Gentoo/SUSE/etc want to weigh in that'd be appreciated. If nobody > raises any objections I'll RB your series and push them to master > sometime tomorrow. > > > By all means if you want to add other debug features go for it. Keep in > mind it already captures features from things like radeontop and setreg > type tools > > > One of the open issues right now is the VM decoding in the read_vram() > functionality (specifically when using follow_ib). It's hard to > instrument a test of that since VM addresses are live and ever chaotic > but I've yet to see a successful IB read back. > > > Tom > > > > > *From:* Edward O'Callaghan <funfunc...@folklore1984.net> > *Sent:* Sunday, February 5, 2017 08:29 > *To:* StDenis, Tom; amd-gfx@lists.freedesktop.org > *Subject:* Re: [RFC]: More robust build sys for UMR > > > > On 02/05/2017 10:42 PM, StDenis, Tom wrote: >> Hi Edward, > > Hey Tom, > >> >> >> Well the patches apply and work but I'm not really sure what problem >> it's meant to solve . Building previously was actually simpler with > > So the idea here was to implement something a little more robust and > extensible. For example with a couple of extra lines cmake can produce > rpm's, deb's and tar's too as build by-products. I can add this > functionality if you wish? Additionally another couple of lines a unit > tests could be hooked in if that is useful? > > Fundamentally the idea was to have a "proper" build system that can > be extensible enough not to get in the way while the community > elaborates on UMR some more with additional features. I was thinking > about looking at unifying other peoples radeon debug/re tooling together > into UMR to be the one-stop tool as my Sunday afternoon weekend project > you see :) . > >> "make" as opposed to "mkdir build && cd build && cmake .. && make". >> > > I just added that step because its nice to build out of tree, you don't > have to. > >> >> On a BSD system (where this wouldn't really work without the >> corresponding debugfs entries) gmake could be used to build it provided >> ncurses/pciaccess were around. > > Well in truth I didn't test on the BSD's yet, however it helps give some > a good foundation so they could port it should they wish. I am assuming > so since they seem to be updating their graphics stack these days. > >> >>
Re: [RFC]: More robust build sys for UMR
Hey Tom, It's great to see umr make it to the public. I've given it a quick spin and it is pretty awesome, although I don't have much time this weekend to play with it. Wanted to weigh in my 2c regarding cmake. Some of the things I like about cmake: * Compatible with out of tree builds by default - Super simple *guaranteed* make clean equivalent with rm -f build/ - Simple gitignore files - Both of these reasons result in sidestepping some common and very annoying bugs in makefiles * Easy packaging for release with cpack * Removes a lot of the boilerplate (specially for libraries) * Good compatibility across distros - Without a lot of the "horrible" things from automake * There is a good community around cmake that has some cool modules available for it Some of the things I don't like about cmake: * The syntax is horrible * I think ctest is overly complicated compared to other frameworks like gtest. - Doing basic things like attaching a debugger are not straightforward Weighing the above I tend to side on pro-cmake. Again, thanks for the work on the great tool. I might have a bit more feedback once I start using it more heavily next week. Regards, Andres On 2/5/2017 9:52 AM, StDenis, Tom wrote: Hi Edward, Sounds good to me. I'm sure our build-team folks would actually be in favour of something that could help make deb/rpm packages. I typically only run Fedora and Ubuntu so if others who run Arch/Gentoo/SUSE/etc want to weigh in that'd be appreciated. If nobody raises any objections I'll RB your series and push them to master sometime tomorrow. By all means if you want to add other debug features go for it. Keep in mind it already captures features from things like radeontop and setreg type tools One of the open issues right now is the VM decoding in the read_vram() functionality (specifically when using follow_ib). It's hard to instrument a test of that since VM addresses are live and ever chaotic but I've yet to see a successful IB read back. Tom *From:* Edward O'Callaghan <funfunc...@folklore1984.net> *Sent:* Sunday, February 5, 2017 08:29 *To:* StDenis, Tom; amd-gfx@lists.freedesktop.org *Subject:* Re: [RFC]: More robust build sys for UMR On 02/05/2017 10:42 PM, StDenis, Tom wrote: Hi Edward, Hey Tom, Well the patches apply and work but I'm not really sure what problem it's meant to solve . Building previously was actually simpler with So the idea here was to implement something a little more robust and extensible. For example with a couple of extra lines cmake can produce rpm's, deb's and tar's too as build by-products. I can add this functionality if you wish? Additionally another couple of lines a unit tests could be hooked in if that is useful? Fundamentally the idea was to have a "proper" build system that can be extensible enough not to get in the way while the community elaborates on UMR some more with additional features. I was thinking about looking at unifying other peoples radeon debug/re tooling together into UMR to be the one-stop tool as my Sunday afternoon weekend project you see :) . "make" as opposed to "mkdir build && cd build && cmake .. && make". I just added that step because its nice to build out of tree, you don't have to. On a BSD system (where this wouldn't really work without the corresponding debugfs entries) gmake could be used to build it provided ncurses/pciaccess were around. Well in truth I didn't test on the BSD's yet, however it helps give some a good foundation so they could port it should they wish. I am assuming so since they seem to be updating their graphics stack these days. If this legitimately makes it more stable to build on Linux systems then I'm all for it. Can anyone elaborate on where the simple make system would fail? Well I hope so, that's why I RFC it. I expect this to work out the box on all distributions right off the bat and I would be interested in feedback for that. (I'm not saying NAK I'm simply asking for my own edification). Sure sure, this only took me a hour to put together because of _my_ itch so don't stress. Thanks, Tom Kind Regards, Edward. *From:* Edward O'Callaghan <funfunc...@folklore1984.net> *Sent:* Saturday, February 4, 2017 23:59 *To:* amd-gfx@lists.freedesktop.org *Cc:* StDenis, Tom *Subject:* [RFC]: More robust build sys for UMR Keeping with the tradition of changing the build system on initial release, here we go again.. This follow series introduces the cmake build system that is intended to be a little more robust across various distros and presumably the BSD's also. The installation prefix is configurable in the usual cmake way: `cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..` Please kindly r
Re: [RFC]: More robust build sys for UMR
Hi all, Never mind answered my own question: $ pkg-config libdrm --cflags -I/usr/include/libdrm So we could in theory include "drm.h" and then just add that to the head of our CFLAGS. Tom From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> on behalf of StDenis, Tom <tom.stde...@amd.com> Sent: Sunday, February 5, 2017 09:55 To: Bas Nieuwenhuizen; amd-gfx@lists.freedesktop.org Subject: Re: [RFC]: More robust build sys for UMR Hi Bas, What would be a good way to work around the paths though? Is there a pkg config for libdrm? Thanks, Tom From: amd-gfx <amd-gfx-boun...@lists.freedesktop.org> on behalf of Bas Nieuwenhuizen <b...@basnieuwenhuizen.nl> Sent: Sunday, February 5, 2017 08:12 To: amd-gfx@lists.freedesktop.org Subject: Re: [RFC]: More robust build sys for UMR Hi, I think the current build system is a bit too naive though. On my distro archlinux the libdrm headers are installed in /usr/include/libdrm, which causes the include to drm/drm.h in src/lib/query_drm.c to fail. So if it is in /usr/include/drm on Ubuntu, we are going to need some autodetection to find the right include path. Autotools definitely sounds like overkill to me, and the current build system is pretty simple indeed, but needing to change the source isn't ideal. By the way, I don't think the current make system handles dependencies on headers correctly? e.g. if I modify umrapp.h, make rebuilds nothing. This is one of the things cmake gives you for free, though with a bit of work make can do it too. Yours sincerely, Bas Nieuwenhuizen On Sun, Feb 5, 2017, at 12:42, StDenis, Tom wrote: Hi Edward, Well the patches apply and work but I'm not really sure what problem it's meant to solve [] . Building previously was actually simpler with "make" as opposed to "mkdir build && cd build && cmake .. && make". On a BSD system (where this wouldn't really work without the corresponding debugfs entries) gmake could be used to build it provided ncurses/pciaccess were around. If this legitimately makes it more stable to build on Linux systems then I'm all for it. Can anyone elaborate on where the simple make system would fail? (I'm not saying NAK I'm simply asking for my own edification). Thanks, Tom From: Edward O'Callaghan <funfunc...@folklore1984.net> Sent: Saturday, February 4, 2017 23:59 To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [RFC]: More robust build sys for UMR Keeping with the tradition of changing the build system on initial release, here we go again.. This follow series introduces the cmake build system that is intended to be a little more robust across various distros and presumably the BSD's also. The installation prefix is configurable in the usual cmake way: `cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..` Please kindly review, Edward O'Callaghan (4): [PATCH 1/4] cmake_modules: Add libpciaccess finder [PATCH 2/4] cmake: Initial build system [PATCH 3/4] README: minor update for cmake buildsys [PATCH 4/4] drop orginal Makefile && stub bin/ directory ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org<mailto:amd-gfx@lists.freedesktop.org> https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [RFC]: More robust build sys for UMR
On 02/05/2017 10:42 PM, StDenis, Tom wrote: > Hi Edward, Hey Tom, > > > Well the patches apply and work but I'm not really sure what problem > it's meant to solve . Building previously was actually simpler with So the idea here was to implement something a little more robust and extensible. For example with a couple of extra lines cmake can produce rpm's, deb's and tar's too as build by-products. I can add this functionality if you wish? Additionally another couple of lines a unit tests could be hooked in if that is useful? Fundamentally the idea was to have a "proper" build system that can be extensible enough not to get in the way while the community elaborates on UMR some more with additional features. I was thinking about looking at unifying other peoples radeon debug/re tooling together into UMR to be the one-stop tool as my Sunday afternoon weekend project you see :) . > "make" as opposed to "mkdir build && cd build && cmake .. && make". > I just added that step because its nice to build out of tree, you don't have to. > > On a BSD system (where this wouldn't really work without the > corresponding debugfs entries) gmake could be used to build it provided > ncurses/pciaccess were around. Well in truth I didn't test on the BSD's yet, however it helps give some a good foundation so they could port it should they wish. I am assuming so since they seem to be updating their graphics stack these days. > > > If this legitimately makes it more stable to build on Linux systems then > I'm all for it. Can anyone elaborate on where the simple make system > would fail? Well I hope so, that's why I RFC it. I expect this to work out the box on all distributions right off the bat and I would be interested in feedback for that. > > (I'm not saying NAK I'm simply asking for my own edification). Sure sure, this only took me a hour to put together because of _my_ itch so don't stress. > > Thanks, > Tom Kind Regards, Edward. > > > *From:* Edward O'Callaghan> *Sent:* Saturday, February 4, 2017 23:59 > *To:* amd-gfx@lists.freedesktop.org > *Cc:* StDenis, Tom > *Subject:* [RFC]: More robust build sys for UMR > > Keeping with the tradition of changing the build system on initial > release, here we go again.. This follow series introduces the cmake > build system that is intended to be a little more robust across > various distros and presumably the BSD's also. The installation > prefix is configurable in the usual cmake way: > `cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..` > > Please kindly review, > > Edward O'Callaghan (4): > [PATCH 1/4] cmake_modules: Add libpciaccess finder > [PATCH 2/4] cmake: Initial build system > [PATCH 3/4] README: minor update for cmake buildsys > [PATCH 4/4] drop orginal Makefile && stub bin/ directory signature.asc Description: OpenPGP digital signature ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [RFC]: More robust build sys for UMR
Hi, I think the current build system is a bit too naive though. On my distro archlinux the libdrm headers are installed in /usr/include/libdrm, which causes the include to drm/drm.h in src/lib/query_drm.c to fail. So if it is in /usr/include/drm on Ubuntu, we are going to need some autodetection to find the right include path. Autotools definitely sounds like overkill to me, and the current build system is pretty simple indeed, but needing to change the source isn't ideal. By the way, I don't think the current make system handles dependencies on headers correctly? e.g. if I modify umrapp.h, make rebuilds nothing. This is one of the things cmake gives you for free, though with a bit of work make can do it too. Yours sincerely, Bas Nieuwenhuizen On Sun, Feb 5, 2017, at 12:42, StDenis, Tom wrote: > Hi Edward, > > Well the patches apply and work but I'm not really sure what problem > it's meant to solve . Building previously was actually simpler with > "make" as opposed to "mkdir build && cd build && cmake .. && make". > > On a BSD system (where this wouldn't really work without the > corresponding debugfs entries) gmake could be used to build it > provided ncurses/pciaccess were around. > > If this legitimately makes it more stable to build on Linux systems > then I'm all for it. Can anyone elaborate on where the simple make > system would fail? > > (I'm not saying NAK I'm simply asking for my own edification). > > > Thanks, > Tom > > > > *From:* Edward O'Callaghan*Sent:* > Saturday, February 4, 2017 23:59 *To:* amd-gfx@lists.freedesktop.org > *Cc:* StDenis, Tom *Subject:* [RFC]: More robust build sys for UMR > > > Keeping with the tradition of changing the build system on initial > release, here we go again.. This follow series introduces the cmake > build system that is intended to be a little more robust across > various distros and presumably the BSD's also. The installation prefix > is configurable in the usual cmake way: `cmake - > DCMAKE_INSTALL_PREFIX:PATH=/usr ..` > > Please kindly review, > > Edward O'Callaghan (4): [PATCH 1/4] cmake_modules: Add libpciaccess > finder [PATCH 2/4] cmake: Initial build system [PATCH 3/4] README: > minor update for cmake buildsys [PATCH 4/4] drop orginal Makefile && > stub bin/ directory > > _ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Re: [RFC]: More robust build sys for UMR
Hi Edward, Well the patches apply and work but I'm not really sure what problem it's meant to solve [] . Building previously was actually simpler with "make" as opposed to "mkdir build && cd build && cmake .. && make". On a BSD system (where this wouldn't really work without the corresponding debugfs entries) gmake could be used to build it provided ncurses/pciaccess were around. If this legitimately makes it more stable to build on Linux systems then I'm all for it. Can anyone elaborate on where the simple make system would fail? (I'm not saying NAK I'm simply asking for my own edification). Thanks, Tom From: Edward O'CallaghanSent: Saturday, February 4, 2017 23:59 To: amd-gfx@lists.freedesktop.org Cc: StDenis, Tom Subject: [RFC]: More robust build sys for UMR Keeping with the tradition of changing the build system on initial release, here we go again.. This follow series introduces the cmake build system that is intended to be a little more robust across various distros and presumably the BSD's also. The installation prefix is configurable in the usual cmake way: `cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ..` Please kindly review, Edward O'Callaghan (4): [PATCH 1/4] cmake_modules: Add libpciaccess finder [PATCH 2/4] cmake: Initial build system [PATCH 3/4] README: minor update for cmake buildsys [PATCH 4/4] drop orginal Makefile && stub bin/ directory ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx