Closed AsherAroussi closed 1 year ago
Hi @AsherAroussi, Pixie's build should work without making changes to the source. Are you unable to use the reop1.maven.org to install maven packages?
Did you perform any set up prior to running bazel build
or modifying the maven repository location? If not, you will either need to run the chef code (via cd tools/chef; sudo chef-solo -c solo.rb -j node_workstation.json
) to provision a Linux host or run bazel from our development docker image.
Thank you, @ddelnano for your response. I haven't done any changes in maven repository location (or any changes) prior to the build command. I run the command _sudo chef-solo -c solo.rb -j nodeworkstation.json and it fails with the following error:
asher@7.182.8.120@/work/tools/pixie/tools/chef ((HEAD detached at release/cloud/v0.1.7))# sudo chef-solo -c solo.rb -j node_workstation.json Starting Chef Client, version 12.14.60 resolving cookbooks for run list: ["px_dev_extras::linux_clang", "px_dev", "px_dev_extras"] Synchronizing Cookbooks:
undefined method `unified_mode' for #
/tmp/cookbooks/common/resources/remote_bin.rb:17:in `class_from_file'
/tmp/cookbooks/common/resources/remote_bin.rb:
10: # distributed under the License is distributed on an "AS IS" BASIS, 11: # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12: # See the License for the specific language governing permissions and 13: # limitations under the License. 14: # 15: # SPDX-License-Identifier: Apache-2.0 16: 17>> unified_mode true 18: provides :remote_bin 19: 20: property :name, String, name_property: true 21: property :bin_name, String, default: '' 22: 23: default_action :create 24: 25: action :create do 26: tool_dir = "/opt/px_dev/tools/#{new_resource.name}"
x86_64-linux-gnu
Running handlers:
[2023-08-16T16:16:55+08:00] ERROR: Running exception handlers
Running handlers complete
[2023-08-16T16:16:55+08:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 03 seconds
[2023-08-16T16:16:55+08:00] FATAL: Stacktrace dumped to /tmp/chef-stacktrace.out
[2023-08-16T16:16:55+08:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2023-08-16T16:16:55+08:00] ERROR: undefined method `unified_mode' for #
Starting Chef Client, version 12.14.60
@AsherAroussi chef version 12.x is extremely old. The error you are experiencing is due to older chef versions not supporting unified_mode.
Our development environment currently targets Ubuntu jammy (22.04) and uses chef 18.x. The other alternative development option is to run all of the development utilities from our docker image (as described here).
Thank you, @ddelnano for your help. I upgrade the chef: chef-solo -v Chef Infra Client: 18.2.7
I run the command : sudo chef-solo -c tools/chef/solo.rb -j tools/chef/node_workstation.json and get the following:
asher@7.182.8.120@/work/tools/pixie ((HEAD detached at release/cloud/v0.1.7))# sudo chef-solo -c tools/chef/solo.rb -j tools/chef/node_workstation.json Chef Infra Client, version 18.2.7 Patents: https://www.chef.io/patents Infra Phase starting Resolving cookbooks for run list: ["px_dev_extras::linux_clang", "px_dev", "px_dev_extras"] Synchronizing cookbooks:
apt_package[autoconf, bash-completion, bc, build-essential, crun, curl, docker.io, git, libncurses5, lcov, podman, sudo, systemd, unzip, virtualenvwrapper, zlib1g-dev, zip, bison, flex, libedit-dev, libelf-dev, gcc-12, g++-12, libltdl-dev, libunwind-dev, qemu, qemu-system-arm, qemu-system-x86, qemu-user-static, qemu-utils] action upgrade
upgrade
on resource 'apt_package[autoconf, bash-completion, bc, build-essential, crun, curl, docker.io, git, libncurses5, lcov, podman, sudo, systemd, unzip, virtualenvwrapper, zlib1g-dev, zip, bison, flex, libedit-dev, libelf-dev, gcc-12, g++-12, libltdl-dev, libunwind-dev, qemu, qemu-system-arm, qemu-system-x86, qemu-user-static, qemu-utils]'No candidate version available for crun, podman, gcc-12, g++-12
62: apt_package apt_pkg_list do 63: action :upgrade 64: end 65:
apt_package("autoconf, bash-completion, bc, build-essential, crun, curl, docker.io, git, libncurses5, lcov, podman, sudo, systemd, unzip, virtualenvwrapper, zlib1g-dev, zip, bison, flex, libedit-dev, libelf-dev, gcc-12, g++-12, libltdl-dev, libunwind-dev, qemu, qemu-system-arm, qemu-system-x86, qemu-user-static, qemu-utils") do package_name ["autoconf", "bash-completion", "bc", "build-essential", "crun", "curl", "docker.io", "git", "libncurses5", "lcov", "podman", "sudo", "systemd", "unzip", "virtualenvwrapper", "zlib1g-dev", "zip", "bison", "flex", "libedit-dev", "libelf-dev", "gcc-12", "g++-12", "libltdl-dev", "libunwind-dev", "qemu", "qemu-system-arm", "qemu-system-x86", "qemu-user-static", "qemu-utils"] action [:upgrade] default_guard_interpreter :default declared_type :apt_package cookbook_name "px_dev" recipe_name "linux" end
chef_version=18.2.7 platform=ubuntu platform_version=18.04 ruby=ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux] program_name=/usr/bin/chef-solo executable=/opt/chef/bin/chef-solo
Running handlers: [2023-08-17T16:16:14+08:00] ERROR: Running exception handlers Running handlers complete [2023-08-17T16:16:14+08:00] ERROR: Exception handlers complete Infra Phase failed. 5 resources updated in 01 minutes 56 seconds [2023-08-17T16:16:14+08:00] FATAL: Stacktrace dumped to /tmp/chef-stacktrace.out [2023-08-17T16:16:14+08:00] FATAL: --------------------------------------------------------------------------------------- [2023-08-17T16:16:14+08:00] FATAL: PLEASE PROVIDE THE CONTENTS OF THE stacktrace.out FILE (above) IF YOU FILE A BUG REPORT [2023-08-17T16:16:14+08:00] FATAL: --------------------------------------------------------------------------------------- [2023-08-17T16:16:14+08:00] FATAL: Chef::Exceptions::Package: apt_package[autoconf, bash-completion, bc, build-essential, crun, curl, docker.io, git, libncurses5, lcov, podman, sudo, systemd, unzip, virtualenvwrapper, zlib1g-dev, zip, bison, flex, libedit-dev, libelf-dev, gcc-12, g++-12, libltdl-dev, libunwind-dev, qemu, qemu-system-arm, qemu-system-x86, qemu-user-static, qemu-utils] (px_dev::linux line 62) had an error: Chef::Exceptions::Package: No candidate version available for crun, podman, gcc-12, g++-12
No problem. I see you are using Ubuntu 18.04. As I mentioned before, our development docker image setup builds on top of Ubuntu jammy (22.04). You will need to run chef on that version of Ubuntu.
Thank you. I appreciate your help, @ddelnano . I'll upgrade
Not a problem :). I'm going to close this for now since so far things point to needing a compatible build environment. However, I'm happy to continue the discussion here as you get closer to having a working build. So please don't hesitate to continue with any new issues that arise!
Describe the bug I download the pixie project and tried to compile it (I want to run the standalone PEM and test it). I run the command : bazel build under pixie directory and encountered the following error:
Error in fail: Error while fetching artifact with coursier: Resolution error: Error downloading org.apache.thrift:libthrift:0.10.0 download error: Caught javax.net.ssl.SSLHandshakeException (PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target) while downloading https://repo1.maven.org/maven2/org/apache/thrift/libthrift/0.10.0/libthrift-0.10.0.pom
So I downloaded all artifacts defined in the file bazel/thrift.bzl to my local repository and change the repositories (under maven_install in this file) to my local repository path [ "https://repo1.maven.org/maven2" ==> "/work/.m2/repository" ].
Now, when I try to build I get the following error:
ERROR: Error computing the main repository mapping: no such package '@thrift_deps//': Error while fetching artifact with coursier: Exception in thread "main" java.net.MalformedURLException: No protocol found in URL /work/.m2/repository/org/apache/thrift/libthrift/0.10.0/libthrift-0.10.0.pom
I tried to download the libthrift-0.10.0.pom and libthrift-0.10.0.pom.sha1 from maven repository to /work/.m2/repository/org/apache/thrift/libthrift/0.10.0/ but it didn't help.
I'm newbie in bazel so appreciate any help. Thanks.
To Reproduce
Expected behavior compilation succeeds. thrift.zip