Comments (7)
I tried it in centos and it seems to work. To produce the following output, I edited bazel-genfiles/clotestbin-cc-pie.sh
as follows:
#!/usr/bin/env bash
- set -eu
+ set -eux
tmpdir=$(mktemp -d)
trap "rm -rf '$tmpdir'" EXIT
unzip -q "$0" -d "$tmpdir" 2> /dev/null || true
"$tmpdir/clotestbin-cc-pie-closure_wrapper"
exit 0
$ bazel-genfiles/clotestbin-cc-pie.sh
+++ mktemp -d
++ tmpdir=/tmp/tmp.LrouJaUrK4
++ trap 'rm -rf '\''/tmp/tmp.LrouJaUrK4'\''' EXIT
++ unzip -q bazel-genfiles/clotestbin-cc-pie.sh -d /tmp/tmp.LrouJaUrK4
++ true
++ /tmp/tmp.LrouJaUrK4/clotestbin-cc-pie-closure_wrapper
hello cc
++ exit 0
++ rm -rf /tmp/tmp.LrouJaUrK4
If the script can't find /tmp/tmp.LrouJaUrK4/clotestbin-cc-pie-closure_wrapper
as it says, the most likely cause is that unzip -q bazel-genfiles/clotestbin-cc-pie.sh -d /tmp/tmp.LrouJaUrK4
doesn't output the files where we expect.
from clodl.
You are right. That's just the missing unzip
. I'm changing the title to reflact that clodl
closures are not working on system without unzip
.
from clodl.
Sounds good. Do you have any proposals for a fix?
We could check if unzip is present and produce a better error message. Is this what you expect?
from clodl.
It would be better yes.
Why using unzip
? Isn't tar
or gunzip
more portable? I've tested on docker containers, tar
and gunzip
are always present in ubuntu, debian, arch, centos and nixos. However unzip
was not present in any of the docker image I pulled for theses distributions.
from clodl.
from clodl.
Clodl uses zip, the same as jars. But we never use clodl to build a jar. At least sparkle creates the jars using java_library, not clodl.
@guibou if you need another format, it could be added as an option. If you want to eliminate zip, then we would need to teach sparkle to extract the new format, but it is probably not worth the trouble.
from clodl.
Having clodl output tar archives would be really handy when using it to build containers since the container_image
rule from rules_docker
can directly take a tgz as input.
Atm the way I use it is that I have a genrule which unzip the clodl-generated archive and re-packs it with tar, but that's far from optimal
from clodl.
Related Issues (20)
- Option to filter out libjvm.so from output .jars HOT 2
- Move to CircleCI HOT 1
- Exclude dependencies of excluded libraries. HOT 5
- Build closures of haskell libraries
- Implement binary_closure HOT 1
- Fix cp failures in tests HOT 2
- `binary_closure` failing to find `main` when linking HOT 11
- Closures of libraries named as *.so fail to build
- Closures of binaries without runfiles fail to build
- Closure of a cc_library fails to build
- bazel 0.22 support HOT 3
- closure depends on the system linker HOT 6
- clodl fails on executables built with ghc-8.10.2 HOT 3
- zip files of closures are not reproducible HOT 1
- Add tests of haskell binaries with a haskell_library and haskell_cabal_library
- Need Help Fixing Bazel Build Issue with Clodl HOT 4
- Feature Request - Allow use to provide their own `build.gradle` and Java shim.
- Test and document importing clodl in other projects
- Make bash scripts callable without bazel
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 clodl.