Git Product home page Git Product logo

Comments (5)

farzonl avatar farzonl commented on August 25, 2024

is this still a blocker?

from qsim.

farzonl avatar farzonl commented on August 25, 2024

I think it still is, there is a reliance on rt lib which doesn't exist for OS X
I made the following change
ifeq ($(UNAME), Darwin)
CXXFLAGS += -DNORT
else
LDFLAGS += -lrt
endif

to alter these three uses
https://github.com/gtcasl/qsim/blob/master/Makefile#L12
https://github.com/gtcasl/qsim/blob/master/Makefile#L43
https://github.com/gtcasl/qsim/blob/master/tests/Makefile#L3

that got me past the linker error, but there appears to be more issues.

from qsim.

pranith avatar pranith commented on August 25, 2024

You also have to figure out how to build linux kernel on there. Or we could include a pre-built image in the repository.

from qsim.

farzonl avatar farzonl commented on August 25, 2024

for linux there maybe a path forward: First you will need to install the Linux source tree on a case-sensitive filesystem on your Mac. (the default HFS filesystem is case insensitive.)
something like this:

sudo hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size {SOME_SIZE} {SOME_NAME}.dmg
sudo hdiutil attach ~/{SOME_NAME}.dmg -mountpoint /Volumes/

then next issue is missing header files from the build I see
cripts/mod/mk_elfconfig.c:4:10: fatal error: 'elf.h' file not found
#include <elf.h>

arch/x86/tools/relocs.harch/x86/tools/relocs.h::1212::1010:: fatal errorfatal error: : 'elf.h''elf.h' filefile notnot foundfound
arch/x86/tools/relocs.h:12:10: fatal error: 'elf.h' file not found
scripts/sortextable.c:23:10: fatal error: 'elf.h' file not found

likely other files may be needed, below is a preliminary list
/usr/include/elf.h
/usr/include/features.h
/usr/include/bits/predefs.h
/usr/include/bits/wordsize.h
/usr/include/gnu/stubs.h
/usr/include/gnu/stubs-64.h

alternatively might be able to get elf with:
brew install libelf
and sed maybe needed aswell:
brew install gnu-sed --with-default-names

Next we will need malloc.h to be where linux expects it to be, can achieve that with a symlink:
sudo ln -s /usr/include/malloc/malloc.h /usr/include/malloc.h

Next issue is the default compiler maybe an issue, may have to
brew install gcc or look into how to do clang linux builds (heard it was possible for the linux kernel, not sure about a debian/centos/etc image.

from qsim.

farzonl avatar farzonl commented on August 25, 2024

Maybe easier to do the linux kernel compilation with a linux docker image, no real value in getting the linux image to build natively.

from qsim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.