[Maria-developers] redundant compilation of targets in mariadb 10.0

hello all, I am trying to fix a few bugs but ever after small modifications in specific files, make command build all targets irrespective of whether or not they are dependent on the modified source. I am no expert in build commands but this seem off since it keeps taking exceptionally long time to build. Is there a trick/workaround that can prevent all targets from being built. Or am I missing something. -- Cheerio! *Rohit* *http://rohitkalhans.com <http://rohitkalhans.com>*

Hi, Rohit! On Mar 16, Rohit Kalhans wrote:
hello all,
I am trying to fix a few bugs but ever after small modifications in specific files, make command build all targets irrespective of whether or not they are dependent on the modified source. I am no expert in build commands but this seem off since it keeps taking exceptionally long time to build.
Is there a trick/workaround that can prevent all targets from being built. Or am I missing something.
Please explain in details what you have changed and what is being built that you think shouldn't be. cmake is usually pretty good in tracking dependencies. Regards, Sergei

hello Sergei the modification was made in some replication specific files rpl_gtid.h & rpl_gtid.cc *rohit@ubuntu:/work/mariadb/mariadb/mariadb10$ bzr st * *modified:* * sql/rpl_gtid.cc* * sql/rpl_gtid.h* *unknown:* * mysql-test/suite/rpl/t/rpl_x.test* There are a lot of targets being rebuild. 1. stroage* perfschema aria xtradb 2. handlers 3. sql core item* and many others. I have attached the build output here. Also tokud fails to build since its not -werror safe, so i had to build without it. here is the cmake command *cmake -DWITHOUT_TOKUDB=1* Hope it helps. Rohit. On Mon, Mar 17, 2014 at 1:17 AM, Sergei Golubchik <serg@mariadb.org> wrote:
Hi, Rohit!
On Mar 16, Rohit Kalhans wrote:
hello all,
I am trying to fix a few bugs but ever after small modifications in specific files, make command build all targets irrespective of whether or not they are dependent on the modified source. I am no expert in build commands but this seem off since it keeps taking exceptionally long time to build.
Is there a trick/workaround that can prevent all targets from being built. Or am I missing something.
Please explain in details what you have changed and what is being built that you think shouldn't be.
cmake is usually pretty good in tracking dependencies.
Regards, Sergei
-- Cheerio! *Rohit*

Apart from the above even if i try to build twice without any modification, it builds all the target again. I have confirmed that none of the files was 'touched'. Also if it is relevant in some way the bug i was trying to fix is MDEV-5873. i have changed some function signatures in the header and ~5 lines of change in the cc file. On Mon, Mar 17, 2014 at 2:03 AM, Rohit Kalhans <rohit.kalhans@gmail.com>wrote:
hello Sergei
the modification was made in some replication specific files rpl_gtid.h & rpl_gtid.cc
*rohit@ubuntu:/work/mariadb/mariadb/mariadb10$ bzr st * *modified:* * sql/rpl_gtid.cc* * sql/rpl_gtid.h* *unknown:* * mysql-test/suite/rpl/t/rpl_x.test*
There are a lot of targets being rebuild. 1. stroage* perfschema aria xtradb 2. handlers 3. sql core item*
and many others. I have attached the build output here.
Also tokud fails to build since its not -werror safe, so i had to build without it.
here is the cmake command
*cmake -DWITHOUT_TOKUDB=1*
Hope it helps.
Rohit.
On Mon, Mar 17, 2014 at 1:17 AM, Sergei Golubchik <serg@mariadb.org>wrote:
Hi, Rohit!
On Mar 16, Rohit Kalhans wrote:
hello all,
I am trying to fix a few bugs but ever after small modifications in specific files, make command build all targets irrespective of whether or not they are dependent on the modified source. I am no expert in build commands but this seem off since it keeps taking exceptionally long time to build.
Is there a trick/workaround that can prevent all targets from being built. Or am I missing something.
Please explain in details what you have changed and what is being built that you think shouldn't be.
cmake is usually pretty good in tracking dependencies.
Regards, Sergei
-- Cheerio!
*Rohit*
-- Cheerio! *Rohit*

Rohit Kalhans <rohit.kalhans@gmail.com> writes:
Also if it is relevant in some way the bug i was trying to fix is MDEV-5873. i have changed some function signatures in the header and ~5 lines of change in the cc file.
Oh, you're looking into that? I do hope you will share any findings :-) I was rather annoyed that I ended up releasing with this bug/limitation, I *think* it should be possible to do it correctly in a reasonable way, but I haven't had time to think it through yet. I'd be fantastic to get this one fixed. Unfortunately, I do not know how to solve the problem with excessive rebuild. I know that when I change most any .h file it ends up rebuilding a _lot_ of stuff, I always assumed it was just everything including most everything else recursively. But that does not help explain the second rebuild with no file changes. - Kristian.

Hi, Rohit! On Mar 17, Rohit Kalhans wrote:
Apart from the above even if i try to build twice without any modification, it builds all the target again. I have confirmed that none of the files was 'touched'.
I have never seen that. And I've just tried again - nope, no target is rebuilt. This was always the case - if none of the files is touched, nothing is rebuilt. Regards, Sergei

Hi, Rohit! On Mar 17, Rohit Kalhans wrote:
hello Sergei
the modification was made in some replication specific files rpl_gtid.h & rpl_gtid.cc
*rohit@ubuntu:/work/mariadb/mariadb/mariadb10$ bzr st * *modified:* * sql/rpl_gtid.cc* * sql/rpl_gtid.h* *unknown:* * mysql-test/suite/rpl/t/rpl_x.test*
There are a lot of targets being rebuild. 1. stroage* perfschema aria xtradb 2. handlers 3. sql core item*
This is correct. It happens because sql_class.h includes rpl_gtid.h. And almost every storage engine, items, everything needs THD that is declared in sql_class.h You can easily verify that yourself, put #error into rpl_gtid.h and you'll see that lots of files will not compile - which means all these files include rpl_gtid.h and they have to be rebuilt when rpl_gtid.h changes. Regards, Sergei
participants (3)
-
Kristian Nielsen
-
Rohit Kalhans
-
Sergei Golubchik