Remove last GCC tools which do not run on the target system

Open
#26 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux

Research direction

No files or tests are named. Start by inspecting the crosstool-ng configuration and the build outputs that retain ar, nm, objcopy, and related GCC binaries; compare them with the available LLVM counterparts. Done means the unwanted static GCC tools are no longer kept and the regenerated toolchain remains usable on the target system.

Written by the indexing model from the issue text.

Description

bug

Due to a misunderstanding on how the build works, we are currently building and keeping binaries like ar, nm, objcopy etc that come from the GCC toolchain that crosstool-ng initially prepares.

These tools are built as fully static, so the even the glibc is statically compiled in. The problem is that it doesn't use the glibc version we want to target, but the one that the system where is currently built on uses.
Since we build on an Ubuntu 18.04, the included glibc version doesn't work with the old kernel that CentOS 6 has.

In general we should just switch to the LLVM counterparts, since they are all available, so ar -> llvm-ar, nm -> llvm-nm and so on.

While it's true that it's rare that the toolchain is used on CentOS 6 directly to build osquery, it's a problem when having to re-generate the configuration for the third party libraries.

A workaround can be done by creating some symlinks.

Dominant language
Shell
Stars
43
Forks
23
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from osquery/osquery-toolchain

All issues in osquery/osquery-toolchain

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.