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

./Meta/serenity.sh run: die: SERENITY_SOURCE_DIR is not set #25004

Open
squeaktoy opened this issue Sep 9, 2024 · 3 comments
Open

./Meta/serenity.sh run: die: SERENITY_SOURCE_DIR is not set #25004

squeaktoy opened this issue Sep 9, 2024 · 3 comments

Comments

@squeaktoy
Copy link

squeaktoy commented Sep 9, 2024

I tried getting SerenityOS to run on my Gentoo system. Unfortunately I get this output:

$ ./Meta/serenity.sh run
[0/5] Performing build step for 'lagom'
ninja: no work to do.
[1/5] Performing install step for 'lagom'
[0/1] Install the project...
-- Install configuration: ""
[2/5] Performing build step for 'serenity'
[0/2] Re-checking globbed directories...
[3/3] Linking CXX executable Kernel/Prekernel/kernel_x86-64
[3/5] Performing install step for 'serenity'
[0/2] Re-checking globbed directories...
[3/4] Install the project...
-- Install configuration: ""
[5/5] Completed 'serenity'
ninja: Entering directory `/home/user/software/sys-os/serenity/Build/x86_64'
[0/2] Re-checking globbed directories...
[3/4] Install the project...
-- Install configuration: ""
ninja: Entering directory `/home/user/software/sys-os/serenity/Build/x86_64'
[0/2] Re-checking globbed directories...
[0/1] cd /home/user/software/sys-os/serenity/Build/x86_64 && /usr/bin/cmake -E env SERENITY_...OLCHAIN=GNU LLVM_VERSION=13.2.0 /home/user/software/sys-os/serenity/Meta/build-image-qemu.s
doas (user@weerwolf) password: 
find: ‘/Base’: No such file or directory
du: cannot access '/Base': No such file or directory
checking existing image
e2fsck 1.47.1 (20-May-2024)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
_disk_image: 11/99072 files (0.0% non-contiguous), 3672/368500 blocks
done
mounting filesystem... done
die: SERENITY_SOURCE_DIR is not set
unmounting filesystem... done
FAILED: CMakeFiles/qemu-image _disk_image /home/user/software/sys-os/serenity/Build/x86_64/CMakeFiles/qemu-image /home/user/software/sys-os/serenity/Build/x86_64/_disk_image 
cd /home/user/software/sys-os/serenity/Build/x86_64 && /usr/bin/cmake -E env SERENITY_SOURCE_DIR=/home/user/software/sys-os/serenity SERENITY_ARCH=x86_64 SERENITY_TOOLCHAIN=GNU LLVM_VERSION=13.2.0 /home/user/software/sys-os/serenity/Meta/build-image-qemu.sh
ninja: build stopped: subcommand failed.

I'm using GCC 14.2.1

@spholz
Copy link
Member

spholz commented Sep 9, 2024

This looks like a doas issue.

# To make doas work, you have to make sure you use the "keepenv" flag in doas.conf
SUDO="doas"

You need to either configure doas to keep our environment variables set with setenv or just use keepenv (https://man.openbsd.org/doas.conf.5).

@squeaktoy
Copy link
Author

So the keepenv trick got me a little further, but now I'm getting this output:

[0/5] Performing build step for 'lagom'
ninja: no work to do.
[1/5] Performing install step for 'lagom'
[0/1] Install the project...
-- Install configuration: ""
[2/5] Performing build step for 'serenity'
[0/2] Re-checking globbed directories...
[3/3] Linking CXX executable Kernel/Prekernel/kernel_x86-64
[3/5] Performing install step for 'serenity'
[0/2] Re-checking globbed directories...
[3/4] Install the project...
-- Install configuration: ""
[5/5] Completed 'serenity'
ninja: Entering directory `/home/user/software/sys-os/serenity/Build/x86_64'
[0/2] Re-checking globbed directories...
[3/4] Install the project...
-- Install configuration: ""
ninja: Entering directory `/home/user/software/sys-os/serenity/Build/x86_64'
[0/2] Re-checking globbed directories...
[0/1] cd /home/user/software/sys-os/serenity/Build/x86_64 && /usr/bin/cmake -E env SERENITY_...OLCHAIN=GNU LLVM_VERSION=13.2.0 /home/user/software/sys-os/serenity/Meta/build-image-qemu.s
doas (user@weerwolf) password: 
checking existing image
e2fsck 1.47.1 (20-May-2024)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
_disk_image: 18251/99072 files (5.6% non-contiguous), 222951/380522 blocks
done
mounting filesystem... done
installing base system... done
creating initial filesystem structure... done
creating utmp file... done
setting up device nodes folder... done
setting up sysfs folder... done
installing users... done
adding some desktop icons... done
installing shortcuts... done
installing 'checksum' variants... done
unmounting filesystem... done
ninja: Entering directory `/home/user/software/sys-os/serenity/Build/x86_64'
[0/2] Re-checking globbed directories...
[0/1] cd /home/user/software/sys-os/serenity/Build/x86_64 && /usr/bin/cmake -E env SERENITY_...oftware/sys-os/serenity SERENITY_ARCH=x86_64 /home/user/software/sys-os/serenity/Meta/run.s
qemu-system-x86_64: multiboot knows VBE. we don't
qemu-system-x86_64: -device nvme,serial=deadbeef,drive=boot-drive,bus=bridge4,logical_block_size=4096,physical_block_size=4096: Could not open '_disk_image': Permission denied

@ADKaster
Copy link
Member

ADKaster commented Sep 9, 2024

I would check the permissions on Build/x86_64/_disk_image. if they are indeed messed up, chmod/chown-ing them to be accessible by your user should let it boot if you simply do ninja -C Build/x86_64 run. That target won't rebuild any changed C++ files though. It's possible that things don't work right with doas, it's been a while since anyone tested it.

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