Skip to content

Instantly share code, notes, and snippets.

@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
@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 / 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 / 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 / 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 / bdister-repro.sh
Last active January 10, 2019 23:43
pyinstaller: distutils.command.bdist_egg not found in PYZ
# python setup
python3 -m virtualenv venv
./venv/bin/python --version
# Python 3.7.2
# run script normally
./venv/bin/python bdister.py
#
# ...snip...
# creating 'dist/foobar-1.0-py3.7.egg' and adding 'build/bdist.macosx-10.14-x86_64/egg' to it
@paleozogt
paleozogt / cinst_VisualStudioExpress2013WindowsDesktop.txt
Last active August 29, 2015 14:04
cinst VisualStudioExpress2013WindowsDesktop
C:\Windows\system32>cinst VisualStudioExpress2013WindowsDesktop
Chocolatey (v0.9.8.27) is installing 'VisualStudioExpress2013WindowsDesktop' and
dependencies. By installing you accept the license for 'VisualStudioExpress2013
WindowsDesktop' and each dependency you are installing.
VisualStudioExpress2013WindowsDesktop v12.0.21005.1
Installing VisualStudioExpress2013WindowsDesktop...
Write-Error : [ERROR] Running C:\Users\admin\AppData\Local\Temp\chocolatey\Visu
alStudioExpress2013WindowsDesktop\VisualStudioExpress2013WindowsDesktopInstall.
exe with /Passive /NoRestart /Log C:\Users\admin\AppData\Local\Temp\VisualStudi
@paleozogt
paleozogt / console
Created December 10, 2012 18:14
emscripten #741
$ EMCC_DEBUG=1 make speex_test
[ 93%] Built target speex
Linking CXX executable ../bin/speex_test.js
emcc invocation: /home/asimmons/Development/emscripten/emcc -O3 -DNDEBUG CMakeFiles/speex_test.dir/speex_test.cpp.o -o ../bin/speex_test.js -rdynamic ../lib/libspeex.a
(Emscripten: Running sanity checks)
Warning: Applying some potentially unsafe optimizations! (Use -O2 if this fails.)
emcc: compiling to bitcode
emcc: copying bitcode file: CMakeFiles/speex_test.dir/speex_test.cpp.o
emcc: copying library file: ../lib/libspeex.a
@paleozogt
paleozogt / console
Created December 10, 2012 18:07
emscripten #742
$ EMCC_DEBUG=1 make speex_test
[ 92%] Built target speex
Linking CXX executable ../bin/speex_test.js
emcc invocation: /Users/asimmons/Development/emscripten/emcc -O3 -DNDEBUG -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/speex_test.dir/speex_test.cpp.o -o ../bin/speex_test.js ../lib/libspeex.a
(Emscripten: Running sanity checks)
Warning: Applying some potentially unsafe optimizations! (Use -O2 if this fails.)
emcc: compiling to bitcode
emcc: copying bitcode file: CMakeFiles/speex_test.dir/speex_test.cpp.o
emcc: copying library file: ../lib/libspeex.a
@paleozogt
paleozogt / gist:4182734
Created December 1, 2012 14:53
closure-compiler failed to build on 10.7
```
$ ls -l ~/Library/Logs/Homebrew/closure*
ls: /Users/mithrandir/Library/Logs/Homebrew/closure*: No such file or directory
$ brew doctor
Warning: Your XQuartz (2.7.1) is outdated
Please install XQuartz 2.7.4.
Warning: You have leftover files from an older version of Xcode.
You should delete them using:
/Developer/Library/uninstall-developer-folder