[GNC-dev] Fresh Windows build setup fails

Robert Fewell 14ubobit at gmail.com
Thu Dec 24 10:51:22 EST 2020


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'

Regards,
Bob



On Thu, 24 Dec 2020 at 10:07, Sumit Bhardwaj <bhardwajs at outlook.com> wrote:

> I was trying around the same time as Robert on a fresh Windows machine and
> it failed as well. With the same message.
>
> -Sumit
>
> -----Original Message-----
> From: gnucash-devel <gnucash-devel-bounces+bhardwajs=
> outlook.com at gnucash.org> On Behalf Of Robert Fewell
> Sent: Thursday, December 24, 2020 02:02
> To: John Ralls <jralls at ceridwen.us>
> Cc: gnucash-devel <gnucash-devel at gnucash.org>
> Subject: Re: [GNC-dev] Fresh Windows build setup fails
>
> John,
>
> Every thing above from 'My last attempt...' was done from the MINGW64
> terminal prompt.
>
> Regards,
> Bob
>
> On Thu, 24 Dec 2020 at 01:31, John Ralls <jralls at ceridwen.us> wrote:
>
> >
> >
> > > On Dec 23, 2020, at 6:50 AM, Robert Fewell <14ubobit at gmail.com> wrote:
> > >
> > > Hi,
> > >
> > > My Windows 10 hard drive failed which I thought would not be a big
> > > deal
> > as
> > > I only use it to build and test the windows build. After installing
> > Windows
> > > 10 and updating I grabbed the setup-mingw64.ps1 file and proceeded
> > > to recreate my build system.
> > >
> > > Unfortunately that did not work, tried the 32bit and 64bit versions
> > > which both failed. The first problem was that pkg-config --list-all
> > > would list all the packages with a starting forward slash with
> > > problems also in jhbuild.
> > >
> > > So tried another tact, I had an old backup from March which I
> > > restored
> > and
> > > then proceeded to update but that resulted in pacman listing loads
> > > of missing packages in the 'virtual world'
> > >
> > > My last attempt was to do the script manually, all OK till line 241
> > > where it installed mingw64/cmake and pkg-config. Once these were
> > > installed pkg-config --list-all would list with forward slash's. To
> > > overcome this I uninstalled them and installed msys versions and
> > > proceeded to the end of script.
> > >
> > > I have not checked the whether the boost version is correct for the
> > webkit
> > > version as to start with I just wanted a valid dependency.
> > >
> > > Changed to the gnucash-on-windows.git directory to start the build
> > > but
> > that
> > > failed as follows...
> > >
> > > Failed to 'import jhbuild' on line 15
> > >   to fix I changed line 12 to sys.path.insert(0,
> > > 'c:/gcdev64/src/jhbuild.git')
> > >
> > > Next was subprocess_win32 has no check_output  so added a line
> > > check_output = real_subprocess.check_output to subprocess_win32.py
> > >
> > > Which resulted in a string has no split method in systeminstall.py
> > > so changed shell_split = string.split to shell_split = str.split
> > >
> > > I am not sure these changes are correct as I know nothing about
> > > python
> > but
> > > I can now run...
> > >
> > > $ TARGET=gnucash-maint jhbuild -f jhbuildrc build Required packages:
> > >  System installed packages which are too old:
> > >    (none)
> > >  No matching system package installed:
> > >    make
> > >    gcrypt
> > >    pkg-config
> > >    gmp
> > >    git
> > >    boost
> > >    cmake
> > >    ninja
> > >
> > > The strange thing is that all these are installed as...
> > > cmake --version gives 3.18.4, ninja --version gives 1.10.2
> > >
> > > So the question is, has anybody recently done a fresh build setup
> > > install and it worked or know how to fix.
> >
> > Bob,
> >
> > Are you trying to run MSYS2 commands from a CMD or Powershell window
> > instead of from an MinGW32/64 one?
> >
> > Regards,
> > John Ralls
> >
> >
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
>
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.gnucash.org%2Fmailman%2Flistinfo%2Fgnucash-devel&data=04%7C01%7C%7C28d9450ad55d4a9a24f508d8a7f32a45%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637444010130223888%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=DtWcT38sL5wOO0vMcHzlZXc0GeaM7LV4zwYjHoK5N9Y%3D&reserved=0
>


More information about the gnucash-devel mailing list