Comments (20)
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.
not for nothing, mgree/libdash-master builds with no issues
from smoosh.
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.
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.
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.
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.
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.
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.
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.
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.
~/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.
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.
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.
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.
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.
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.
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.
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.
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.
Okay, updated in a9e3c48. Thanks again!
from smoosh.
Related Issues (20)
- Indicate which tests failed HOT 1
- BUG_HDOCMASK in Modernish on Linux platforms. HOT 1
- sh_06.ex tp379 fails on Linux
- More faithful representation of words
- Implement `set -o pipefail`
- Issues with substring processing in parameter expansion HOT 10
- Show call stack/positional parameter info in Shtepper
- Packaging and build systems
- Broken POSIX tests in the VM: SIGTSTP?
- Clearer versioning HOT 2
- Fix test harness to be less fiddly HOT 1
- Upgrade Modernish
- Explicit escaping throughout
- Implement other operations for arithmetic expansion
- Parser tests?
- Exit unexpectedly when errexit is enabled HOT 3
- Tool for just debugging ASTs
- Use libdash package and AST
- Separate builtin parsing and implementation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smoosh.