[GNC-dev] Fresh Windows build setup fails

John Ralls jralls at ceridwen.us
Sun Dec 27 19:25:26 EST 2020


Bob,

I poked at this for a few hours today. I found that the only thing that needs adjusting is to remove or comment out line 66 ($env:MSYSTEM = 'MINGW32') in buildserver/build_package.ps1.

I also found an error in jhbuild, this patch fixes it:
diff --git a/jhbuild/utils/packagedb.py b/jhbuild/utils/packagedb.py
index b938c27c..b9d6d135 100644
--- a/jhbuild/utils/packagedb.py
+++ b/jhbuild/utils/packagedb.py
@@ -76,7 +76,7 @@ class PackageEntry:
         # write manifest
         fileutils.mkdir_with_parents(os.path.join(self.dirname, 'manifests'))
         writer = fileutils.SafeWriter(os.path.join(self.dirname, 'manifests', self.package))
-        writer.fp.write('\n'.join(self.manifest).encode('utf-8', 'backslashreplace') + b'\n')
+        writer.fp.write('\n'.join(self._manifest).encode('utf-8', 'backslashreplace') + b'\n')
         writer.commit()

     def remove(self):

And things seem to be building OK now.

Regards,
John Ralls



> On Dec 26, 2020, at 4:01 AM, Robert Fewell <14ubobit at gmail.com> wrote:
> 
> John,
> Yes I did amend jhbuildrc.
> 
> Had another poke at it, I ran the setup-mingw64.ps1 file again using all defaults to completion.
> pkg-config gives said out put.
> Down graded cmake to version 3.18.4-1
> Installed mingw pkg-config which uninstalled pkgconf.
> 
> Changed to gnucash-on-windows.git and tried jhbuild command
> got error importing jhbuild - needed to change path.insert to be of form c:\\gcdev64\src\jhbuild.git'
> 
> Changing that then gave the subprocess error
> I then made all the changes in mypatch file which seemed to work but I then got the following directory structure c\gcdev64\downloads and gnucash....
> 
> So I changed  jhbuildrc to the following
> _basedir = "c:\gcdev64"
> _download_dir ="c:\gcdev64\downloads"
> 
> And now OpenSP was downloaded and started to configure and build I think and then errored.
> 
> That's as far I can go.
> 
> Regards,
> Bob
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On Sat, 26 Dec 2020 at 03:38, John Ralls <jralls at ceridwen.us> wrote:
> 
> 
> > On Dec 24, 2020, at 7:51 AM, Robert Fewell <14ubobit at gmail.com> wrote:
> > 
> > John,
> > 
> > I think this is down to paths / filenames, I can fix all the missing dependencies by doing this...
> > 
> > 
> >     c_include_search_paths = None
> >     for dep_type, value, altdeps in sysdeps:
> >         print("dep_type: ", dep_type)
> >         print("value is: ", value)
> >         dep_met = True
> >         if dep_type.lower() == 'path':
> >             if os.path.split(value)[0]:
> >                 if not os.path.isfile(value) and not os.access(value, os.X_OK):
> >                     dep_met = False
> >             else:
> >                 pathdirs = set(os.environ.get('PATH', '').split(os.pathsep))
> >                 pathdirs.update(['/sbin', '/usr/sbin'])
> >                 for path in pathdirs:
> >                     filename = os.path.join(path, value)
> >                     filename = filename.replace("/c/", "/")
> >                     print("path filename is: ", filename)
> >                     if os.path.isfile(filename) and os.access(filename, os.X_OK):
> >                         break
> >                     filename = filename + ".exe"
> >                     print("path filename is: ", filename)
> >                     if os.path.isfile(filename) and os.access(filename, os.X_OK):
> >                         break
> >                 else:
> >                     dep_met = False
> >         elif dep_type.lower() == 'c_include':
> >             if c_include_search_paths is None:
> >                 c_include_search_paths = get_c_include_search_paths(config)
> >             found = False
> >             for path in c_include_search_paths:
> >                 filename = os.path.join(path, value)
> >                 print("filename is: ", filename)
> >                 filename = filename.replace("/c/", "/")
> >                 print("filename is: ", filename)
> >                 if os.path.isfile(filename):
> >                     found = True
> >                     break
> >             if not found:
> >                 dep_met = False
> > 
> > Not very portable but may give you an idea for correct fix.
> > 
> > Now I get ....
> > Traceback (most recent call last):
> >   File "C:/gcdev64/msys2/usr/bin/jhbuild", line 23, in <module>
> >     jhbuild.main.main(sys.argv[1:])
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/main.py", line 120, in main
> >     rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/commands/__init__.py", line 188, in run
> >     return cmd.execute(config, args, help)
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/commands/__init__.py", line 56, in execute
> >     return self.run(config, options, args, help)
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/commands/base.py", line 262, in run
> >     build = jhbuild.frontends.get_buildscript(config, module_list, module_set=module_set)
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/frontends/__init__.py", line 27, in get_buildscript
> >     return BuildScript(config, module_list, module_set=module_set)
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/frontends/terminal.py", line 111, in __init__
> >     buildscript.BuildScript.__init__(self, config, module_list, module_set=module_set)
> >   File "c:\gcdev64\src\jhbuild.git/jhbuild/frontends/buildscript.py", line 78, in __init__
> >     subprocess.call(chrt_args + ['true'], stdout=devnull, stderr=devnull) == 0):
> > AttributeError: module 'jhbuild.utils.subprocess_win32' has no attribute 'call'
> 
> Bob,
> 
> Did you add that python fragment to jhbuildrc?
> 
> I tested two things yesterday: Installing a fresh build environment and running pacman -Syuu on my current one. In the latter I found that the replacement of pkg-config with pkgconf was a dependency of cmake 3.19 so I set an ignore on cmake in pacman.conf before allowing the upgrade to proceed. I also pulled the latest jhbuild. That one works fine.
> 
> I'm trying figure out what's making subprocess_win32 to break subprocess on the new install while it works OK on the old one. The python packages are the same and I've made sure that both jhbuild repos are at the current HEAD. I rolled back cmake to 3.18 and reinstalled pkg-config replacing pkgconf. 
> 
> Regards,
> John Ralls
> 
> 
> <0001-mychanges.patch>



More information about the gnucash-devel mailing list