[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: More win32 compile errors...

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-04-28 01:06:20 CEST

John Barstow wrote:

>Well, the recompile of 2.0.45 seemed to fix the syntax error issues. I will
>write up a HOWTO once I get this thing built successfully.
>
>However, I now have 797 unresolved external symbols. It looks like the
>generated dsp files do not link the apr libraries in to any of the
>command-line clients.
>
I posted a patch for that a couple of days ago (attached).

> I get the feeling that I am the first person actually
>attempting to build this under Win32.
>
Nope.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/

attached mail follows:


Karl Fogel wrote:

>Branko Čibej <brane@xbc.nu> writes:
>
>
>>The Windows build doesn't work, either. The current problem seems to be
>>missing project dependencies (libraries), and the test programs still
>>don't compile. As I said, I don't have time to work on this right now.
>>
>>
>
>Yah, and heck, you shouldn't have to anyway.
>
>I think a delay in one milestone is not a big deal, since the effect
>will not cascade to future milestones (as development time was not
>affected). Greg thought he had fixed all the problems and innocently
>went on vacation; he was wrong, but it was an easy mistake to make, he
>just forgot to test this one flag.
>
>

Well, whoever has time to fiddle with the Win32 build can start with the
following patch.

Here's what it does:

    * Replaces depending on the $HTTPD environment variable with a
      --with-httpd switch to gen-make.py that tells it where the Apache
      sources are (for mod_dav_svn.dsp)
    * Fixed the dependencies somewhat:
          o Adds __config__ to the dependency lists of most every subproject
          o Makes library dependencies explicit

Subversion and mod_dav_svn build for me now, but thex don't run (every
executable stops with exception 0x00000022). Beats me why...

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
Index: build/generator/gen_vcnet_vcproj.py
===================================================================
--- build/generator/gen_vcnet_vcproj.py	(revision 5729)
+++ build/generator/gen_vcnet_vcproj.py	(working copy)
@@ -14,7 +14,8 @@
 class Generator(gen_win.WinGeneratorBase):
   "Generate a Visual C++.NET project"
 
-  def __init__(self, fname, verfname):
+  def __init__(self, fname, verfname, options):
+    self.parse_options(options)
     gen_win.WinGeneratorBase.__init__(self, fname, verfname, 'vcnet-vcproj')
 
   def default_output(self, oname):
Index: build/generator/gen_base.py
===================================================================
--- build/generator/gen_base.py	(revision 5729)
+++ build/generator/gen_base.py	(working copy)
@@ -24,7 +24,7 @@
   #        file-type is 'target', 'object', ...
   #
 
-  def __init__(self, fname, verfname):
+  def __init__(self, fname, verfname, options=None):
     parser = ConfigParser.ConfigParser(_cfg_defaults)
     parser.read(fname)
 
@@ -50,8 +50,14 @@
     self.infopages = [ ]
     self.graph = DependencyGraph()
 
+    if not hasattr(self, 'skip_targets'):
+      self.skip_targets = { }
+
     # PASS 1: collect the targets and some basic info
     for target in _filter_targets(parser.sections()):
+      if self.skip_targets.has_key(target):
+        continue
+
       install = parser.get(target, 'install')
       type = parser.get(target, 'type')
 
Index: build/generator/gen_win.py
===================================================================
--- build/generator/gen_win.py	(revision 5729)
+++ build/generator/gen_win.py	(working copy)
@@ -29,7 +29,7 @@
 
   envvars={
     "$(SVN_APR_LIBS)": ["apr"],
-    "$(SVN_APRUTIL_LIBS)": ["aprutil"],
+    "$(SVN_APRUTIL_LIBS)": ["aprutil", "apriconv"],
     "$(NEON_LIBS)":  ["neon"],
     "$(SVN_DB_LIBS)": [],
     "$(SVN_XMLRPC_LIBS)": [],
@@ -48,6 +48,15 @@
       open(dest,'wb').write(open(src, 'rb').read())
       os.unlink(src)
 
+  def parse_options(self, options):
+    for opt, val in options:
+      if opt == '--with-httpd':
+        self.httpd_path = val
+        break
+    else:
+      self.httpd_path = None
+      self.skip_targets = { 'mod_dav_svn': None }
+
   def __init__(self, fname, verfname, subdir):
     """
     Do some Windows specific setup
@@ -68,7 +77,6 @@
 
     """
 ### GJS: don't do this right now
-#    self.copyfile(os.path.join("subversion","libsvn_subr","getdate.c"), os.path.join("subversion","libsvn_subr","getdate.cw"))
 #    self.movefile(os.path.join("subversion","mod_dav_svn","davlog.c"), os.path.join("subversion","mod_dav_svn","log.c"))
 #    self.movefile(os.path.join("subversion","mod_dav_svn","davrepos.c"), os.path.join("subversion","mod_dav_svn","repos.c"))
 
@@ -110,6 +118,8 @@
         print 'Wrote %s' % svnissdeb
 
     #Initialize parent
+    self.copyfile(os.path.join("subversion","libsvn_subr","getdate.c"),
+                  os.path.join("subversion","libsvn_subr","getdate.cw"))
     gen_base.GeneratorBase.__init__(self, fname, verfname)
 
     #Make the project files directory if it doesn't exist
@@ -238,10 +248,10 @@
                                         ""],
                                        rootpath)
       fakeincludes.extend([
-        "$(HTTPD)/srclib/apr/include",
-        "$(HTTPD)/srclib/apr-util/include",
-        "$(HTTPD)/srclib/apr-util/xml/expat/lib",
-        "$(HTTPD)/include"
+        self.httpd_path + "/srclib/apr/include",
+        self.httpd_path + "/srclib/apr-util/include",
+        self.httpd_path + "/srclib/apr-util/xml/expat/lib",
+        self.httpd_path + "/include"
         ])
     else:
       fakeincludes = self.map_rootpath(["subversion/include",
@@ -264,11 +274,11 @@
     if target.name == 'mod_dav_svn':
       fakelibdirs = self.map_rootpath([self.dblibpath], rootpath)
       fakelibdirs.extend([
-        "$(HTTPD)/%s" % cfg,
-        "$(HTTPD)/modules/dav/main/%s" % cfg,
-        "$(HTTPD)/srclib/apr/%s" % cfg,
-        "$(HTTPD)/srclib/apr-util/%s" % cfg,
-        "$(HTTPD)/srclib/apr-util/xml/expat/lib/%s" % libcfg
+        self.httpd_path + "/%s" % cfg,
+        self.httpd_path + "/modules/dav/main/%s" % cfg,
+        self.httpd_path + "/srclib/apr/%s" % cfg,
+        self.httpd_path + "/srclib/apr-util/%s" % cfg,
+        self.httpd_path + "/srclib/apr-util/xml/expat/lib/%s" % libcfg
         ])
     else:
       fakelibdirs = self.map_rootpath([self.dblibpath], rootpath)
Index: build/generator/gen_msvc_dsp.py
===================================================================
--- build/generator/gen_msvc_dsp.py	(revision 5729)
+++ build/generator/gen_msvc_dsp.py	(working copy)
@@ -14,7 +14,8 @@
 class Generator(gen_win.WinGeneratorBase):
   "Generate a Microsoft Visual C++ 6 project"
 
-  def __init__(self, fname, verfname):
+  def __init__(self, fname, verfname, options):
+    self.parse_options(options)
     gen_win.WinGeneratorBase.__init__(self, fname, verfname, 'msvc-dsp')
 
   def default_output(self, conf_path):
@@ -127,21 +128,36 @@
       # For MSVC we need to hack around mod_dav_svn &
       # libsvn_ra because dependencies implies linking
       # and there is no way around that
-      depends = []
+      if name == '__config__':
+        depends = []
+      else:
+        depends = [self.targets['__config__']]
+
       if name == 'mod_dav_svn':
-        depends = []
+        pass
       elif name == 'depdelta':
-        depends = [self.targets['libsvn_delta']]
+        depends += [self.targets['libsvn_delta']]
       elif name == 'libsvn_wc':
-        depends = [self.targets['depdelta']]
+        depends += [self.targets['depdelta']]
       elif name == 'depsubr':
-        depends = [self.targets['libsvn_subr']]
+        depends += [self.targets['libsvn_subr']]
       elif name == 'libsvn_ra_svn':
-        depends = [self.targets['depsubr']]
+        depends += [self.targets['depsubr']]
       elif name == 'libsvn_ra_dav':
-        depends = [self.targets['depsubr'], self.targets['neon']]
+        depends += [self.targets['depsubr'], self.targets['neon']]
       elif isinstance(target, gen_base.Target):
-        depends = self.get_unique_win_depends(target)
+        if isinstance(target, gen_base.TargetExe):
+          deps = { }
+          for obj in self.get_win_depends(target, 0):
+            deps[obj] = None
+          for obj in self.get_win_depends(target, 2):
+            if isinstance(obj, gen_base.TargetLib):
+              deps[obj] = None
+          deps = deps.keys()
+          deps.sort()
+          depends += deps
+        else:
+          depends += self.get_unique_win_depends(target)
       else:
         assert 0
 
Index: gen-make.py
===================================================================
--- gen-make.py	(revision 5729)
+++ gen-make.py	(working copy)
@@ -29,7 +29,8 @@
   'make-bcpp' : ('gen_bcpp_make', '### need description'),
   }
 
-def main(fname, gentype, verfname=None, oname=None, skip_depends=0):
+def main(fname, gentype, verfname=None, oname=None,
+         skip_depends=0, other_options=None):
   if verfname is None:
     verfname = os.path.join('subversion', 'include', 'svn_version.h')
 
@@ -39,7 +40,7 @@
     print 'ERROR: the "%s" generator is not yet implemented.' % gentype
     sys.exit(1)
 
-  generator = gen_module.Generator(fname, verfname)
+  generator = gen_module.Generator(fname, verfname, other_options)
   if not skip_depends:
     generator.compute_hdr_deps()
 
@@ -64,7 +65,8 @@
 
 if __name__ == '__main__':
   try:
-    opts, args = getopt.getopt(sys.argv[1:], 'st:')
+    opts, args = getopt.getopt(sys.argv[1:], 'st:',
+                               ['with-httpd='])
     if len(args) > 1:
       _usage_exit()
   except getopt.GetoptError:
@@ -73,6 +75,7 @@
   conf = 'build.conf'
   skip = 0
   gentype = 'make'
+  rest = []
 
   if args:
     conf = args[0]
@@ -82,11 +85,13 @@
       skip = 1
     elif opt == '-t':
       gentype = val
+    else:
+      rest.append((opt, val))
 
   if gentype not in gen_modules.keys():
     _usage_exit()
 
-  main(conf, gentype, skip_depends=skip)
+  main(conf, gentype, skip_depends=skip, other_options=rest)
 
 
 ### End of file.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Apr 28 01:07:04 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.