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

prepare.sh fails #101

Open
DevLorin opened this issue Nov 24, 2023 · 8 comments
Open

prepare.sh fails #101

DevLorin opened this issue Nov 24, 2023 · 8 comments

Comments

@DevLorin
Copy link

Hello

So I tried following steps:

  1. Installed a clean Ubuntu 23.10 into a VirtualBox (7.0.12) environment.
  2. Created a user "rb" as instructed and made it root.
  3. Cloned renpy-build and hit ./prepare.sh

and got this:

(prepare.sh, line 14)
E: Unable to locate package python2-dev

Is python2-dev still needed or is this only for building with python version 2?
After deleting python2-dev in prepare.sh, I have the following:


(prepare.sh, line 45)

Ign:2 https://apt.llvm.org/mantic 1lvm-toolchain-mantic-15 InRelease
Err:6 https://apt.llvm.org/mantic llvm-toolchain-mantic-15 Release
404
Not Found [IP: 146.75.118.49 443]
Reading package lists... Done
E: The repository http://apt.llvm.org/mantic llvm-toolchain-mantic-15 Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) mandage rb@renpy-1-2:~/renpy-builds
for repository creation and user configuration details.
rb@renpy-1-2:~/renpy-builds 

Is it possible to use llvm 16 or 17?


(nightly/python.sh, line 17)

copying src/pygame
_sl2/pygame_sdl2.h -> /us/include/python3.11
error: could not create
/usr/include/python3.11/pygame_sd12.h': Permission deni
ed rb@renpy-1-2:~/reny-butld§

After changing line 18 to:

sudo python3 setup.py install headers
This is our next output:

Traceback (most recent call last):
File
"/home/rb/renpy-build/pygame_sd2/setup.py", line 26, in ‹module> from setuplib import android,
ios, windows, cython, pymodule, setup, parse_c
flags, parse_libs, find_unnecessary_gen, gen
File
"/home/rb/renpy-build/pygame_sd12/setuplib.py", line 27, in <module> import setuptools
ModuleNotFoundError: No module named 'setuptools'

Am I missing something here?
Thanks.

@renpytom
Copy link
Member

python2-dev is still needed.

You might want to make sure the universe and multiverse repositories are enabled.

@Kassy2048
Copy link
Contributor

AFAIK, Python 2 is not available in Ubuntu 23.04 and later so the python2-dev cannot be installed. Maybe it is available through ESM/Ubuntu Pro?

Building Ren'Py from a fresh Ubuntu 22.04 docker container worked for me, after installing the libharfbuzz-dev and bc packages. I've only tried building the web3 version though.

@renpytom
Copy link
Member

Ah, okay. I have it here, though we may be able to live without it. That being said, it might make sense to just stick to 22.04 until we drop Python 2 support entirely, in mid 2024.

@DevLorin
Copy link
Author

@Kassy2048
Thanks for the advice. I attempted the build process on a fresh Ubuntu 22.04 VM. I installed the libharfbuzz-dev and bc packages.

However I encountered an error related to the absence of the Live2DCubismCore.h file:

/home/rb/renpy-build/renpy/gen3-static/renpy.gl2.live2dmodel.c:751:10: fatal error: 'Live2DCubismCore.h' file not found

I tried to build for Windows but after trying for the Web platform, I noticed that the same error occurs. Did you also encouter this problem? I saved the Cubism SDK in /renpy-build/tars
as stated in the renpy-build/tars/README.rst before running ./build.py. (CubismSdkForNative-4-r.7.zip)

@Kassy2048
Copy link
Contributor

@renpytom I agree, better stick to Ubuntu 22.04 as it's the latst version to support Python 2 and it's a LTS so it should be maintained until 2027. It is possible to install Python 2 on 23.10 manually or using tools like pyenv, but that will increase build time ofc.

@LorinDesch You need to download the exact same version as renpy-build expects, which is "CubismSdkForNative-4-r.6.2.zip".

For the records, here are the commands I've used to build Ren'Py on docker (first command is from the host):

docker run --interactive --tty --name renpy_build ubuntu:22.04 bash

apt update && apt install git sudo lsb-release wget software-properties-common gnupg nano
apt install libharfbuzz-dev bc
mkdir renpy-dev
cd /renpy-dev
git clone https://github.com/renpy/renpy-build.git
cd renpy-build
./prepare.sh
cd tars
wget 'https://cubism.live2d.com/sdk-native/bin/CubismSdkForNative-4-r.6.2.zip'
cd ..
. tmp/virtualenv.py3/bin/activate
./build.py --platform web

You may want to change the renpy-build repository URL to your own, as well as the URLs in "nightly/git.sh" before executing "prepare.sh".

@DevLorin
Copy link
Author

Thanks for your assistance. Unfortunately, I've encountered new errors (still building for Windows). The specific error I'm facing is as follows:

Traceback (most recent call last):
  File "/home/rb/renpy-build/./build.py", line 231, in <module>
    main()
  File "/home/rb/renpy-build/./build.py", line 227, in main
    args.function(args)
  File "/home/rb/renpy-build/./build.py", line 122, in build
    task.run(context)
  File "/home/rb/renpy-build/renpybuild/task.py", line 97, in run
    self.function(context)
  File "/home/rb/renpy-build/tasks/pythonlib.py", line 532, in python3
    raise Exception(f"Unused rules: {rules - used_rules}")
Exception: Unused rules: {'steamapi'}

I noticed that line 527 in renpy-build/tasks/python.lib is commented out:

# used_rules.add("steamapi")


if rules - used_rules:
    if c.platform != "web":
        raise Exception(f"Unused rules: {rules - used_rules}")

According to renpy-build/tars/README.rst, Ren'Py should build without Steamworks. Is it safe to comment out this line? I tried doing that, but it resulted in a linker error:

clean-renpython.windows-x86_64-py3 running in /home/rb/renpy-build/tmp/build/renpython.windows-x86_64-py3 ...

build-renpython.windows-x86_64-py3 running in /home/rb/renpy-build/tmp/build/renpython.windows-x86_64-py3 ...

link_windows-renpython.windows-x86_64-py3 running in /home/rb/renpy-build/tmp/build/renpython.windows-x86_64-py3 ...
ld.lld: error: undefined symbol: SharpYuvComputeConversionMatrix
>>> referenced by libavif.a(reformat_libsharpyuv.c.obj):(avifImageRGBToYUVLibSharpYUV)

ld.lld: error: undefined symbol: SharpYuvConvert
>>> referenced by libavif.a(reformat_libsharpyuv.c.obj):(avifImageRGBToYUVLibSharpYUV)
clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
link_windows-renpython.windows-x86_64-py3: process failed with 1.
args: 'ccache' '/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw/bin/x86_64-w64-mingw32-clang++' '-target' 'x86_64-w64-mingw32' '--sysroot' '/home/rb/renpy-build/tmp/cross.windows-x86_64/llvm-mingw' '-fPIC' '-pthread' '-std=gnu++17' '-O3' '-L/home/rb/renpy-build/tmp/install.windows-x86_64/lib' '-shared' '-static-libstdc++' '-o' 'librenpython.dll' 'librenpython.o' '-lrenpy' '-lfribidi' '/home/rb/renpy-build/tmp/install.windows-x86_64/lib/libpython3.9.dll.a' '-lavformat' '-lavcodec' '-lswscale' '-lswresample' '-lavutil' '-lSDL2_image' '-lSDL2' '-lopengl32' '-lavif' '-laom' '-lyuv' '-ljpeg' '-lpng16' '-lwebp' '-lharfbuzz' '-lbrotlidec' '-lfreetype' '-lffi' '-lssl' '-lcrypto' '-llzma' '-lbz2' '-lbcrypt' '-lz' '-lm' '-lpthread' '-lws2_32' '-liphlpapi' '-ldinput8' '-ldxguid' '-ldxerr8' '-luser32' '-lgdi32' '-lwinmm' '-limm32' '-lcomdlg32' '-lole32' '-loleaut32' '-lshell32' '-lsetupapi' '-lversion' '-luuid'
  File "/home/rb/renpy-build/./build.py", line 231, in <module>
    main()
  File "/home/rb/renpy-build/./build.py", line 227, in main
    args.function(args)
  File "/home/rb/renpy-build/./build.py", line 122, in build
    task.run(context)
  File "/home/rb/renpy-build/renpybuild/task.py", line 97, in run
    self.function(context)
  File "/home/rb/renpy-build/tasks/renpython.py", line 329, in link_windows
    c.run("""
  File "/home/rb/renpy-build/renpybuild/context.py", line 331, in run
    renpybuild.run.run(command, self, verbose, quiet)
  File "/home/rb/renpy-build/renpybuild/run.py", line 453, in run
    traceback.print_stack()

The library libavif-dev is already installed.

@qTich
Copy link
Contributor

qTich commented Nov 28, 2023

@LorinDesch

Regarding the last one - b223a61
Regarding steamapi - if I'm correct, you need to add the SDK, which is listed in the README.

@brainos233
Copy link
Contributor

Ah, okay. I have it here, though we may be able to live without it. That being said, it might make sense to just stick to 22.04 until we drop Python 2 support entirely, in mid 2024.

Perhaps python2-dev is no longer needed, since the build scripts are all run through python3, and hostpython2 manually builds the python2 used by Renpy 7.

@mal mal mentioned this issue Jan 9, 2024
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

5 participants