ffwff / lilith

x86-64 os made in crystal
Other
1.15k stars 27 forks source link

Building Userspace: Errors encountered #24

Closed ghost closed 4 years ago

ghost commented 4 years ago

I managed to build the thing! Yay! But I had to patch little tweaks and edits that seemed to belong in origin/master. Here are the two things I remember, although there might be something more I might have forgot.

  1. userspace/toolchain/Makefile:50-51 : ../libc -> ../libraries/libc I assume @ffwff refactored the project. Relevant git diff:

    diff --git a/userspace/toolchain/Makefile b/userspace/toolchain/Makefile
    index 964ee0b..f9c2e6d 100644
    --- a/userspace/toolchain/Makefile
    +++ b/userspace/toolchain/Makefile
    @@ -47,8 +47,8 @@ build_gcc: gcc
        make install
    
    # libc
    -build_libc: ../libc
    -       cd ../libc && \
    +build_libc: ../libraries/libc
    +       cd ../libraries/libc && \
        make -j$(NPROC) RELEASE=$(RELEASE) && \
        make install \
                LIBDIR=$(shell pwd)/tools/lib/gcc/i386-elf-lilith/8.3.0/ \
  2. pkgs/generate-packages.sh pkgs/missio userspace/libraries/libcrystal/compile Shebang line is #!/bin/sh while the script uses bash conditionals (i.e. [[ ]]) Not sure to make it a sh script or a bash script so raised an issue rather than a hasty pull request. If you pick one of the two, I'm happy to make a pull request.

ffwff commented 4 years ago

You shouldn't use the build_libc script provided by the Makefile! Use ./pkgs/missio build libc

Feel free to change it to a bash script.

ghost commented 4 years ago

Okay! userspace/toolchain/Makefile's all target includes build_libc as a dependency. I'll delete that too.

ghost commented 4 years ago

I'll give you a pull request after I can properly build mruby; ( #25 ) No need to be in a rush though. I don't want to break the build, especially in someone else's repo :\

ghost commented 4 years ago

make distro works now. Closing. Will send you a pull request soon :)