Git Product home page Git Product logo

Comments (20)

mgree avatar mgree commented on May 29, 2024 1

Try running a brew install libtool first? (Please take notes---when you finally have it working, I can give detailed macOS install instructions!)

from smoosh.

idkjs avatar idkjs commented on May 29, 2024 1

not for nothing, mgree/libdash-master builds with no issues

from smoosh.

mgree avatar mgree commented on May 29, 2024

That's right: the Docker commands are for Linux.

It looks like you got a bad prefix in ./configure in libdash. But... are you using the latest version of the repo? I've refactored the build so you should be able to simply run opam pin add . in the libdash directory.

To follow up on your 'alternatively', I don't think there's an easy way to get executables out of a Docker build, especially since the Dockerfile provided will build an ELF executable! Even if we had a working macOS Docker build, it'd be tricky: libdash uses the ctypes API and lem uses zarith, both of which demand certain shared libraries. You'd have to be very careful to make sure you had the same versions in the build and execute environments!

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

Tried from release package with this error:

~/Github/smoosh-0.1
❯ cd libdash

~/Github/smoosh-0.1/libdash
❯ opam pin add .
[libdash.0.1] no changes from file:///Users/mandalarian/Github/smoosh-0.1/libdash
libdash is now pinned to file:///Users/mandalarian/Github/smoosh-0.1/libdash (version 0.1)
The following actions will be performed:
  βˆ— install conf-which    1    [required by conf-autoconf]
  βˆ— install conf-libtool  1    [required by libdash]
  βˆ— install conf-autoconf 0.1  [required by libdash]
  βˆ— install libdash       0.1*
===== βˆ— 4 =====
Do you want to continue? [Y/n] y

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[libdash.0.1] no changes from file:///Users/mandalarian/Github/smoosh-0.1/libdash

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
βˆ— installed conf-which.1
βˆ— installed conf-autoconf.0.1
βˆ— installed conf-libtool.1
[ERROR] The compilation of libdash failed at
        "/Users/mandalarian/.opam/opam-init/hooks/sandbox.sh build aclocal".

#=== ERROR while compiling libdash.0.1 ========================================#
# context     2.0.6 | macos/x86_64 | ocaml-base-compiler.4.07.0 | pinned(file:///Users/mandalarian/Github/smoosh-0.1/libdash)
# path        ~/.opam/4.07.0/.opam-switch/build/libdash.0.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build aclocal
# exit-code   1
# env-file    ~/.opam/log/libdash-59607-c61e7b.env
# output-file ~/.opam/log/libdash-59607-c61e7b.out
### output ###
# aclocal: error: 'configure.ac' is required



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
β”Œβ”€ The following actions failed
β”‚ Ξ» build libdash 0.1
└─
β”Œβ”€ The following changes have been performed
β”‚ βˆ— install conf-autoconf 0.1
β”‚ βˆ— install conf-libtool  1
β”‚ βˆ— install conf-which    1
└─
[NOTE] Pinning command successful, but your installed packages may be out of
       sync.

The former state can be restored with:
    opam switch import
"/Users/mandalarian/.opam/4.07.0/.opam-switch/backup/state-20200507170940.export"

~/Github/smoosh-0.1/libdash
❯ ..

~/Github/smoosh-0.1
❯ ..

Tried from clone with this error:

~/Github
❯ git clone --recurse-submodules https://github.com/mgree/smoosh.git
Cloning into 'smoosh'...
...
Submodule path 'lem': checked out '54e1c03a1f9997445132d326f568f429c924b0b1'
Submodule path 'libdash': checked out '0ef6b9a380da032d0bac3320d79e0a3f734f92c5'
Submodule path 'modernish': checked out '40b38305e38e86a098d288c9f0852c7f74830535'
Submodule path 'oil': checked out '1a7168d6a3c21d1b2f45f0f9987baeb1315ab247'

~/Github 17s
❯ cd ~/Github/smoosh/libdash

~/Github/smoosh/libdash 0.2-rc~16
❯ opam pin add .
[NOTE] Package libdash is currently pinned to
       file:///Users/mandalarian/Github/smoosh-0.1/libdash (version 0.1).
[libdash.0.1] synchronised from git+file:///Users/mandalarian/Github/smoosh/libdash#HEAD
libdash is now pinned to git+file:///Users/mandalarian/Github/smoosh/libdash#HEAD (version 0.1)
The following actions will be performed:
  βˆ— install libdash 0.1*
Do you want to continue? [Y/n] y

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
[ERROR] The compilation of libdash failed at
        "/Users/mandalarian/.opam/opam-init/hooks/sandbox.sh build
        ./autogen.sh".

#=== ERROR while compiling libdash.0.1 ========================================#
# context     2.0.6 | macos/x86_64 | ocaml-base-compiler.4.07.0 | pinned(git+file:///Users/mandalarian/Github/smoosh/libdash#HEAD#0ef6b9a3)
# path        ~/.opam/4.07.0/.opam-switch/build/libdash.0.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build ./autogen.sh
# exit-code   127
# env-file    ~/.opam/log/libdash-60296-0a5907.env
# output-file ~/.opam/log/libdash-60296-0a5907.out
### output ###
# ./autogen.sh: line 4: libtoolize: command not found



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><>  🐫
β”Œβ”€ The following actions failed
β”‚ Ξ» build libdash 0.1
└─
╢─ No changes have been performed
[NOTE] Pinning command successful, but your installed packages may be out of
       sync.

~/Github/smoosh/libdash 0.2-rc~16 6s
❯ getsys
ProductName:	Mac OS X
ProductVersion:	10.15.4
BuildVersion:	19E287

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

Ok, so, ran brew install libtool.
Got message saying it was already there. I reinstalled. Got message saying it was reinstalled prepended with letter g to not conflict with mac libtool.

I changed libdash/autogen.sh to:

glibtoolize \
&& aclocal \
&& autoheader \
&& automake --add-missing \
&& autoconf

Didn't work.
Running with libtoolize doesn't work either but the error message was more descriptive. Might mean something to you.

Full output below:

~/Github/smoosh/libdash 0.2-rc~16
❯ brew install libtool
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> New Formulae
uutils-coreutils
...
**Warning: libtool 2.4.6_1 is already installed and up-to-date**//emphasis mine
To reinstall 2.4.6_1, run `brew reinstall libtool`

~/Github/smoosh/libdash 0.2-rc~16 13s
***❯ brew reinstall libtool***
==> Reinstalling libtool
==> Downloading https://homebrew.bintray.com/bottles/libtool-2.4.6_1.catalina.bo
==> Downloading from https://akamai.bintray.com/38/38212486e78db33048438cffe38b6
######################################################################## 100.0%
==> Pouring libtool-2.4.6_1.catalina.bottle.tar.gz
==> Caveats
In order to prevent conflicts with Apple's own libtool we have prepended a "g"
so, you have instead: glibtool and glibtoolize.
==> Summary
🍺  /usr/local/Cellar/libtool/2.4.6_1: 71 files, 3.7MB

from smoosh.

mgree avatar mgree commented on May 29, 2024

Yikes. I may have fixed this manually:

$ ls -al `which libtoolize`
lrwxr-xr-x  1 root  admin  11 Sep 28  2018 /usr/local/bin/libtoolize -> glibtoolize

That date makes me think this was an SDKROOT/Xcode/macOS-related issue... πŸ˜₯

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

I was able to build each submodule on its own. How to combine them to get smoosh? Probably wont work anyway since you must have the submodules pinned for some reason. At any rate, will wait for a working build of macOS.

from smoosh.

mgree avatar mgree commented on May 29, 2024

Smoosh should build with libdash's master---the changes since the submodule version are just to harden the OPAM install routine. (Looking at https://github.com/mgree/libdash/blob/master/libdash.opam... apparently I just force glibtoolize on macOS! Nice work, Michael. πŸ˜‚)

Once you've got libdash and lem installed (oil is just for testing), you should be good to go! Try running make in src. (If it fails, you might need to amend your PATH or set LEMLIB.)

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

Running make in src:

~/Github/smoosh/src master*
❯ gmake     
lem -ocaml version.lem
gmake: lem: Not a directory
gmake: *** [Makefile:52: version.ml] Error 127

Maybe i'm tired, cant figure out running it. Here is the repo->https://github.com/idkjs/smoosh

from smoosh.

mgree avatar mgree commented on May 29, 2024

Huh... did you set your LEMLIB? Have you tried just running make? What do you get from lem -v?

$ make -version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

from smoosh.

idkjs avatar idkjs commented on May 29, 2024
~/Github/smoosh/src master*
❯  export LEMLIB=$HOME/Github/smoosh/lem/library

~/Github/smoosh/src master*
❯ echo $LEMLIB                                  
/Users/mandalarian/Github/smoosh/lem/library

~/Github/smoosh/src master*
❯ ./smoosh 
$ 

6th time is a charm!

So that repo has all the submodules from there source and just the smoosh/src dir copied out of here so apparently it works all updated.

Now i need to try some to write some scripts.

To answer your question:

~/Github/smoosh master
❯ gmake -version
GNU Make 4.3
Built for x86_64-apple-darwin19.2.0
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

from smoosh.

mgree avatar mgree commented on May 29, 2024

Hooray! πŸ™Œ

Okay, so it was the missing LEMLIB? While you have the history available, do you think you could write up the critical steps, so I can add them to the README? Feel free to post your edits here or submit a PR.

Thank you!

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

I will absolutely do so. Already started.

Question. Does this project let folks write scripts in ocaml? Idea being I can right scrips in ocaml and maybe compile them and use them anywhere....

Thanks.

from smoosh.

mgree avatar mgree commented on May 29, 2024

Awesome, thank you!

As it stands, smoosh is 'just' a shell that can tell you how and why it executed---no compilation to or from anything. Folks have brought up compilation to shell before, but I'm more interested in compilation from shell (to languages we can reason about a bit better).

ocaml_of_js + node seems like a pretty promising "write in OCaml, run anywhere" methodology, though foreign code becomes a problem. (That's why the shtepper runs on a server rather than on the client---libdash needs a C library and lem needs zarith which needs libgmp.)

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

working mac build scripts and note -> smoosh-macOS

So what do I type into the prompt to make it do something?

It would be nice to demo how to use it, no?

from smoosh.

mgree avatar mgree commented on May 29, 2024

Awesome, thank you for the notes! I'll incorporate them into the README shortly.

What do you mean? The smoosh executable is merely a shell---you can use it like any other POSIX sh. There's an extra help builtin that lets you inspect traces a bit.

Or, you can run the shtepper and you'll get a JSON representation of the trace out. Probably better to run the local webserver (in smoosh/web) to render the output.

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

Regular shell, then. I though maybe it would say nice things to me I guess.

So the idea is that it will check if my scripts are posix compliant? So I might use them on any machine?

Feel like I am missing something still, after all that!

from smoosh.

mgree avatar mgree commented on May 29, 2024

Right now, the shtepper is a nice visualization and smoosh can give you some debug info, but that's about it. I have a working semantics, but I haven't yet made it really earn its keep!

smoosh as it stands can definitely help you with POSIX compliance, though! After running a script, you can run help spec to see a list of detected unspecified/undefined behaviors that have been executed. (smoosh isn't exhaustive, yet, but it should catch a bunch!)

from smoosh.

idkjs avatar idkjs commented on May 29, 2024

I will try to run some scripts through it. Will revert. Let me know if you need/want further details in that build.

from smoosh.

mgree avatar mgree commented on May 29, 2024

Okay, updated in a9e3c48. Thanks again!

from smoosh.

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.