Open gonzojive opened 7 years ago
Since the lisp support is all in git, I suppose that the only moving part is what version of bazel you're using that I wasn't using earlier this year.
OK, so linking options seem to have changed. With --verbose_failures
or otherwise, will it tell you what ld command was issued?
If you trace the sbcl build, can you tell what flags were used to build?
afaict, the ld command is this:
ERROR: /home/red/git/lispb/BUILD.bazel:5:1: Linking of rule '//:hello.rt' failed (Exit 1): linux-sandbox failed: error executing command
(cd /home/red/.cache/bazel/_bazel_red/6e5c7a1e566011faad345a81d57ffaf4/execroot/fun_times && \
exec env - \
PWD=/proc/self/cwd \ /home/red/.cache/bazel/_bazel_red/6e5c7a1e566011faad345a81d57ffaf4/execroot/fun_times/_bin/linux-sandbox -D -t 15 -w /home/red/.cache/bazel/_bazel_red/6e5c7a1e566011faad345a81d57ffaf4/bazel-sandbox/4275454517868034787/execroot/fun_times -w /dev/shm -w /tmp -- /usr/bin/gcc -o bazel-out/local-fastbuild/bin/hello.rt -Wl,--export-dynamic -Wl,--dynamic-list bazel-out/local-fastbuild/genfiles/hello.dynamic-list.lds -Wl,-u,uid_username -Wl,-u,lseek_largefile -Wl,-u,get_timezone -Wl,-u,spawn '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -B/usr/bin -pass-exit-codes -Wl,-S -Wl,@bazel-out/local-fastbuild/bin/hello.rt-2.params)
Bazel version 0.5.4:
$ bazel version
Build label: 0.5.4
Build target: bazel-out/local-fastbuild/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri Aug 25 10:00:00 2017 (1503655200)
Build timestamp: 1503655200
Build timestamp as int: 1503655200
Sorry I don't have more time to get to the bottom of the issue. I will try to take a look at some point.
I uncommented a line about in rules.bzl to get the build to succeed. See https://github.com/gonzojive/bazelisp/tree/position-independent-code-fix
Yeah, bazel is not the only change here, but the basic C toolchain, too. If your compiler and linker defaults are now -pie
, you may need -no-pie
indeed. The SBCL source may or may not have evolved since 1.3.15 to take that into account, and could provide hints on how flags to compile SBCL have evolved.
Do you want to become Bazelisp maintainer, considering that you're the only current user? I could give you commit rights.
It is also possible that the exact options to use depend on the architecture, and/or on llvm vs gcc, at which point you'd have to insert conditional inclusion madness. Let's assume not.
I wasn't able to compile a hello world example. See the following error: