Skip to content

Instantly share code, notes, and snippets.

@paleozogt
paleozogt / build.sh
Last active July 9, 2019 16:51
dockcross testing
#!/bin/bash
set -x
function dockcross_build {
docker run --rm dockcross/linux-$1 > dockcross-linux-$1
chmod +x dockcross-linux-$1
./dockcross-linux-$1 bash -c '$CXX -std=c++11 helloworld.cpp'
mv a.out $1
}
@paleozogt
paleozogt / vagrant-229.log
Last active May 26, 2020 15:39
vagrant 2.2.9 bug
INFO global: Vagrant version: 2.2.9
INFO global: Ruby version: 2.6.6
INFO global: RubyGems version: 3.0.3
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/2.2.9/gems/vagrant-2.2.9/bin/vagrant"
INFO global: VAGRANT_INSTALLER_ENV="1"
WARN global: resolv replacement has not been enabled!
INFO manager: Registered plugin: docker
@paleozogt
paleozogt / notes.md
Last active June 17, 2020 23:46
rancher-agent for arm32

These are instructions for building rancher-agent for arm32. If we start doing this regularly we'll need to standup CI, but for now doing it manually is good enough.

I suspect the reason that rancher-agent isn't supported for arm32 is because rancher proper (aka make build-server) doesn't compile for arm32 (with error constant 4294967295 overflows int). However, the agent (aka make build-agent) builds fine.

Cross-compilation isn't quite straightforward in these projects, so they've been tweaked (and a bug fixed).

rancher-agent's Dockerfile.agent pulls binaries from upstream dependencies that don't exist for arm32, so we have to build them manually.

share-mnt:

  1. git clone https://github.com/paleozogt/rancher-share-mnt.git
@paleozogt
paleozogt / cross-compile-ldd
Last active August 31, 2023 05:37 — forked from jerome-pouiller/cross-compile-ldd
ldd drop-in replacement for cross-compilation toolchains.
#!/bin/bash
# ldd drop-in replacement for cross-compilation toolchains.
# This file is a slightly modified version of xldd.in from
# crosstool-ng 1.22.0
# In order to use it, copy it in same directory than other
# toolchain binaries and rename it with same tuple.
# (i.e. /opt/arm-sysmic-linux-gnueabihf/bin/arm-sysmic-linux-gnueabihf-ldd)
@paleozogt
paleozogt / Dockerfile
Created November 2, 2020 22:28
cygwin in docker workaround
# escape=`
FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019
SHELL ["cmd", "/S", "/C"]
# chocolatey package manager
ADD https://chocolatey.org/install.ps1 install.ps1
RUN powershell ./install.ps1
# cygwin and its package manager