[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Condor-devel] What does Condor _really_ depend on?
- Date: Mon, 30 Jul 2007 15:39:05 -0500
- From: Matthew Farrellee <matt@xxxxxxxxxxx>
- Subject: [Condor-devel] What does Condor _really_ depend on?
I set #define WANT_QUILL NO in my site.def to a very recent (today)
checkout of Condor's trunk, and my build fails.
I understand from Erik that quill has been integrated into parts of
Condor, but should it really be required? And is it really "quill" that
is required?
I went ahead and started a patch to make WANT_QUILL NO work. Below is a
patch to src/Imakefile so that a Condor build does not attempt to
compile quill code. I found that patching just Imakefiles is not enough
as pieces of quill code are not wrapped with "#if WANT_QUILL", e.g.
src/condor_schedd.C:355 references a variable prevLHF, which does not
defined via scheduler.h unless WANT_QUILL is YES.
Do those who know about Quill think the patch below should do the trick?
Conditionally Compiling Code:
When it comes to externals, it seems we have a number of different ways
of deciding if code should be compiled. There are a number of
WANT_/USE_/HAS_/HAVE_/DOES_ options (I understand many are *OLD*) in
different configuration files (site.def, <platform>.cf,
configure.cf.in/externals.cf.in), and little consistency as to what
should be used for new code. Speaking with Derek I've been told that
code should be conditionally compiled by HAVE_EXT_'s, but I've seen
recent code additions (including my proposed patch below) checking for
WANT_'s. Do people find that HAVE_EXT_'s are not good enough? Maybe
quill is a good example of this since it can work with multiple
databases (i.e. #if WANT_QUILL (above) vs #if HAVE_EXT_POSTGRESQL).
Testing of Conditional Compiled Code:
Given the complexity of the build system Condor probably isn't ever
compiled WANT_QUILL NO and WANT_QUILL YES (or WANT_PCRE NO/YES for that
matter), is it? Do people think it would be beneficial to have a more
complete builds, and would you be willing to help untangle the web of
how Condor's features map to externals (and to platforms)?
Adding New Externals:
New externals, it seems that when new externals are added to
externals.cf.in there is little consistency on testing for HAS_EXTERNALS
or HAVE_EXT_, or if either of those should be checked. Again, is this
because people don't know what the "right" thing is to do now, or is the
right thing not expressive enough?
Eek, this is getting long. Anyone going to read it?
Best,
matt
P.S. I also had to #define WANT_TT NO to get Condor to compile without
PostgreSQL. What's TT btw?
--
Index: Imakefile
===================================================================
RCS file: /p/condor/repository/CONDOR_SRC/src/Imakefile,v
retrieving revision 1.106
diff -u -r1.106 Imakefile
--- Imakefile 3 Jul 2007 00:33:58 -0000 1.106
+++ Imakefile 30 Jul 2007 16:41:47 -0000
@@ -55,8 +55,10 @@
#if WANT_QUILL
#define QuillProgs quill
+#define QuillLibs condor_quill/libquill.a
#else
#define QuillProgs
+#define QuillLibs
#endif
#if WANT_TT
@@ -82,7 +84,7 @@
condor_schedd.V6/libqmgmt.a \
condor_accountant.V6/libacct.a StdUnvLibs NetmanLibs \
condor_procd/procd_client.a \
- condor_privsep/privsep_client.a condor_quill/libquill.a \
+ condor_privsep/privsep_client.a QuillLibs \
chirp AnalysisLibs
#if HAS_STATIC
@@ -335,7 +337,9 @@
single_target(condor_schedd.V6,libqmgmt.a)
single_target(condor_accountant.V6,libacct.a)
single_target(condor_ckpt_server,ckpt_server_api.a)
+#if WANT_QUILL
single_target(condor_quill,libquill.a)
+#endif
condor_object_target(tests)
Index: condor_schedd.V6/schedd.C
===================================================================
RCS file: /p/condor/repository/CONDOR_SRC/src/condor_schedd.V6/schedd.C,v
retrieving revision 1.283
diff -u -r1.283 schedd.C
--- condor_schedd.V6/schedd.C 19 Jul 2007 21:27:14 -0000 1.283
+++ condor_schedd.V6/schedd.C 30 Jul 2007 17:45:13 -0000
@@ -352,7 +352,10 @@
last_reschedule_request = 0;
jobThrottleNextJobDelay = 0;
+
+#if WANT_QUILL
prevLHF = 0;
+#endif
}
@@ -738,8 +741,10 @@
daemonCore->UpdateLocalAd(ad);
+#if WANT_QUILL
// log classad into sql log so that it can be updated to DB
FILESQL::daemonAdInsert(ad, "ScheddAd", FILEObj, prevLHF);
+#endif
// Update collectors
int num_updates = daemonCore->sendUpdates(UPDATE_SCHEDD_AD, ad,
NULL, true);
Index: condor_tools/Imakefile
===================================================================
RCS file: /p/condor/repository/CONDOR_SRC/src/condor_tools/Imakefile,v
retrieving revision 1.70
diff -u -r1.70 Imakefile
--- condor_tools/Imakefile 26 Jun 2007 17:58:43 -0000 1.70
+++ condor_tools/Imakefile 30 Jul 2007 18:40:24 -0000
@@ -1,9 +1,14 @@
+#if WANT_QUILL
+#define QuillProgs condor_dump_history condor_load_history
+#else
+#define QuillProgs
+#endif
+
PROGRAMS = condor_config_val condor_preen condor_stats \
condor_userprio condor_history condor test_calc
condor_transfer_data \
view_collection condor_qedit condor_advertise
condor_version \
condor_fetchlog condor_findhost condor_cod condor_wait \
- condor_store_cred condor_convert_history
condor_dump_history \
- condor_load_history
+ condor_store_cred condor_convert_history QuillProgs
all_target( $(PROGRAMS) )