Giter Site home page Giter Site logo

Building bsc on MacOS works! about bsc HOT 14 CLOSED

b-lang-org avatar b-lang-org commented on July 22, 2024
Building bsc on MacOS works!

from bsc.

Comments (14)

mtikekar avatar mtikekar commented on July 22, 2024

Btw, make check runs until it needs bluetcl

from bsc.

bpfoley avatar bpfoley commented on July 22, 2024

That's great news! I haven't been actively working on a macOS build, but I'd certainly like to have one. Thanks for exploring this. At least we know we're moving in the right direction.

from bsc.

thoughtpolice avatar thoughtpolice commented on July 22, 2024

The libbdpi.so issue is due to a bug in the build system when using the STP no-op stub. I have a fix for it.

I think having macOS (and eventually: windows!) builds is a noble goal. It's probably worth having bluetcl in working order. Are you using tcl from something like homebrew? I'm not sure the best way to install tcl/tk/itcl/itk is, but that's the most important step at this point...

from bsc.

mtikekar avatar mtikekar commented on July 22, 2024

from bsc.

bpfoley avatar bpfoley commented on July 22, 2024

I'll try packaging itk/itcl for homebrew.

from bsc.

mtikekar avatar mtikekar commented on July 22, 2024

Turns out that MacOS's builtin tcl already has itk/itcl at /System/Library/Tcl/8.5. Perhaps it is best to try to use them instead of the homebrew versions.

from bsc.

ncihnegn avatar ncihnegn commented on July 22, 2024

I completely finished make STP_STUB=1 with system tcl/tk plus built-from-source itcl/itk.
System itcl/itk won't work because they don't come with stublib.

When make check, run into this error:

Checking bsc compiles
bsc -sim FibOne.bsv
Elaborated module file created: mkFibOne.ba

Checking compile for Bluespec simulator
bsc -sim -o mkFibOne.bexe -e mkFibOne mkFibOne.ba
Bluesim object created: mkFibOne.{h,o}
Bluesim object created: model_mkFibOne.{h,o}
Simulation shared library created: mkFibOne.bexe.so
Simulation executable created: mkFibOne.bexe
./mkFibOne.bexe > smoke_test_bluesim.out
called Tcl_FindHashEntry on deleted table
called Tcl_FindHashEntry on deleted table
/bin/sh: line 1:  4762 Abort trap: 6           ./mkFibOne.bexe > smoke_test_bluesim.out
make[1]: *** [smoke_test_bluesim] Error 134
make: *** [check] Error 2

from bsc.

mtikekar avatar mtikekar commented on July 22, 2024

I removed the stublibs from the Makefile to use the system itcl/itk and it compiled fine. I did run into the same error you see. But when I looked at examples/smoke_test/smoke_test_bluesim.out, the output is all there, so mkFibOne.bexe crashed only at the end. The error message seems quite common and people are blaming Tcl 8.5 and recommend trying 8.6 (https://groups.google.com/forum/#!topic/comp.lang.tcl/BKexjImWklo)

from bsc.

ncihnegn avatar ncihnegn commented on July 22, 2024

Now I can complete make, with some small patches on Makefiles and stp.
It seems the only major issue is that bluetcl will report an error on exit.

from bsc.

bpfoley avatar bpfoley commented on July 22, 2024

Just for reference, the Tcl_Exit bug in question is this one: https://sourceforge.net/p/tcl/bugs/4043/

from bsc.

mtikekar avatar mtikekar commented on July 22, 2024

I got a Github action to build on MacOS 10.15: https://github.com/mtikekar/bsc/tree/mtikekar-macos. You can download the inst directory from https://github.com/mtikekar/bsc/actions/runs/49104659 and try it out. You'll need brew install tcl-tk (version 8.6.10) to run.

from bsc.

jameyhicks avatar jameyhicks commented on July 22, 2024

Nice progress!

from bsc.

quark17 avatar quark17 commented on July 22, 2024

PR #98 gets BSC (with real STP) to compile on MacOS and adds it to CI. I'd appreciate if folks could review that PR and add any comments. I'd like to merge that PR, if there's consensus.

from bsc.

bpfoley avatar bpfoley commented on July 22, 2024

This is working on HEAD now, so I'll close the issue. Thanks everyone!

from bsc.

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.