Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors with Python3 eopkg #78

Open
Staudey opened this issue Jun 15, 2024 · 5 comments
Open

Build errors with Python3 eopkg #78

Staudey opened this issue Jun 15, 2024 · 5 comments

Comments

@Staudey
Copy link
Member

Staudey commented Jun 15, 2024

Trying to build certain 3rd-party packages from the python3 branch with Python3 eopkg (eopkg.py3 from the new eopkg package) fails.

(click to expand)

Spotify:

Download retry mechanism seems to be non-functional and build continues to checksum process with incomplete download

spotify-client_1.2.37.701.ge66eb7bc_amd64.deb (137.8 MB) 72%     18.61 MB/s  [00:00:02]
Source archive is stored: /var/cache/eopkg/archives/spotify-client_1.2.37.701.ge66eb7bc_amd64.deb
Unpacking archive(s)...
Program terminated.
unpack: check_file_hash failed
Please use 'eopkg help' for general help.
Insync:(fixed)
Building package: insync
DEBUG: Checking /var/eopkg/insync-3.9.0.60000-97/install/usr/lib/insync/libcairo.so.2 for binary dependencies
DEBUG: return value for "LC_ALL=C /usr/bin/readelf -d /var/eopkg/insync-3.9.0.60000-97/install/usr/lib/insync/libcairo.so.2" is 0
System error. Program terminated.
<class 'TypeError'>: a bytes-like object is required, not 'str'
Please use 'eopkg help' for general help.

Traceback:
  File "/usr/bin/eopkg.py3", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/scripts/eopkg.py", line 78, in main
    cli.run_command()
  File "/usr/lib/python3.11/site-packages/pisi/cli/pisicli.py", line 131, in run_command
    self.command.run()
  File "/usr/lib/python3.11/site-packages/pisi/cli/build.py", line 209, in run
    pisi.api.build(x)
  File "/usr/lib/python3.11/site-packages/pisi/api.py", line 954, in build
    return pisi.atomicoperations.build(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/atomicoperations.py", line 723, in build
    return pisi.operations.build.build(package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1780, in build
    pb.build()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 398, in build
    self.build_packages()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1632, in build_packages
    self.gen_metadata_xml(package)
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1173, in gen_metadata_xml
    bindeps = self.get_binary_deps(fullpath, filemagic)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1035, in get_binary_deps
    so_deps = self.accumulate_dependencies(fullpath, emul32)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1473, in accumulate_dependencies
    for line in out.split("\n"):
                ^^^^^^^^^^^^^^^
Scrivener:(fixed)

Some sort of file name encoding error (we love those, don't we?)

Building package: scrivener
Creating scrivener-1.9.0.1-4-1-x86_64.eopkg...
System error. Program terminated.
<class 'FileNotFoundError'>: [Errno 2] No such file or directory: 'install/usr/share/scrivener/bin/Aspell/dict/espa?ol.alias'
Please use 'eopkg help' for general help.

Traceback:
  File "/usr/bin/eopkg.py3", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/scripts/eopkg.py", line 78, in main
    cli.run_command()
  File "/usr/lib/python3.11/site-packages/pisi/cli/pisicli.py", line 131, in run_command
    self.command.run()
  File "/usr/lib/python3.11/site-packages/pisi/cli/build.py", line 209, in run
    pisi.api.build(x)
  File "/usr/lib/python3.11/site-packages/pisi/api.py", line 954, in build
    return pisi.atomicoperations.build(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/atomicoperations.py", line 723, in build
    return pisi.operations.build.build(package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1780, in build
    pb.build()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 398, in build
    self.build_packages()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1677, in build_packages
    pkg.add_to_install(orgname, finfo.path)
  File "/usr/lib/python3.11/site-packages/pisi/package.py", line 135, in add_to_install
    self.install_archive.add_to_archive(name, arcname)
  File "/usr/lib/python3.11/site-packages/pisi/archive.py", line 478, in add_to_archive
    self.tar.add(file_name.decode("latin-1"), arc_name)
  File "/usr/lib/python3.11/tarfile.py", line 2165, in add
    tarinfo = self.gettarinfo(name, arcname)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/tarfile.py", line 2038, in gettarinfo
    statres = os.lstat(name)
              ^^^^^^^^^^^^^^
Sublime Text:

Working around this by simply dropping the compression level leads to the same error as with Android Studio

sublime_text_build_4169_x64.tar.xz [cached]
Unpacking archive(s)...
System error. Program terminated.
<class 'ValueError'>: Cannot specify a preset compression level when opening a file for reading
Please use 'eopkg help' for general help.

Traceback:
  File "/usr/bin/eopkg.py3", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/scripts/eopkg.py", line 78, in main
    cli.run_command()
  File "/usr/lib/python3.11/site-packages/pisi/cli/pisicli.py", line 131, in run_command
    self.command.run()
  File "/usr/lib/python3.11/site-packages/pisi/cli/build.py", line 209, in run
    pisi.api.build(x)
  File "/usr/lib/python3.11/site-packages/pisi/api.py", line 954, in build
    return pisi.atomicoperations.build(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/atomicoperations.py", line 723, in build
    return pisi.operations.build.build(package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1780, in build
    pb.build()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 379, in build
    self.unpack_source_archives()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 569, in unpack_source_archives
    self.sourceArchives.unpack(self.pkg_work_dir())
  File "/usr/lib/python3.11/site-packages/pisi/sourcearchive.py", line 34, in unpack
    self.sourceArchives[0].unpack(target_dir, clean_dir)
  File "/usr/lib/python3.11/site-packages/pisi/sourcearchive.py", line 125, in unpack
    archive.unpack(target_dir, clean_dir)
  File "/usr/lib/python3.11/site-packages/pisi/archive.py", line 785, in unpack
    self.archive.unpack(target_dir, clean_dir)
  File "/usr/lib/python3.11/site-packages/pisi/archive.py", line 267, in unpack
    self.unpack_dir(target_dir)
  File "/usr/lib/python3.11/site-packages/pisi/archive.py", line 293, in unpack_dir
    self.tar = TarFile.lzmaopen(self.file_path, fileobj=self.fileobj)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/archive.py", line 121, in lzmaopen
    fileobj = lzma.LZMAFile(name, mode, format=1, preset=compresslevel)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/lzma.py", line 102, in __init__
    raise ValueError("Cannot specify a preset compression "
Android Studio:(fixed)
Setting up source...
System error. Program terminated.
<class 'AttributeError'>: 'generator' object has no attribute 'next'
Please use 'eopkg help' for general help.

Traceback:
  File "/usr/bin/eopkg.py3", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/scripts/eopkg.py", line 78, in main
    cli.run_command()
  File "/usr/lib/python3.11/site-packages/pisi/cli/pisicli.py", line 131, in run_command
    self.command.run()
  File "/usr/lib/python3.11/site-packages/pisi/cli/build.py", line 209, in run
    pisi.api.build(x)
  File "/usr/lib/python3.11/site-packages/pisi/api.py", line 954, in build
    return pisi.atomicoperations.build(*args, **kw)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/atomicoperations.py", line 723, in build
    return pisi.operations.build.build(package)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 1780, in build
    pb.build()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 391, in build
    self.run_setup_action()
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 582, in run_setup_action
    if self.run_action_function(ctx.const.setup_func):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 748, in run_action_function
    src_dir = self.pkg_src_dir()
              ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pisi/operations/build.py", line 728, in pkg_src_dir
    self.pkg_work_dir(), os.walk(self.pkg_work_dir()).next()[1][0]
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ahahn94
Copy link
Contributor

ahahn94 commented Sep 14, 2024

@Staudey Builds for the JetBrains IDEs are failing, too:

JetBrains.Rider-2024.2.4.tar.gz [gecached]
Datei wird entpackt...
Systemfehler. Programmausführung abgebrochen.
<type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'seek'
Bitte geben Sie 'eopkg help' für die allgemeine Hilfe ein

Traceback:
  File "/usr/bin/eopkg", line 78, in <module>
    cli.run_command()
  File "/usr/lib/python2.7/site-packages/pisi/cli/pisicli.py", line 138, in run_command
    self.command.run()
  File "/usr/lib/python2.7/site-packages/pisi/cli/build.py", line 179, in run
    pisi.api.build(x)
  File "/usr/lib/python2.7/site-packages/pisi/api.py", line 875, in build
    return pisi.atomicoperations.build(*args, **kw)
  File "/usr/lib/python2.7/site-packages/pisi/atomicoperations.py", line 666, in build
    return pisi.operations.build.build(package)
  File "/usr/lib/python2.7/site-packages/pisi/operations/build.py", line 1615, in build
    pb.build()
  File "/usr/lib/python2.7/site-packages/pisi/operations/build.py", line 363, in build
    self.unpack_source_archives()
  File "/usr/lib/python2.7/site-packages/pisi/operations/build.py", line 537, in unpack_source_archives
    self.sourceArchives.unpack(self.pkg_work_dir())
  File "/usr/lib/python2.7/site-packages/pisi/sourcearchive.py", line 39, in unpack
    self.sourceArchives[0].unpack(target_dir, clean_dir)
  File "/usr/lib/python2.7/site-packages/pisi/sourcearchive.py", line 120, in unpack
    archive.unpack(target_dir, clean_dir)
  File "/usr/lib/python2.7/site-packages/pisi/archive.py", line 802, in unpack
    self.archive.unpack(target_dir, clean_dir)
  File "/usr/lib/python2.7/site-packages/pisi/archive.py", line 268, in unpack
    self.unpack_dir(target_dir)
  File "/usr/lib/python2.7/site-packages/pisi/archive.py", line 286, in unpack_dir
    files = self._tar_file_list()
  File "/usr/lib/python2.7/site-packages/pisi/archive.py", line 485, in _tar_file_list
    self.fileobj.seek(0)

I'll create a Pull Request with the updates of this week and reference this issue there.

@joebonrichie
Copy link

Possibly fixed by: getsolus/eopkg#81

@Staudey
Copy link
Member Author

Staudey commented Sep 14, 2024

I've created a new issue for that error, as it's not Python3 specific. @joebonrichie unfortunately that PR doesn't seem to help with this particular problem

@Staudey
Copy link
Member Author

Staudey commented Sep 14, 2024

Note: Switching to the http download (again 😮‍💨) makes the Spotify build work fine for me. But then again that had other people see issues recently. I guess Spotify will never work quite right for everyone. The fact that it seems to stop with an incomplete download from the https URL is concerning though.

@Staudey
Copy link
Member Author

Staudey commented Oct 6, 2024

Note: Scrivener build can be fixed / worked around with asciify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants