cflavio / yorg

Yorg (Yorg's an Open Racing Game) is a free open source racing game developed by Ya2 using Panda3D for Windows, OSX and Linux.
Other
177 stars 33 forks source link

Failing to build #29

Open MCMic opened 5 years ago

MCMic commented 5 years ago

Hello,

I’m trying to see if I can package this in the AUR for ArchLinux.

The call to «scons lang=1 images=1 tracks=1» gives a lot of output with «couldn’t compress XXX», and at the end it fails with:

17:56:04 egg2bam -txo -mipmap -ctex assets/models/cars/diones/capsule.egg -o assets/models/cars/diones/capsule.bam

Writing assets/models/cars/diones/capsule.bam
  couldn't compress TEXCar
  Writing /home/mcmic/dev/aur/yorg/src/yorg-0.10.0/assets/models/cars/diones/tex/TEXCar.txo
  couldn't compress GLOSSCar
  Writing /home/mcmic/dev/aur/yorg/src/yorg-0.10.0/assets/models/cars/diones/tex/GLOSSCar.txo
Writing assets/models/cars/diones/car.bam
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?
  File "yyagl/build/process_track.py", line 101
    print 'loaded track model'
                             ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('loaded track model')?

If I try to call «python main.py» anyway, I get:

Traceback (most recent call last):
  File "./main.py", line 5, in <module>
    from yorg.yorg import Yorg
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.10.0/yorg/yorg.py", line 6, in <module>
    from yyagl.game import Game
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.10.0/yyagl/game.py", line 3, in <module>
    from .engine.engine import Engine
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.10.0/yyagl/engine/engine.py", line 7, in <module>
    from .profiler import AbsProfiler
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.10.0/yyagl/engine/profiler.py", line 57
    def _print_lines(sio): print sio.getvalue()
                                   ^
SyntaxError: invalid syntax

Here is the current state of the PKGBUILD:

pkgname=yorg
pkgver=0.10.0
pkgrel=1
pkgdesc="Yorg (Yorg's an Open Racing Game) is a free open source racing game developed by Ya2 using Panda3D for Windows, OSX and Linux."
arch=('any')
url="https://www.ya2.it/pages/yorg.html"
license=('GPL3')
depends=('bullet' 'panda3d' 'python-yaml' 'python-feedparser' 'python-psutil')
makedepends=('scons')
optdepends=()
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/cflavio/yorg/archive/v${pkgver}.tar.gz"
        "yyagl-${pkgver}.tar.gz::https://github.com/cflavio/yyagl/archive/v${pkgver}.tar.gz")
md5sums=('612ac83b4a53d3ac2905b7fc2e300959'
         '5122fc039be91a1e014c91310540461f')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  cp -r "$srcdir/yyagl-${pkgver}"/* yyagl/
  # build the required assets:
  scons lang=1 images=1 tracks=1
  scons linux=1
}
cflavio commented 5 years ago

Hello, I’m trying to see if I can package this in the AUR for ArchLinux.

Wow, it would be awesome, thank you!

File "yyagl/build/process_track.py", line 101 print 'loaded track model' ... File "/home/mcmic/dev/aur/yorg/src/yorg-0.10.0/yyagl/engine/profiler.py", line 57 def _print_lines(sio): print sio.getvalue()

In your PKGBUILD's source field you're referring to 0.10's release: it was based on Python 2, but you're building it using Python 3. The upcoming release is based on Python 3. So, you could build it using Python 2 or wait for the upcoming release.

Thank you very much!

MCMic commented 5 years ago

Oh, ok, that’s what is happening.

I will try when the next release is out then, that will be easier.

cflavio commented 5 years ago

Hi! I have published the new release, so this should work now! Thank you! ^_^

MCMic commented 5 years ago

Now I get this:

scons: Reading SConscript files ...
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.11.0/yyagl/build/uml.py", line 42

    for pdf in pdfs: print pdf

                             ^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(pdf)?
cflavio commented 5 years ago

Sorry, I apologize for this. Please, could you pull again the stable branch (both the main repo and yyagl submodule) and check if it works now? Thank you!

MCMic commented 5 years ago

Seems better, there is still all the «couldn't compress XXX.txo» warnings, and then it fails because I do not have bson module, it seems not to be packaged on ArchLinux.

MCMic commented 5 years ago

(Packaged python-bson in AUR, now it’s builing, failed a first time because of disk space, second try not finished yet)

MCMic commented 5 years ago

Okay, it builds fine.

After a really quick test it seems there is a bug with the wheels, they are rotated like 30° and it looks really funny when you drive.

cflavio commented 5 years ago

there is a bug with the wheels, they are rotated like 30°

Hi! Oh, that's very weird. Since this has never happened to me, please could you give me more details? What kind of rotation do you see (i.e. around which axis)? Does it happen with the gamepad connected? Please, could you share your folder after the building process, so I can analyze if the models are correct and if there is anything weird in the code? Thank you so much!

psypherium commented 4 years ago

@MCMic , any luck getting the current version of this building on Arch? For me, following the commands creates a "New Folder", and then one of the commands fails looking for a folder called "New".

MCMic commented 4 years ago

I did not retry recently, when I get home I can try to see what I get.

Mailaender commented 3 years ago
scons: Reading SConscript files ...
  File "/home/mcmic/dev/aur/yorg/src/yorg-0.11.0/yyagl/build/uml.py", line 42

    for pdf in pdfs: print pdf

                             ^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(pdf)?

I still get this error. Is there a patch for version 0.11 or a new release in sight?

cflavio commented 3 years ago

Hi! I presume that the submodule named yyagl in the main repo is not up-to-date, since that bug was fixed several months ago. If you update that submodule then you should not observe that error. Thanks!

EDIT: Actually, the fix is not in the stable branch yet, sorry, you are right! A new release (so, an update of the stable branch) is expected soon, so that branch should work in a near future. In the meanwhile, you may want to use the master branch. Or, you may want to exclude PDF files from building (they are only for documentation purposes, for developers). Thanks!

Mailaender commented 3 years ago

I still get the same error with scons linux=1 pdf=0 uml=0 so how do I turn it off effectively?

cflavio commented 3 years ago

Hi! Does it work if you submit only scons linux=1? Thanks!

Mailaender commented 3 years ago

It has no effect and fails, too. Same error message as already reported. I am trying to package https://github.com/cflavio/yorg/releases/tag/v0.11.0 which seems broken.

Mailaender commented 2 years ago

Following the README

https://github.com/cflavio/yorg/blob/52585a1c4b4c29377fd6fee409881901c7948dca/README.md?plain=1#L10

error: invalid command 'images'

Mailaender commented 2 years ago

scons lang=1 images=1 tracks=1 on 0.11.0.post0 seems to do a lot. At some point it will keep using 100 % CPU but seemingly there is no progress. I saw that it seems to assemble textures from text files. Do you also plan a binary distribution tarball on GitHub? I think this will be too much for the VMs @flathub to handle.

cflavio commented 2 years ago

@Mailaender I am sorry for the delay, I don't use use GitHub very often, I apologize for this. I have published a tarball on GitHub for you. Thank you!

Mailaender commented 2 years ago

How do I compile without building the assets?

cflavio commented 2 years ago

You should copy the assets/ folder from the tar.gz over the assets/ folder in your directory. Then, you can give the command scons lang=1 images=1 (without the tracks=1 part). Thank you!

Mailaender commented 2 years ago

I get a lot of

couldn't compress

messages when doing so.

Mailaender commented 2 years ago

Also

scons: done building targets. cp: cannot stat 'yracing': No such file or directory

cflavio commented 2 years ago

I get a lot of

couldn't compress

messages when doing so.

Hi! Is 'compress' installed in your machine?

Also

scons: done building targets. cp: cannot stat 'yracing': No such file or directory

Did you clone the repository recursively? Thanks!

Mailaender commented 2 years ago

I installed https://github.com/vapier/ncompress but still get

18:31:58 /usr/bin/python ./yyagl/build/img2txo.py "assets/images/loading/moon4.jpg"

  couldn't compress moon4
  Writing /run/build/yorg/assets/images/loading/moon4.txo
Writing dummy_assets_images_loading_moon4.jpg.bam
Mailaender commented 2 years ago

https://github.com/cflavio/yorg/releases/tag/v0.11.0 mentions version 0.11.1 wrong tag?

cflavio commented 2 years ago

I installed https://github.com/vapier/ncompress

Hi! That is not the program I used. I used nvcompress from the package libnvtt-bin (as instance, in Debian).

https://github.com/cflavio/yorg/releases/tag/v0.11.0 mentions version 0.11.1 wrong tag?

Whoops, you are right, sorry. I apologize.

Mailaender commented 2 years ago

Did you clone the repository recursively? Thanks!

yes, but neither https://github.com/cflavio/yorg/tree/v0.11.0.post0 nor https://github.com/cflavio/yorg/tree/v0.11.0 contain the submodule. Can you tag a new release that builds?

cflavio commented 2 years ago

Hi, I have done another tag, it should contain the submodule. Thanks!

Mailaender commented 2 years ago

Didn't build and I got several errors that I don't know how to solve:

sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory scons: [assets/po/gl_ES.po] assets/locale/de.FS.File object at 0x55721c2589f0>]/LC_MESSAGES/yorgtmp.po: No such file or directory sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory scons: [assets/po/it_IT.po] assets/locale/de.FS.File object at 0x55721c2287d0>]/LC_MESSAGES/yorgtmp.po: No such file or directory scons: [assets/po/es_ES.po] assets/locale/de.FS.File object at 0x55721c256840>]/LC_MESSAGES/yorgtmp.po: No such file or directory scons: [assets/po/gd.po] assets/locale/de.FS.File object at 0x55721c251950>]/LC_MESSAGES/yorgtmp.po: No such file or directory scons: [assets/po/fr_FR.po] assets/locale/de.FS.File object at 0x55721c25cbb0>]/LC_MESSAGES/yorgtmp.po: No such file or directory sh: line 1: ]/LC_MESSAGES/yorg.pot: No such file or directory scons: [assets/po/de_DE.po] assets/locale/de.FS.File object at 0x55721c2510e0>]/LC_MESSAGES/yorgtmp.po: No such file or directory

couldn't compress loading4 Writing /run/build/yorg/assets/tracks/orlando/images/loading4.txo Writing dummy_assets_tracks_orlando_images_loading4.jpg.bam 15:03:41 /usr/bin/python /run/build/yorg/yyagl/build/img2txo.py "assets/tracks/orlando/images/loading.png"

Writing /run/build/yorg/assets/tracks/orlando/images/loading.txo (compressed dxt5) Writing dummy_assets_tracks_orlando_images_loading.png.bam 15:03:42 /usr/bin/python /run/build/yorg/yyagl/build/img2txo.py "assets/tracks/orlando/images/loading3.jpg"

couldn't compress loading3 Writing /run/build/yorg/assets/tracks/orlando/images/loading3.txo Writing dummy_assets_tracks_orlando_images_loading3.jpg.bam 15:03:43 /usr/bin/python /run/build/yorg/yyagl/build/img2txo.py "assets/tracks/orlando/images/loading1.jpg"

couldn't compress loading1 Writing /run/build/yorg/assets/tracks/orlando/images/loading1.txo Writing dummy_assets_tracks_orlando_images_loading1.jpg.bam 15:03:43 /usr/bin/python /run/build/yorg/yyagl/build/img2txo.py "assets/tracks/orlando/images/menu.png"

Writing /run/build/yorg/assets/tracks/moon/images/menu.txo (compressed dxt1) Writing dummy_assets_tracks_moon_images_menu.png.bam 15:03:49 /usr/bin/python /run/build/yorg/yyagl/build/img2txo.py "assets/tracks/orlando/images/loading2.jpg"

couldn't compress loading2 Writing /run/build/yorg/assets/tracks/orlando/images/loading2.txo

scons: building terminated because of errors.

cflavio commented 2 years ago

The first part should be fixed by scons lang=1, I presume. The second part should be fixed by installing nvcompress. Thanks!

Mailaender commented 2 years ago

The first part should be fixed by scons lang=1, I presume.

I already use scons lang=1

The second part should be fixed by installing nvcompress.

I had https://github.com/castano/nvidia-texture-tools installed.