Saturday, June 4, 2016

Building in a Clean Chroot

I use llvm-svn and clang-svn in order to use mesa-git. As of late, llvm-svn 3.9.0svn_r270437-1 fails to build after the check tool has been added to the build.

http://pastebin.com/PSKbGhd5

kerberizer's solution (the maintainer of the AUR package) is to build in a clean chroot.

kerberizer commented on 2016-05-30 14:25

@LinguinePenguiny, do you build in a clean chroot? I did some additional testing on my own desktop system (which, BTW, happens to also be an FX-8350), but I couldn't reproduce the problem, I'm afraid. For me, the testing succeeds even when using makepkg outside of a clean chroot. However, each system setup can be specific enough to cause unique problems, which is why I always recommend building in a clean chroot.

Just in case someone finds this information helpful, here are some example commands how to build in a clean chroot. I still advise consulting the Arch Wiki though.[1] The example (it's actually a crude excerpt from the build script that I use for the binary repo) is meant to allow building lib32-llvm-svn too, hence why gcc-multilib is used. It takes advantage of multiple cores when building and compressing (the example here is tailored to an 8-core/threads system). The user's ccache cache is utilised as well, so frequent rebuilds can be much faster. If you don't sign your packages, omit the lines mentioning PACKAGER and GPGKEY, otherwise they need to be set correctly. The chroot ("${x86_64_chroot}") is best set up in /tmp, but this requires a lot of RAM (most likely at least 32 GB, since /tmp is by default half the size of the physical RAM detected); second best solution is on an SSD. The latter goes for ~/.ccache as well.

$ cd /path/to/where/llvm-svn/is/cloned

$ x86_64_chroot="/chroot/x86_64"

$ sudo mkdir -p "${x86_64_chroot}/root" (Not Needed. mkarchroot below will create it)

$ sudo /usr/bin/mkarchroot \
-C /usr/share/devtools/pacman-multilib.conf \
-M /usr/share/devtools/makepkg-x86_64.conf \
-c /var/cache/pacman/pkg \
"${x86_64_chroot}/root" \
base-devel ccache

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c "yes | pacman -Sy gcc-multilib"

$ sudo /usr/bin/arch-nspawn "${x86_64_chroot}/root" /bin/bash -c \
"echo -e \"CCACHE_DIR='/.ccache'\nXZ_DEFAULTS='--threads=
6'\" >>/etc/environment ; \
sed \
-e 's/^#MAKEFLAGS=.*$/MAKEFLAGS=\"-j9\"/' \
-e '/^BUILDENV=/s/\!ccache/ccache/' \
-e 's/^#PACKAGER=.*$/PACKAGER=\"Some One \"/' \
-e 's/^#GPGKEY=.*$/GPGKEY=\"0x0000000000000000\"/' \
-i /etc/makepkg.conf"

# pacman -S ccache (If not installed)


$ mkdir ~/.ccache

$ sudo /usr/bin/makechrootpkg -c -d ~/.ccache:/.ccache -r "${x86_64_chroot}"

It's advisable to always start this from scratch, i.e. don't reuse the old chroot, but create it anew for each build (it uses the local pacman cache, so doesn't waste bandwidth, and if located in /tmp or on an SSD, is pretty fast).

----
1. https://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot

# pacman -U *.pkg.tar.xz

Saturday, January 3, 2015

irssi

dccstat.pl
Move/copy the file to ~/.irssi/scripts/autorun. Create autorun folder if does not exist. It should automatically load next time you run irssi.
Once it's loaded, do (per comments in the script):
/statusbar dccstat add dccstat
/save

SSL
To simply connect to a secured port server:
/server -ssl irc.server.org 9999

Ignore
Joins and quits can be annoying on a big channel and would have to swim through to find wanted entries. You can do "/help ignore" for other examples, but I mostly need this:
/ignore #channel JOINS PARTS QUITS

Friday, January 2, 2015

Back to Arch

Ever since I upgraded to an AMD FX-6300 with a new motherboard, I have been using Windows 7 due to UEFI problem with Gigabit motherboard GA-970A-UD3, and that I have gotten into COD >.>; And this has been going on for like 2 years  now? Welp, it is 2015 and time to make changes!

I think am going to start jotting down notes here and make random remarks as well...

To make my motherboard play nice with Linux, enable IOMMU in BIOS!

To map the side buttons to PageUp and PageDown for my Corsair M65:
$ egrep "Name|Handlers" /proc/bus/input/devices
N: Name="Corsair Corsair M65 Gaming Mouse"
H: Handlers=mouse0 event0 
N: Name="Corsair Corsair M65 Gaming Mouse"
H: Handlers=sysrq kbd event1 
N: Name="Corsair Corsair M65 Gaming Mouse"
H: Handlers=kbd event2 
N: Name="Cypress USB Keyboard"
H: Handlers=sysrq kbd event3 
N: Name="Cypress USB Keyboard"
H: Handlers=kbd event4 

pacman -S xbindkey xvkbd
xbindkeys --defaults > /home/coolj08/.xbindkeysrc

Modify and add in the .xbindkeysrc:
# Page Up
"xvkbd -text "\[Prior]""
        m:0x0 + b:9
"xvkbd -text "\[Next]""
        m:0x0 + b:8

Then run xbindkeys...
$ xbindkeys
If you've already ran it and made changes aftwards, do the following to kill it...
$ pkill -f xbindkeys

Wednesday, April 7, 2010

freeseer FSOC 2010 Proposal: Auto-Systray With Hotkey

Displaying preview output takes quite a bit of resource. The preview output should be considered as an option and instead, use the icon in the system tray to change color (to red) when recording to indicate that it is running. Assuming that everything in freeseer is locked out during the recording, the freeseer main window will then auto-hide in the system tray. The user can stop the recording by either double clicking on the system tray icon, or in an option when right clicked. Auto-hide can also be optional, though I believe it is preferable to be set as default.

The presentation will look even more cleaner and professional if the user can choose which display he wants to start recording in and when to stop. In order to achieve this, freeseer should allow the user to use a configurable global hotkey. The freeseer main window will hide in the system tray when the recording hotkey is triggered and will pop back to desktop again when ending hotkey is triggered.

Disabling preview output should bring synchronization closer to real-time and should help the performance we want with hotkeys. If synchronization is still an issue, a watermark pop-up can be enforced. If implementable, the watermark will be on top of the other windows in the desktop while not be in the recording and will disappear in a few seconds after the record button or hotkey is triggered. The purpose of the watermark is to notify the user when it is okay to start the actual presentation. A watermark will pop up again when ending hotkey is pressed, so to notify the user when it's okay to end the presentation so that the recording doesn't get killed too soon. Again, this feature can be optional in the settings.