-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ubuntu 18.04: <command-line>: error: expected identifier or '(' before numeric constant #159
Comments
Hi KuiWei0004, can you note the output of |
Thanks, cdleary, my ubuntu version is 18.04 and gcc version is 9.3.0. It is noted that the gcc in my environment is what I update from gcc-8.2.0. |
It seemes that this problem is caused by ubuntu 18.04, but I do not find the detail reason. |
Thanks for confirming it's an environment issue KuiWei004, I'll see if I can make an 18.04 dockerfile today and see how many issues there are, but for CI testing we're using 20.04, so running/developing out of a docker container could be a good option potentially, 18.04 support will be best-effort. |
Thanks for following this issue! It should be noted that the original gcc on ubuntu 18.04 is gcc-7, and this version is old for xls, SO I have updated gcc to gcc-9 by referring to https://linuxize.com/post/how-to-install-gcc-compiler-on-ubuntu-18-04/,then I get |
Ok, confirmed I was able to repro this in a 18.04 docker sequence, this was the approximate dockerfile:
Failing on this command:
Identified by This diff seems to get us past this particular error, something this environment dislikes about the
Build at HEAD temporarily has another issue due to LLVM version skew, once we fix that we can see if this fully resolves the issue. |
I noticed that the glibc version of ubuntu 18.04 is 2.27. Can this be the reason for the problem? |
@KuiWei004 that could be part of it, I'll see if it's easy to dig into the ftrylockfile difference. Next wrinkle I hit was that python 3.6.9 doesn't have dataclasses in the stdlib, had to add a pip requirement for the "polyfill" library. Seeing how far we get with that added. (These little things usually add to up why it's hard to support too many different environments simultaneously except in a best effort fashion, bah. :-) |
Ok with this patch and that dockerfile it passes all tests:
Will see if I can reconcile those deltas with what 20.04 wants. |
I have tried your solution on ubuntu 18.04, it works well ! |
…tion. Update README to reflect newer Bazel version, have it use python3-is-python since that's simplifying, and update instruction for pointing at a particular Dockerfile for the OS version we're interested in. Also mark GitHub actions as running on x86 explicitly while we're in here doing build things, since I've been experimenting with self-hosted aarch64 runners (little otherwise-unused Raspberry Pi) -- add an aarch64 configuration that has to be triggered manually for the moment. Towards #159 Towards #286 PiperOrigin-RevId: 357251750
I believe could be fixed by 195ed10 -- will make a nightly Ubuntu-18.04 action so we can track breakages (but all still best effort since it's not part of CI). |
We have an Ubuntu 18.04 nightly action: https://github.com/google/xls/actions/workflows/nightly-ubuntu-18.04.yml Closing. |
Hello, everyone!
When I run "bazel test -c opt ...", I got an error below
e418145f18940c8c0db59ce8308014ec/external/org_gnu_m4/BUILD.bazel:53:10: C++ compilation of rule '@org_gnu_m4//:m4' failed (Exit 1): gcc failed: error executing command
/usr/local/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/host/bin/external/org_gnu_m4/objs/m4/binary-io.d '-frandom-seed=bazel-out/host/bin/external/org_gnu_m4/objs/m4/binary-io.o' -D_IO_ftrylockfile '-D_IO_IN_BACKUP=0x100' -D_GNU_SOURCE '-DO_BINARY=0' -iquote external/org_gnu_m4 -iquote bazel-out/host/bin/external/org_gnu_m4 -iquote external/bazel_tools -iquote bazel-out/host/bin/external/bazel_tools -isystem external/org_gnu_m4/lib -isystem bazel-out/host/bin/external/org_gnu_m4/lib -isystem external/org_gnu_m4/build-aux/snippet -isystem bazel-out/host/bin/external/org_gnu_m4/build-aux/snippet -g0 -w -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/org_gnu_m4/lib/binary-io.c -o bazel-out/host/bin/external/org_gnu_m4/_objs/m4/binary-io.o)
: error: expected identifier or '(' before numeric constant.
I appreciate your help!
The text was updated successfully, but these errors were encountered: