Skip to content

Instantly share code, notes, and snippets.

View keithel's full-sized avatar

Keith Kyzivat keithel

  • New Hampshire, USA
View GitHub Profile
@keithel
keithel / gist:c0457a95c8c4491dac3cc1a97140a51c
Created May 2, 2024 21:22
excerpt from `scp -vv synology:create-unfs foo` - which tells me the file doesn't exist.
scp: debug2: Remote version: 3
scp: debug2: Server supports extension "posix-rename@openssh.com" revision 1
scp: debug2: Server supports extension "statvfs@openssh.com" revision 2
scp: debug2: Server supports extension "fstatvfs@openssh.com" revision 2
scp: debug2: Server supports extension "hardlink@openssh.com" revision 1
scp: debug2: Server supports extension "fsync@openssh.com" revision 1
scp: debug2: Server supports extension "lsetstat@openssh.com" revision 1
scp: debug1: stat remote: No such file or directory
scp: debug2: Sending SSH2_FXP_STAT "create-unfs"
scp: debug1: stat remote: No such file or directory
@keithel
keithel / bitbake core-image-minimal output
Last active January 4, 2024 02:12
ps -aux on hung bitbake core-image-minimal from dunfell branch of yocto, for a Jetson Nano image build
kyzik@kkyz-P1Gen6:~/Build/yocto/dunfell/builds/jetson-nano-devkit$ bitbake core-image-minimal
WARNING: Host distribution "ubuntu-23.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Parsing recipes: 100% |########################################################################################################################################################| Time: 0:00:04
Parsing of 911 .bb files complete (0 cached, 911 parsed). 1517 targets, 64 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.46.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
@keithel
keithel / README.md
Last active November 14, 2023 21:14
QTBUG-118578 notes

Some bug reproductions and notes on QTBUG-118578

Undocking tabbed widget from floating window creates empty redundant window

Screencasts showing broken behavior with https://codereview.qt-project.org/c/qt/qtbase/+/516878

Patchset 27

Undocking a QDockWidgetGroupWindow from QMainWindow, followed by undocking one tab from the group window (keeping tab in a dragging state), followed by re-docking that tab to any location will result in the tab you are docking to instead be docked to the QMainWindow in the same position that the group window was docked. See screencast 516878-27-redock-to-floating-dockwidget-docks-qmainwindow.webm

@keithel
keithel / qpointf_hash.cpp
Created September 13, 2023 18:19
QPointF hash function
namespace std {
template<> struct hash<QPointF>
{
   size_t operator()(const QPointF &point, size_t seed) const
   {
       size_t x = static_cast<size_t>(point.x());
       size_t y = static_cast<size_t>(point.y());
       size_t half_qreal = sizeof(qreal) / 2;
       size_t half_bits = half_qreal*8;
@keithel
keithel / bash_output.txt
Created August 3, 2023 16:02
QTBUG-115731 example build+run on Rocky 8 w/ GCC 11.2.1
[t_kyzik@localhost apitrace]$ (rm -Rf build; lsb_release -a; echo -e "\nPATH=$PATH\n"; cmake -DCMAKE_PREFIX_PATH=$HOME/Qt/6.5.1/gcc_64 -DCMAKE_VERBOSE_MAKEFILE=ON -B build -G Ninja .; echo; cmake --build build; echo; build/qapitrace)
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Rocky
Description: Rocky Linux release 8.8 (Green Obsidian)
Release: 8.8
Codename: GreenObsidian
PATH=/home/t_kyzik/.pyenv/shims:/home/t_kyzik/.pyenv/plugins/pyenv-virtualenv/shims:/opt/rh/gcc-toolset-11/root/usr/bin:/home/t_kyzik/.pyenv/plugins/pyenv-virtualenv/shims:/home/t_kyzik/.pyenv/bin:/opt/rh/gcc-toolset-11/root/usr/bin:/home/t_kyzik/.local/bin:/home/t_kyzik/bin:/usr/share/Modules/bin:/usr/lib64/ccache:/home/t_kyzik/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/home/t_kyzik/Build/qt-git/qt5/qtrepotools/bin:/home/t_kyzik/Build/qt-git/qt5/qtrepotools/bin
-- Using CMake 3.20.2
@keithel
keithel / gist:5c9e548a0e8099498384b0d14ab80f66
Created July 26, 2023 15:24
Determining mirrored Qt submodules that are not mirroring properly
I encountered an issue with Qt repositories that are mirrored, but not all submodules being mirrored properly.
This makes it impossible to clone and build new Qt releases. These notes help discover which submodule repositories are not syncing properly with the code.qt repositories:
For further testing to verify that all the needed submodules are mirrored properly for a given release tag, I test the following way:
```
$ git clone https://mirror.host/foo/qt5.git -b v6.5.2
$ ./init-repository --force --module-subset=default,-preview,-qtnetworkauth,-qtpurchasing,-qtquick3d,-qtlottie,-qtcharts,-qtdatavis3d,-qtvirtualkeyboard,-qtwebglplugin,-qtactiveqt,-qtconnectivity,-qtcoap,-qtmqtt,-qtopcua,-qtquicktimeline,-qtquickeffectmaker,-qtquick3dphysics
# (failures will occur if the needed submodule refs (commits) are not present in the submodule repositories)
$ for subm in $(git submodule status | awk '/^+/ {print $2}'); do git submodule update $subm; done
@keithel
keithel / rsync_acl_xattr_test.sh
Last active May 11, 2023 21:13
Testing if rsync on macOS will properly synchronize xattrs, ACLs, and hard links
#!/bin/bash
set -e -u
T=$(echo ${TMPDIR}rsync_test*)
if [[ -e $T ]]; then
TMP_DIR=$T #"$TMPDIR/rsync_test*"
cd $TMP_DIR
rm -Rf a b ls_a_out ls_b_out
else
TMP_DIR=$(mktemp -d -t rsync_test)

Apple debugging tips

  1. Create a blank Xcode project for the purpose of debugging your app, if it was not built with Xcode.
  2. Select your executable you wish to debug using Debug->Debug Executable... or Debug->Attach to process.
  3. You can modify startup parameters for the app using the scheme, accessible at Product->Scheme->Edit Scheme....
  4. To load debug versions of libraries, like the Qt libraries, set the environment variable DYLD_IMAGE_SUFFIX to _debug which will load the the debug versions of the Qt libraries. You can set this in the Arguments tab of the Scheme editor.
  5. In Scheme editor, make sure that the Document Versions ☐ Allow debugging when browsing versions checkbox is unchecked - it defaults to on. Without doing this, you will often have applications failing on startup because Xcode inserts command line options to the application that the app is not expecting.
  6. Make sure that the .dSYM files are located adjacent to the .frameworks and/or .dyld libraries.
  7. Running `image l
@keithel
keithel / config.summary
Last active April 18, 2023 16:58
Qt 6.5.0 configure for macOS universal build, frameworks, nodejs webengine issue
Building for: macx-clang (x86_64;arm64), x86_64 features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
Compiler: clang (Apple) 14.0.0.14000029
Build options:
Mode ................................... debug and release (with debug info)
Optimize release build for size ........ no
Fully optimize release builds (-O3) .... no
Building shared libraries .............. yes
Using C standard ....................... C11
Using C++ standard ..................... C++17