From: Koichi S. <koi...@gm...> - 2012-04-13 09:09:38
|
I did the same thing and had the following: ============================ [koichi@willey:recovery]$ pwd /home/common/PGXC/pgxc_head/postgres-xc/src/gtm/recovery [koichi@willey:recovery]$ touch register_gtm.c [koichi@willey:recovery]$ git branch REL0_9_7_STABLE * master [koichi@willey:recovery]$ make gcc -DPGXC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -g -fpic -I../../../src/include -D_GNU_SOURCE -DSO_MAJOR_VERSION=1 -c -o register_gtm.o register_gtm.c gcc -DPGXC -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wformat-security -fno-strict-aliasing -fwrapv -g -fpic -shared -Wl,-soname,libgtmrecovery.so.1 -o libgtmrecovery.so.1.0 register_common.o register_gtm.o replication.o standby_utils.o -L../../../src/port -lpthread -Wl,--as-needed -Wl,-rpath,'/home/koichi/pgxc/lib',--enable-new-dtags rm -f libgtmrecovery.so.1 ln -s libgtmrecovery.so.1.0 libgtmrecovery.so.1 rm -f libgtmrecovery.so ln -s libgtmrecovery.so.1.0 libgtmrecovery.so ar crs libgtmrecovery.a register_common.o register_gtm.o replication.o standby_utils.o ranlib libgtmrecovery.a [koichi@willey:recovery]$ ============================ I did this using ubuntu 10.4 64bit for X64_64 (AMD64) architecture. Version of make is GNU Make 3.81. All the source code was taken from original GIT repository at sourceforge. Of course, "make" at this directory does not compile all the GTM, just local sources to be linked with others. What environment are you working at? Regards; ---------- Koichi Suzuki 2012年4月13日3:53 Tejeswar Mupparti <tej...@ho...>: > Thanks Koichi and Michael, may be I'm doing something incorrect > > > [tmuppart@centos0002 main]$ pwd > > /home/tmuppart/Install/pgxc/src/gtm/main > > [tmuppart@centos0002 main]$ touch ../recovery/register_gtm.c > > [tmuppart@centos0002 main]$ make > > make: Nothing to be done for `all'. > > I'm expecting here gtm binary to be built. > > > [tmuppart@centos0002 gtm]$ pwd > /home/tmuppart/Install/pgxc/src/gtm > > [tmuppart@centos0002 gtm]$ touch recovery/register_gtm.cpp > [tmuppart@centos0002 gtm]$ make > > ar crs libgtmrecovery.a register_common.o register_gtm.o replication.o > standby_utils.o > ranlib libgtmrecovery.a > > I see libgtmrecovery built, but not gtm binary, So I added a dependency rule > in > > /home/tmuppart/Install/pgxc/src/gtm/main/Makefile > > something like this > > gtm:$(OBJS) $(OTHERS) > > it started building the gtm binary when ever I modify files > in /home/tmuppart/Install/pgxc/src/gtm/recovery directory > > Regards > Teja > > >> Date: Thu, 12 Apr 2012 13:45:09 +0900 >> From: ko...@in... >> To: mic...@gm... >> CC: tej...@ho...; pos...@li... >> Subject: Re: [Postgres-xc-general] Minor GTM compile question > >> >> If you mena register_gtm.c, not register_gtm.cpp, then you don't need to >> modify Makefile unless you're using another module. >> --- >> Koichi Suzuki >> >> On Thu, 12 Apr 2012 12:43:24 +0900 >> Michael Paquier <mic...@gm...> wrote: >> >> > On Thu, Apr 12, 2012 at 9:12 AM, Tejeswar Mupparti >> > <tej...@ho...>wrote: >> > >> > > Hi, >> > > >> > > In my recent experiments with GTM, I made some changes to the file >> > > >> > > "gtm/recovery/register_gtm.cpp" >> > > >> > Neither PostgreSQL nor Postgres-XC have c++ files. I am sure you are >> > talking about register_gtm.c. >> > >> > >> > >> > > >> > > and called >> > > >> > > gtm> make >> > > >> > Is it a make done from the folder src/gtm, or the folder src/gtm/main. >> > In src/gtm/main, recovery library is referenced already so it should be >> > enough with the current structure, or I am missing smth. >> > >> > >> > > to build the "gtm binary" with my latest changes, but later realized >> > > it's >> > > not picking up my chnages to any of the files made under >> > > "gtm/recovery" >> > > directory. It looks like the depenedency >> > > link in Makefile is missing >> > > >> > > > gtm:$(OBJS) <---- Original >> > > --- >> > > < gtm:$(OBJS) $(OTHERS) <-- works >> > > >> > > >> > > p.s. I'm not a Makefile expert :), but just hacked it this way, please >> > > let >> > > me know if I'm not setting up my codeline incorrect. >> > > >> > I am not sure what you are trying to achieve, if you can provide a patch >> > though... >> > -- >> > Michael Paquier >> > http://michael.otacoo.com > > ------------------------------------------------------------------------------ > For Developers, A Lot Can Happen In A Second. > Boundary is the first to Know...and Tell You. > Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! > http://p.sf.net/sfu/Boundary-d2dvs2 > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > |